CN106789167A - A kind of data processing method and server - Google Patents
A kind of data processing method and server Download PDFInfo
- Publication number
- CN106789167A CN106789167A CN201611065442.XA CN201611065442A CN106789167A CN 106789167 A CN106789167 A CN 106789167A CN 201611065442 A CN201611065442 A CN 201611065442A CN 106789167 A CN106789167 A CN 106789167A
- Authority
- CN
- China
- Prior art keywords
- data
- inquiry request
- client
- datas
- server
- 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
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0631—Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/148—File search processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
Abstract
The embodiment of the invention discloses a kind of data processing method and server.The server includes:Radio communication unit and data query processing unit;Wherein, the radio communication unit, the data inquiry request for receiving client;The data query processing unit, the first data for obtaining the querying condition for meeting the data inquiry request;Partial data is read from first data and generates the second data;Wherein, the data volume of the partial data is the data volume of one page;The radio communication unit, is additionally operable to for second data to be back to the client.The technical scheme of the embodiment of the present invention greatly reduces the processing pressure of server, also reduces the pressure of network transmission, improves data query speed slowly, improves efficiency data query.
Description
Technical field
The present invention relates to data processing technique, and in particular to a kind of data processing method and server.
Background technology
After reaching the standard grade, operation maintenance personnel is wanted to know the service condition of user, then need to carry out user behavior data
Statistics.Operation maintenance personnel carries out statistical analysis to data for convenience, and conventional method is to provide the page and is shown.But often count
Too big according to sum, time for causing each request data paging query is long, efficiency is low, influences search efficiency.
The content of the invention
To solve existing technical problem, a kind of data processing method and server are the embodiment of the invention provides.
To reach above-mentioned purpose, what the technical scheme of the embodiment of the present invention was realized in:
A kind of server is the embodiment of the invention provides, the server includes:At radio communication unit and data query
Reason unit;Wherein,
The radio communication unit, the data inquiry request for receiving client;
The data query processing unit, the first number for obtaining the querying condition for meeting the data inquiry request
According to;Partial data is read from first data and generates the second data;Wherein, the data volume of the partial data is one page
Data volume;
The radio communication unit, is additionally operable to for second data to be back to the client.
Data query processing unit described in such scheme, for judging that the data that the data inquiry request is inquired about are
No is requesting query first;When the data that the data inquiry request is inquired about are requesting queries first, by the described first number
All data in carry out descending and arrange and cache into internal memory.
Data query processing unit described in such scheme, the first number for reading descending arrangement from the internal memory
According to acquisition M datas;Carry out ascending sort to the M datas, the preceding N datas are generated the by N datas before obtaining
Two data;Wherein, M and N are positive integer;The numerical value of M is equal to the data volume of paging number × paging.
Data query processing unit described in such scheme, is additionally operable to the data inquired about when the data inquiry request not
Be first requesting query when, first data are directly read from the internal memory.
Data query processing unit described in such scheme, is additionally operable to be dropped all data in first data
Sequence is arranged and cached during into internal memory, is calculated the data total amount in first data and is cached the data total amount;It is additionally operable to
The data volume in second data is calculated, second data and the data volume of the preceding N datas generation are passed through into institute
Radio communication unit is stated to send to the client.
A kind of data processing method is the embodiment of the invention provides, the data processing method includes:
The data inquiry request of client is received, acquisition meets the first number of the querying condition of the data inquiry request
According to;
Partial data is read from first data and generates the second data, second data are back to the client
End;Wherein, the data volume of the partial data is the data volume of one page.
Before reading partial data the second data of generation from first data described in such scheme, methods described is also
Including:
Judge whether data that the data inquiry request inquired about are requesting queries first;
When the data that the data inquiry request is inquired about are requesting queries first, will be all in first data
Data carry out descending and arrange and cache into internal memory.
Partial data is read from first data generate the second data described in such scheme, including:
The first data of descending arrangement are read from the internal memory, M datas are obtained;Ascending order is carried out to the M datas
The preceding N datas are generated the second data by sequence, N datas before obtaining;
Wherein, M and N are positive integer;The numerical value of M is equal to the data volume of paging number × paging.
Method also includes described in such scheme:When the data that the data inquiry request is inquired about are not that request is looked into first
During inquiry, first data are directly read from the internal memory.
The all data in first data are carried out into descending described in such scheme to arrange and cache during into internal memory,
Methods described also includes:Calculate the data total amount in first data and cache the data total amount;
Accordingly, it is described that second data are back to the client, including:Calculate the number in second data
According to amount, second data and the data volume of the preceding N datas generation are sent to the client.
Data processing method provided in an embodiment of the present invention and server, the server include:Radio communication unit and
Data query processing unit;Wherein, the radio communication unit, the data inquiry request for receiving client;The number
It is investigated that processing unit is ask, the first data for obtaining the querying condition for meeting the data inquiry request;From the described first number
The second data are generated according to middle reading partial data;Wherein, the data volume of the partial data is the data volume of one page;It is described wireless
Communication unit, is additionally operable to for second data to be back to the client.Using the technical scheme of the embodiment of the present invention, service
Device returns to a data for paged data amount every time, and the disposable data volume for returning will not be very big, therefore greatly reduces service
The processing pressure of device, also reduces the pressure of network transmission, improves data query speed slowly, improves data query effect
Rate.
Brief description of the drawings
Fig. 1 is a hardware architecture diagram for optional mobile terminal for realizing each embodiment of the invention;
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the schematic flow sheet of paging request in the prior art;
Fig. 4 is the schematic flow sheet of the data processing method of the embodiment of the present invention one;
Fig. 5 is the schematic flow sheet of the data processing method of the embodiment of the present invention two;
Fig. 6 is the composition structural representation of the server of the embodiment of the present invention;
The realization of the object of the invention, functional characteristics and advantage will be described further referring to the drawings in conjunction with the embodiments.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The mobile terminal of each embodiment of the invention is realized referring now to Description of Drawings.In follow-up description, use
For represent element such as " module ", " part " or " unit " suffix only for being conducive to explanation of the invention, itself
Not specific meaning.Therefore, " module " can be used mixedly with " part ".
Mobile terminal can be implemented in a variety of manners.For example, the terminal described in the present invention can include such as moving
It is phone, smart phone, notebook computer, digit broadcasting receiver, personal digital assistant (PDA), panel computer (PAD), portable
The mobile terminal of formula multimedia player (PMP), guider etc. and the such as fixation of numeral TV, desktop computer etc.
Terminal.Hereinafter it is assumed that terminal is mobile terminal.However, it will be understood by those skilled in the art that, except being used in particular for moving mesh
Element outside, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Fig. 1 is that the hardware configuration of an optional mobile terminal for realizing each embodiment of the invention is illustrated.
Mobile terminal 1 00 can include wireless communication unit 110, A/V (audio/video) input block 120, user input
Unit 130, sensing unit 140, output unit 150, memory 160, interface unit 170, controller 180 and power subsystem 190
Etc..Fig. 1 shows the mobile terminal with various assemblies, it should be understood that being not required for implementing all groups for showing
Part.More or less component can alternatively be implemented.The element of mobile terminal will be discussed in more detail below.
Wireless communication unit 110 generally includes one or more assemblies, and it allows mobile terminal 1 00 and wireless communication system
Or the radio communication between network.For example, wireless communication unit can include broadcasting reception module 111, mobile communication module
112nd, at least one of wireless Internet module 113, short range communication module 114 and location information module 115.
Broadcasting reception module 111 receives broadcast singal and/or broadcast via broadcast channel from external broadcast management server
Relevant information.Broadcast channel can include satellite channel and/or terrestrial channel.Broadcast management server can be generated and sent
The broadcast singal and/or broadcast related information generated before the server or reception of broadcast singal and/or broadcast related information
And send it to the server of terminal.Broadcast singal can include TV broadcast singals, radio signals, data broadcasting
Signal etc..And, broadcast singal may further include the broadcast singal combined with TV or radio signals.Broadcast phase
Pass information can also be provided via mobile communications network, and in this case, broadcast related information can be by mobile communication mould
Block 112 is received.Broadcast singal can exist in a variety of manners, for example, it can be with the electronics of DMB (DMB)
The form of program guide (EPG), the electronic service guidebooks (ESG) of digital video broadcast-handheld (DVB-H) etc. and exist.Broadcast
Receiver module 111 can receive signal and broadcast by using various types of broadcast systems.Especially, broadcasting reception module 111
Can be by using such as multimedia broadcasting-ground (DMB-T), DMB-satellite (DMB-S), DVB-H, forward direction
The digital broadcasting of Radio Data System, the received terrestrial digital broadcasting integrated service (ISDB-T) of link Media (MediaFLO@) etc.
System receives digital broadcasting.Broadcasting reception module 111 may be constructed such that be adapted to provide for the various broadcast systems of broadcast singal with
And above-mentioned digit broadcasting system.The broadcast singal and/or broadcast related information received via broadcasting reception module 111 can be stored
In memory 160 (or other types of storage medium).
Mobile communication module 112 sends radio signals to base station (for example, access point, node B etc.), exterior terminal
And at least one of server and/or receive from it radio signal.Such radio signal can be logical including voice
Words signal, video calling signal or the various types of data for sending and/or receiving according to text and/or Multimedia Message.
Wireless Internet module 113 supports the Wi-Fi (Wireless Internet Access) of mobile terminal.The module can be internally or externally
It is couple to terminal.Wi-Fi (Wireless Internet Access) technology involved by the module can be including WLAN (WLAN), Wi-Fi, without line width
Band (Wibro), worldwide interoperability for microwave accesses (Wimax), high-speed downlink packet access (HSDPA) etc..
Short range communication module 114 is the module for supporting junction service.Some examples of short-range communication technology include indigo plant
Tooth TM, radio frequency identification (RFID), Infrared Data Association (IrDA), ultra wide band (UWB), purple honeybee TM etc..
Location information module 115 is the module for checking or obtaining the positional information of mobile terminal.Location information module
Typical case be global positioning system (GPS).According to current technology, calculated as the location information module 115 of GPS module
Range information and correct time information from three or more satellites and the Information application triangulation for calculating,
So as to calculate according to longitude, latitude and highly accurately three-dimensional current location information.Currently, for calculating position and temporal information
Method the error of the position and temporal information for calculating is corrected using three satellites and by using an other satellite.
Additionally, can be believed come calculating speed by Continuous plus current location information in real time as GPS module location information module 115
Breath.
A/V input blocks 120 are used to receive audio or video signal.A/V input blocks 120 can include the He of camera 121
Microphone 122, the static images that 121 pairs, camera is obtained in Video Capture pattern or image capture mode by image capture apparatus
Or the view data of video is processed.Picture frame after treatment may be displayed on display unit 151.Processed through camera 121
Picture frame afterwards can be stored in memory 160 (or other storage mediums) or sent out via wireless communication unit 110
Send, two or more cameras 121 can be provided according to the construction of mobile terminal.Microphone 122 can be in telephone calling model, note
Sound (voice data) is received via microphone in record pattern, speech recognition mode etc. operational mode, and can be by so
Acoustic processing be voice data.Audio (voice) data after treatment can be converted in the case of telephone calling model can
The form for being sent to mobile communication base station via mobile communication module 112 is exported.Microphone 122 can implement various types of making an uproar
Sound eliminates (or suppression) algorithm to eliminate the noise or dry that (or suppression) produces during reception and transmission audio signal
Disturb.
User input unit 130 can generate key input data to control each of mobile terminal according to the order of user input
Plant operation.User input unit 130 allows the various types of information of user input, and can include keyboard, metal dome, touch
Plate (for example, detection due to being touched caused by resistance, pressure, electric capacity etc. change sensitive component), roller, rocking bar etc.
Deng.Especially, when touch pad is superimposed upon on display unit 151 in the form of layer, touch-screen can be formed.
Sensing unit 140 detects the current state of mobile terminal 1 00, (for example, mobile terminal 1 00 opens or closes shape
State), the presence or absence of the contact (that is, touch input) of the position of mobile terminal 1 00, user for mobile terminal 1 00, mobile terminal
The acceleration or deceleration movement of 100 orientation, mobile terminal 1 00 and direction etc., and generate for controlling mobile terminal 1 00
The order of operation or signal.For example, when mobile terminal 1 00 is embodied as sliding-type mobile phone, sensing unit 140 can be sensed
The sliding-type phone is opened or closed.In addition, sensing unit 140 can detect power subsystem 190 whether provide electric power or
Whether person's interface unit 170 couples with external device (ED).
Interface unit 170 is connected the interface that can pass through with mobile terminal 1 00 as at least one external device (ED).For example,
External device (ED) can include wired or wireless head-band earphone port, external power source (or battery charger) port, wired or nothing
Line FPDP, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end
Mouth, video i/o port, ear port etc..Identification module can be that storage uses each of mobile terminal 1 00 for verifying user
Kind of information and subscriber identification module (UIM), client identification module (SIM), Universal Subscriber identification module (USIM) can be included
Etc..In addition, the device (hereinafter referred to as " identifying device ") with identification module can take the form of smart card, therefore, know
Other device can be connected via port or other attachment means with mobile terminal 1 00.Interface unit 170 can be used for reception and come from
The input (for example, data message, electric power etc.) of the external device (ED) and input that will be received is transferred in mobile terminal 1 00
One or more elements can be used for transmitting data between mobile terminal and external device (ED).
In addition, when mobile terminal 1 00 is connected with external base, interface unit 170 can serve as allowing by it by electricity
Power provides to the path of mobile terminal 1 00 from base or can serve as allowing the various command signals being input into from base to pass through it
It is transferred to the path of mobile terminal.Be can serve as recognizing that mobile terminal is from the various command signals or electric power of base input
The no signal being accurately fitted within base.Output unit 150 is configured to provide defeated with vision, audio and/or tactile manner
Go out signal (for example, audio signal, vision signal, alarm signal, vibration signal etc.).Output unit 150 can include display
Unit 151, dio Output Modules 152, alarm unit 153 etc..
Display unit 151 may be displayed on the information processed in mobile terminal 1 00.For example, when mobile terminal 1 00 is in electricity
During words call mode, display unit 151 can show and converse or other communicate (for example, text messaging, multimedia file
Download etc.) related user interface (UI) or graphic user interface (GUI).When mobile terminal 1 00 is in video calling pattern
Or during image capture mode, display unit 151 can show the image of capture and/or the image of reception, show video or figure
UI or GUI of picture and correlation function etc..
Meanwhile, when display unit 151 and touch pad in the form of layer it is superposed on one another to form touch-screen when, display unit
151 can serve as input unit and output device.Display unit 151 can include liquid crystal display (LCD), thin film transistor (TFT)
In LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc. at least
It is a kind of.Some in these displays may be constructed such that transparence to allow user to be watched from outside, and this is properly termed as transparent
Display, typical transparent display can be, for example, transparent organic light emitting diode (TOLED) display etc..According to specific
Desired implementation method, mobile terminal 1 00 can include two or more display units (or other display devices), for example, moving
Dynamic terminal can include outernal display unit (not shown) and inner display unit (not shown).Touch-screen can be used to detect touch
Input pressure and touch input position and touch input area.
Dio Output Modules 152 can mobile terminal be in call signal reception pattern, call mode, logging mode,
It is that wireless communication unit 110 is received or in memory 160 when under the isotypes such as speech recognition mode, broadcast reception mode
The voice data transducing audio signal of middle storage and it is output as sound.And, dio Output Modules 152 can be provided and movement
The audio output (for example, call signal receives sound, message sink sound etc.) of the specific function correlation that terminal 100 is performed.
Dio Output Modules 152 can include loudspeaker, buzzer etc..
Alarm unit 153 can provide output and be notified to mobile terminal 1 00 with by event.Typical event can be with
Including calling reception, message sink, key signals input, touch input etc..In addition to audio or video is exported, alarm unit
153 can in a different manner provide output with the generation of notification event.For example, alarm unit 153 can be in the form of vibrating
Output is provided, when calling, message or some other entrance communication (incomingcommunication) are received, alarm list
Unit 153 can provide tactile output (that is, vibrating) to notify to user.Exported by providing such tactile, even if
When in pocket of the mobile phone of user in user, user also can recognize that the generation of various events.Alarm unit 153
The output of the generation of notification event can be provided via display unit 151 or dio Output Modules 152.
Memory 160 can store software program for the treatment and control operation performed by controller 180 etc., Huo Zheke
Temporarily to store the data that exported or will export (for example, telephone directory, message, still image, video etc.).And
And, memory 160 can store the vibration of various modes on being exported when touching and being applied to touch-screen and audio signal
Data.
Memory 160 can include the storage medium of at least one type, and the storage medium includes flash memory, hard disk, many
Media card, card-type memory (for example, SD or DX memories etc.), random access storage device (RAM), static random-access storage
Device (SRAM), read-only storage (ROM), Electrically Erasable Read Only Memory (EEPROM), programmable read only memory
(PROM), magnetic storage, disk, CD etc..And, mobile terminal 1 00 can perform memory with by network connection
The network storage device cooperation of 160 store function.
The overall operation of the generally control mobile terminal of controller 180.For example, controller 180 is performed and voice call, data
Communication, video calling etc. related control and treatment.In addition, controller 180 can be included for reproducing (or playback) many matchmakers
The multi-media module 181 of volume data, multi-media module 181 can be constructed in controller 180, or can be structured as and control
Device 180 is separated.Controller 180 can be with execution pattern identifying processing, the handwriting input that will be performed on the touchscreen or picture
Draw input and be identified as character or image.
Power subsystem 190 receives external power or internal power under the control of controller 180 and provides operation each unit
Appropriate electric power needed for part and component.
Various implementation methods described herein can be with use such as computer software, hardware or its any combination of calculating
Machine computer-readable recording medium is implemented.Implement for hardware, implementation method described herein can be by using application-specific IC
(ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), scene can
Programming gate array (FPGA), processor, controller, microcontroller, microprocessor, it is designed to perform function described herein
At least one in electronic unit is implemented, and in some cases, such implementation method can be implemented in controller 180.
For software implementation, the implementation method of such as process or function can with allow to perform the single of at least one function or operation
Software module is implemented.Software code can be come by the software application (or program) write with any appropriate programming language
Implement, software code can be stored in memory 160 and performed by controller 180.
So far, mobile terminal is described according to its function.Below, for the sake of brevity, will description such as folded form,
Slide type mobile terminal in various types of mobile terminals of board-type, oscillating-type, slide type mobile terminal etc. is used as showing
Example.Therefore, the present invention can be applied to any kind of mobile terminal, and be not limited to slide type mobile terminal.
Mobile terminal 1 00 as shown in Figure 1 may be constructed such that using via frame or packet transmission data it is all if any
Line and wireless communication system and satellite-based communication system are operated.
The communication system that mobile terminal wherein of the invention can be operated is described referring now to Fig. 2.
Such communication system can use different air interface and/or physical layer.For example, used by communication system
Air interface includes such as frequency division multiple access (FDMA), time division multiple acess (TDMA), CDMA (CDMA) and universal mobile communications system
System (UMTS) (especially, Long Term Evolution (LTE)), global system for mobile communications (GSM) etc..As non-limiting example, under
The description in face is related to cdma communication system, but such teaching is equally applicable to other types of system.
With reference to Fig. 2, cdma wireless communication system can include multiple mobile terminal 1s 00, multiple base station (BS) 270, base station
Controller (BSC) 275 and mobile switching centre (MSC) 280.MSC280 is configured to and Public Switched Telephony Network (PSTN)
290 form interface.MSC280 is also structured to form interface with the BSC275 that can be couple to base station 270 via back haul link.
Back haul link can in some known interfaces any one construct, the interface includes such as E1/T1, ATM, IP,
PPP, frame relay, HDSL, ADSL or xDSL.It will be appreciated that system can include multiple BSC275 as shown in Figure 2.
Each BS270 can service one or more subregions (or region), by multidirectional antenna or the day of sensing specific direction
Each subregion of line covering is radially away from BS270.Or, each subregion can be by two or more for diversity reception
Antenna is covered.Each BS270 may be constructed such that the multiple frequency distribution of support, and the distribution of each frequency has specific frequency spectrum
(for example, 1.25MHz, 5MHz etc.).
What subregion and frequency were distributed intersects can be referred to as CDMA Channel.BS270 can also be referred to as base station transceiver
System (BTS) or other equivalent terms.In this case, term " base station " can be used for broadly representing single
BSC275 and at least one BS270.Base station can also be referred to as " cellular station ".Or, each subregion of specific BS270 can be claimed
It is multiple cellular stations.
As shown in Figure 2, broadcast singal is sent to broadcsting transmitter (BT) 295 mobile terminal operated in system
100.Broadcasting reception module 111 as shown in Figure 1 is arranged at mobile terminal 1 00 to receive the broadcast sent by BT295
Signal.In fig. 2 it is shown that several global positioning system (GPS) satellites 300.Satellite 300 helps position multiple mobile terminals
At least one of 100.
In fig. 2, multiple satellites 300 are depicted, it is understood that be, it is possible to use any number of satellite obtains useful
Location information.It is generally configured to coordinate to obtain with satellite 300 as the location information module 115 of GPS as shown in Figure 1
The location information that must be wanted.Substitute GPS tracking techniques or outside GPS tracking techniques, it is possible to use can track mobile whole
Other technologies of the position at end.In addition, at least one gps satellite 300 can optionally or additionally process satellite dmb biography
It is defeated.
Used as a typical operation of wireless communication system, BS270 receives the reverse link from various mobile terminal 1s 00
Signal.Mobile terminal 1 00 generally participates in call, information receiving and transmitting and other types of communication.Each of the reception of certain base station 270 is anti-
Processed in specific BS270 to link signal.The data of acquisition are forwarded to the BSC275 of correlation.BSC 275 is provided
Call resource allocation and the mobile management function of the coordination including the soft switching process between BS270.BSC275 will also be received
Data be routed to MSC280, its provide for PSTN290 formed interface extra route service.Similarly, PSTN290
Interface is formed with MSC280, MSC 280 and BSC275 form interface, and BSC275 correspondingly controls BS270 with by positive chain
Road signal is sent to mobile terminal 1 00.
Fig. 3 is the schematic flow sheet of paging request in the prior art;As shown in figure 3, including:Step 301:Client is to clothes
Business device sends data inquiry request;Step 302:Server is disposable to return to all data for meeting condition to client.Tool
Body, the data inquiry request that client sends is used to ask the service condition of all applications some day, and the data query please
Seek the data volume including paging number and every page;After server receives the data inquiry request, the institute of the paging number will be met
There are data disposably to return to client, client cuts display when paging shows according to the data for returning.This mode
The disposable data volume for returning is excessive, and processing pressure is increased to server, also to the pressure that increased network transmission, causes number
According to the problem that inquiry velocity is slow, efficiency is low.
Description based on above-mentioned mobile terminal hardware configuration and communication system, and above mentioned problem propose the present invention each
Embodiment.
Embodiment one
The embodiment of the invention provides a kind of data processing method.Fig. 4 is the data processing method of the embodiment of the present invention one
Schematic flow sheet;As shown in figure 4, methods described includes:
Step 401:The data inquiry request of client is received, acquisition meets the querying condition of the data inquiry request
The first data.
Step 402:Partial data is read from first data and generates the second data, second data are back to
The client;Wherein, the data volume of the partial data is the data volume of one page.
The data processing method of the present embodiment is applied in server;The data that i.e. described server receives client are looked into
Ask request;Wherein, the data inquiry request includes application identities to be asked, paging number and every page of data volume.Base
The first data for meeting the application identities can be obtained in the application identities, by first data loading internal memory.
In the present embodiment, the server is based on paging number and every page data amount in the data inquiry request, from institute
Reading meets the second data described in the data genaration per page data amount in stating internal memory, second data is back to described
Client, the data of this page of data amount are shown so as to client in display data, only.
As a kind of implementation method, the server receive again the client corresponding to the application identities
During data inquiry request, the data for meeting condition can be directly read from caching, so will compared to the reading data from disk
It is fast a lot.
As a kind of implementation method, when the acquisition meets the first data of the querying condition of the data inquiry request,
Methods described also includes:Calculate the data total amount in first data and cache the data total amount;Accordingly, it is described by institute
State the second data and be back to the client, including:Calculate the data volume in second data, by second data and
The data volume is sent to the client.
Using the technical scheme of the embodiment of the present invention, server returns to a data for paged data amount every time, disposably
The data volume of return will not be very big, therefore greatly reduces the processing pressure of server, also reduces the pressure of network transmission, carries
Data query speed high is slow, improves efficiency data query.
Embodiment two
The embodiment of the invention provides a kind of data processing method.Fig. 5 is the data processing method of the embodiment of the present invention two
Schematic flow sheet;As shown in figure 5, methods described includes:
Step 501:Client sends data inquiry request;The data inquiry request is used to ask certain application identities correspondence
Data;The data volume of paging number, such as first page, and current paging can also be included in the data inquiry request.
Step 502:Server receives the data inquiry request of client, judges what the data inquiry request was inquired about
Whether data are requesting queries first;By data that the data inquiry request is inquired about it is requesting query first when judged result
When, perform step 503:Acquisition meets the first data of the querying condition of the data inquiry request, by first data
All data carry out descending and arrange and cache into internal memory;When the data that judged result is inquired about by the data inquiry request
It is not requesting query first, then performs and data are read from internal memory, directly performs step 504.
Step 504:The first data of descending arrangement are read from the internal memory, M datas are obtained;The numerical value of M is equal to and divides
The data volume of number of pages × paging.
Step 505:Carry out ascending sort to the M datas, the preceding N datas are generated the by N datas before obtaining
Two data.
Step 506:Second data of the preceding N datas generation are back to the client, so that client can show
Show the first page data.
In the present embodiment, the server receives the data inquiry request of client;Wherein, the data inquiry request
Include application identities to be asked, paging number and every page of data volume.It is described satisfaction can be obtained based on the application identities
First data of application identities, by first data loading internal memory.
In the present embodiment, after the server receives the data inquiry request of client, judge that the data query please
Ask whether inquired about data are requesting queries first.Specifically, the data inquiry request can be by SQL
(SQL, Structured Query Language) is represented, then the server can determine whether whether the SQL statement for receiving is first
Secondary request;If the SQL statement is to ask first, acquisition meets the first data of the querying condition of the SQL statement, by institute
State all data in the first data and carry out descending and arrange and cache into internal memory.Wherein, the server can be logical by SPARK
Data sorting is carried out with parallel framework, all data descendings in first data are arranged and are loaded into internal memory;Wherein,
SPARK universal parallels framework can carry out descending permutation calculation in internal memory;So, when the SQL statement is received again, can
The data for meeting condition are directly read from caching, it is so many soon compared to data are read from disk.
In the present embodiment, the server directly reads M datas from internal memory;The numerical value of M is equal to paging number × paging
Data volume;It is to be understood that M datas are the first data after descending arrangement, the quantity of M is the data of first data
Total amount.Further, ascending sort is carried out to the M datas, N datas and the second data of generation before obtaining, by described the
Two data are back to the client;Wherein, described in the present embodiment ascending sort and descending sort is according to data
Time is ranked up, and so, the second data for generating and being back to client are all new data;Also, visitor is back to every time
The data volume at family end is one data volume of paging of satisfaction, so that client shows this page of data in display data, only
The data of amount.
As a kind of implementation method, the server receive again the client corresponding to the application identities
During data inquiry request, the data for meeting condition can be directly read from caching, so will compared to the reading data from disk
It is fast a lot.
All data by first data carry out descending and arrange and cache during into internal memory, and methods described is also
Including:Calculate the data total amount in first data and cache the data total amount;Accordingly, it is described by second data
The client is back to, including:The data volume in second data is calculated, by the second number of the preceding N datas generation
According to this and the data volume is sent to the client,
Using the technical scheme of the embodiment of the present invention, server returns to a data for paged data amount every time, disposably
The data volume of return will not be very big, therefore greatly reduces the processing pressure of server, also reduces the pressure of network transmission, carries
Data query speed high is slow, improves efficiency data query.
Embodiment three
The embodiment of the present invention additionally provides a kind of server.Fig. 6 shows for the composition structure of the server of the embodiment of the present invention
It is intended to;As shown in fig. 6, the server includes:Radio communication unit 61 and data query processing unit 62;Wherein,
The radio communication unit 61, the data inquiry request for receiving client;
The data query processing unit 62, the first number for obtaining the querying condition for meeting the data inquiry request
According to;Partial data is read from first data and generates the second data;Wherein, the data volume of the partial data is one page
Data volume;
The radio communication unit 61, is additionally operable to for second data to be back to the client.
Radio communication unit 61 receives the data inquiry request of client described in the present embodiment;Wherein, the data are looked into
Asking request includes application identities to be asked, paging number and every page of data volume.Can be expired based on the application identities
First data of the foot application identities, by first data loading internal memory.
In the present embodiment, the data query processing unit 62 is based on paging number and every page in the data inquiry request
Data volume, reads from the internal memory and meets the second data, the wireless telecommunications described in the data genaration per page data amount
Second data are back to the client by unit 61, so that client shows this page of data in display data, only
The data of amount.
Used as a kind of implementation method, the radio communication unit 61 receives being answered corresponding to described for the client again
During with the data inquiry request for identifying, the data for meeting condition can be directly read from caching, so read compared to from disk
Access is according to many soon.
Used as a kind of implementation method, the data query processing unit 62 is additionally operable to calculate the number in first data
According to total amount and cache the data total amount;Accordingly, the data query processing unit 62, is additionally operable to calculate second data
In data volume, the radio communication unit 61 is additionally operable to send second data and the data volume to the visitor
Family end.
It will be appreciated by those skilled in the art that in the server of the embodiment of the present invention each processing unit function, can refer to
The associated description of aforementioned data processing method and understand, each processing unit in the server of the embodiment of the present invention, can by realize
The analog circuit of the function described in the embodiment of the present invention and realize, it is also possible to by performing the function described in the embodiment of the present invention
Operation of the software on intelligent terminal and realize.
Using the technical scheme of the embodiment of the present invention, server returns to a data for paged data amount every time, disposably
The data volume of return will not be very big, therefore greatly reduces the processing pressure of server, also reduces the pressure of network transmission, carries
Data query speed high is slow, improves efficiency data query.
Example IV
The embodiment of the present invention additionally provides a kind of server.As shown in fig. 6, the server includes:Radio communication unit
61 and data query processing unit 62;Wherein,
The radio communication unit 61, the data inquiry request for receiving client;
The data query processing unit 62, for judging whether the data that the data inquiry request is inquired about are first
Requesting query;When the data that the data inquiry request is inquired about are requesting queries first, acquisition meets the data query
First data of the querying condition of request;All data in first data are carried out into descending to arrange and cache to internal memory
In;When the data that the data inquiry request is inquired about are not requesting queries first, directly read from the internal memory described
First data;It is additionally operable to be read from the internal memory the first data of descending arrangement, obtains M datas;The M datas are entered
The preceding N datas are generated the second data by row ascending sort, N datas before obtaining;Wherein, M and N are positive integer;M's
Numerical value is equal to the data volume of paging number × paging;
The radio communication unit 61, is additionally operable to for the second data of the preceding N datas generation to be back to the client
End.
In the present embodiment, the radio communication unit 61 receives the data inquiry request of client;Wherein, the data
Inquiry request includes application identities to be asked, paging number and every page of data volume.Can be obtained based on the application identities
The first data of the application identities are met, by first data loading internal memory.
In the present embodiment, after the radio communication unit 61 receives the data inquiry request of client, the data are looked into
Ask whether data that processing unit 62 judges that the data inquiry request inquired about are requesting queries first.Specifically, the number
Can be represented by SQL statement according to inquiry request, then the data query processing unit 62 can determine whether whether is the SQL statement that receives
It is to ask first;If the SQL statement is to ask first, acquisition meets the first data of the querying condition of the SQL statement,
All data in first data are carried out into descending to arrange and cache into internal memory.Wherein, the data query treatment is single
Unit 62 can carry out data sorting by SPARK universal parallels framework, by all data descendings arrangement in first data simultaneously
It is loaded into internal memory;Wherein, SPARK universal parallels framework can carry out descending permutation calculation in internal memory;So, when receiving again
During to the SQL statement, the data for meeting condition can be directly read from caching, so will compared to the reading data from disk
It is fast a lot.
In the present embodiment, the data query processing unit 62 directly reads M datas from internal memory;The numerical value of M is equal to
The data volume of paging number × paging;It is to be understood that M datas are the first data after descending arrangement, the quantity of M is described the
The data total amount of one data.Further, ascending sort is carried out to the M datas, N datas and the number of generation second before obtaining
According to second data are back into the client by the radio communication unit 61;Wherein, described in the present embodiment
Ascending sort and descending sort were ranked up according to the time of data, so, generated and be back to the second number of client
According to being all new data;Also, the data volume of client is back to every time and is one data volume of paging of satisfaction, so as to client
End only shows the data of this page of data amount in display data.
As a kind of implementation method, the server receive again the client corresponding to the application identities
During data inquiry request, the data for meeting condition can be directly read from caching, so will compared to the reading data from disk
It is fast a lot.
Used as a kind of implementation method, the data query processing unit 62, being additionally operable to will be all in first data
Data carry out descending and arrange and cache during into internal memory, calculate the data total amount in first data and to cache the data total
Amount;It is additionally operable to calculate the data volume in second data, by second data and the data of the preceding N datas generation
Amount is sent to the client by the radio communication unit 61.
It will be appreciated by those skilled in the art that in the server of the embodiment of the present invention each processing unit function, can refer to
The associated description of aforementioned data processing method and understand, each processing unit in the server of the embodiment of the present invention, can by realize
The analog circuit of the function described in the embodiment of the present invention and realize, it is also possible to by performing the function described in the embodiment of the present invention
Operation of the software on intelligent terminal and realize.
In the embodiment of the present invention three and example IV, the data query processing unit 62 in the server actually should
Can be by the central processing unit in the server (CPU, Central Processing Unit), DSP, micro-control unit in
(MCU, Microcontroller Unit) or FPGA are realized;Radio communication unit 61 in the server, in practical application
In (can be included by communications module:Base communication external member, operating system, communication module, standard interface and agreement etc.) and receive
Hair antenna is realized.
Using the technical scheme of the embodiment of the present invention, server returns to a data for paged data amount every time, disposably
The data volume of return will not be very big, therefore greatly reduces the processing pressure of server, also reduces the pressure of network transmission, carries
Data query speed high is slow, improves efficiency data query.
It should be noted that herein, term " including ", "comprising" or its any other variant be intended to non-row
His property is included, so that process, method, article or device including a series of key elements not only include those key elements, and
And also include other key elements being not expressly set out, or also include for this process, method, article or device institute are intrinsic
Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this
Also there is other identical element in the process of key element, method, article or device.
The embodiments of the present invention are for illustration only, and the quality of embodiment is not represented.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, can be by it
Its mode is realized.Apparatus embodiments described above are only schematical, for example, the division of the unit, is only
A kind of division of logic function, can have other dividing mode, such as when actually realizing:Multiple units or component can be combined, or
Another system is desirably integrated into, or some features can be ignored, or do not perform.In addition, shown or discussed each composition portion
Coupling point each other or direct-coupling or communication connection can be the INDIRECT COUPLINGs of equipment or unit by some interfaces
Or communication connection, can be electrical, machinery or other forms.
The above-mentioned unit that is illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit
The part for showing can be or may not be physical location, you can with positioned at a place, it is also possible to be distributed to multiple network lists
In unit;Part or all of unit therein can be according to the actual needs selected to realize the purpose of this embodiment scheme.
In addition, each functional unit in various embodiments of the present invention can be fully integrated into a processing unit, also may be used
Being each unit individually as a unit, it is also possible to which two or more units are integrated in a unit;It is above-mentioned
Integrated unit can both be realized in the form of hardware, it would however also be possible to employ hardware adds the form of SFU software functional unit to realize.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through
Programmed instruction related hardware is completed, and foregoing program can be stored in a computer read/write memory medium, the program
Upon execution, the step of including above method embodiment is performed;And foregoing storage medium includes:It is movable storage device, read-only
Memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or
Person's CD etc. is various can be with the medium of store program codes.
Or, if the above-mentioned integrated unit of the present invention is to realize in the form of software function module and as independent product
When selling or using, it is also possible to which storage is in a computer read/write memory medium.Based on such understanding, the present invention is implemented
The part that the technical scheme of example substantially contributes to prior art in other words can be embodied in the form of software product,
The computer software product is stored in a storage medium, including some instructions are used to so that computer equipment (can be with
It is personal computer, server or network equipment etc.) perform all or part of each embodiment methods described of the invention.
And foregoing storage medium includes:Movable storage device, ROM, RAM, magnetic disc or CD etc. are various can be with store program codes
Medium.
The above, specific embodiment only of the invention, but protection scope of the present invention is not limited thereto, and it is any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all contain
Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.
Claims (10)
1. a kind of server, it is characterised in that the server includes:Radio communication unit and data query processing unit;Its
In,
The radio communication unit, the data inquiry request for receiving client;
The data query processing unit, the first data for obtaining the querying condition for meeting the data inquiry request;From
Partial data is read in first data and generates the second data;Wherein, the data volume of the partial data is the data of one page
Amount;
The radio communication unit, is additionally operable to for second data to be back to the client.
2. server according to claim 1, it is characterised in that the data query processing unit, it is described for judging
Whether the data that data inquiry request is inquired about are requesting queries first;When the data that the data inquiry request is inquired about are first
During secondary requesting query, all data in first data are carried out into descending and is arranged and is cached into internal memory.
3. server according to claim 2, it is characterised in that the data query processing unit, for from described interior
The first data of middle reading descending arrangement are deposited, M datas are obtained;Ascending sort is carried out to the M datas, N bar numbers before obtaining
According to by the second data of the preceding N datas generation;Wherein, M and N are positive integer;The numerical value of M is equal to paging number × paging
Data volume.
4. server according to claim 2, it is characterised in that the data query processing unit, is additionally operable to when described
The data that data inquiry request is inquired about be not first requesting query when, first data are directly read from the internal memory.
5. server according to claim 3, it is characterised in that the data query processing unit, being additionally operable to will be described
All data in first data carry out descending and arrange and cache during into internal memory, calculate the data total amount in first data
And cache the data total amount;It is additionally operable to calculate the data volume in second data, by the second of the preceding N datas generation
Data and the data volume are sent to the client by the radio communication unit.
6. a kind of data processing method, it is characterised in that the data processing method includes:
The data inquiry request of client is received, acquisition meets the first data of the querying condition of the data inquiry request;
Partial data is read from first data and generates the second data, second data are back to the client;
Wherein, the data volume of the partial data is the data volume of one page.
7. method according to claim 6, it is characterised in that described that partial data generation is read from first data
Before second data, methods described also includes:
Judge whether data that the data inquiry request inquired about are requesting queries first;
When the data that the data inquiry request is inquired about are requesting queries first, by all data in first data
Descending is carried out to arrange and cache into internal memory.
8. method according to claim 7, it is characterised in that described that partial data generation is read from first data
Second data, including:
The first data of descending arrangement are read from the internal memory, M datas are obtained;Ascending sort is carried out to the M datas,
N datas before obtaining, the second data are generated by the preceding N datas;
Wherein, M and N are positive integer;The numerical value of M is equal to the data volume of paging number × paging.
9. method according to claim 7, it is characterised in that methods described also includes:When the data inquiry request institute
The data of inquiry be not first requesting query when, first data are directly read from the internal memory.
10. method according to claim 8, it is characterised in that all data by first data are carried out
Descending is arranged and cached during into internal memory, and methods described also includes:Calculate the data total amount in first data and cache institute
State data total amount;
Accordingly, it is described that second data are back to the client, including:Calculate the data in second data
Amount, second data and the data volume of the preceding N datas generation are sent to the client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611065442.XA CN106789167A (en) | 2016-11-28 | 2016-11-28 | A kind of data processing method and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611065442.XA CN106789167A (en) | 2016-11-28 | 2016-11-28 | A kind of data processing method and server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106789167A true CN106789167A (en) | 2017-05-31 |
Family
ID=58901965
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611065442.XA Pending CN106789167A (en) | 2016-11-28 | 2016-11-28 | A kind of data processing method and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106789167A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107577701A (en) * | 2017-07-26 | 2018-01-12 | 努比亚技术有限公司 | A kind of data reordering method, sequence server and computer-readable recording medium |
CN110535966A (en) * | 2019-09-05 | 2019-12-03 | 腾讯科技(深圳)有限公司 | A kind of data processing method and relevant device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110026323A1 (en) * | 2009-07-30 | 2011-02-03 | International Business Machines Corporation | Gated Diode Memory Cells |
CN105740330A (en) * | 2016-01-22 | 2016-07-06 | 腾讯科技(深圳)有限公司 | Data paging display method and apparatus |
CN105843956A (en) * | 2016-04-14 | 2016-08-10 | 北京搜狐新媒体信息技术有限公司 | Paging query method and system |
-
2016
- 2016-11-28 CN CN201611065442.XA patent/CN106789167A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110026323A1 (en) * | 2009-07-30 | 2011-02-03 | International Business Machines Corporation | Gated Diode Memory Cells |
CN105740330A (en) * | 2016-01-22 | 2016-07-06 | 腾讯科技(深圳)有限公司 | Data paging display method and apparatus |
CN105843956A (en) * | 2016-04-14 | 2016-08-10 | 北京搜狐新媒体信息技术有限公司 | Paging query method and system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107577701A (en) * | 2017-07-26 | 2018-01-12 | 努比亚技术有限公司 | A kind of data reordering method, sequence server and computer-readable recording medium |
CN110535966A (en) * | 2019-09-05 | 2019-12-03 | 腾讯科技(深圳)有限公司 | A kind of data processing method and relevant device |
CN110535966B (en) * | 2019-09-05 | 2021-06-15 | 腾讯科技(深圳)有限公司 | Data processing method and related equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104808944B (en) | Touch operation inducing method and device | |
CN104883430B (en) | A kind of mobile terminal and do not read the treating method and apparatus of footmark | |
CN106844032A (en) | The storage processing method and device of a kind of terminal applies | |
CN106911806A (en) | A kind of method of PUSH message, terminal, server and system | |
CN104951229B (en) | Screenshot method and device | |
CN106776906A (en) | One kind application clustering method and device | |
CN106657602A (en) | Conversation screen-off system based on proximity sensor and mobile terminal | |
CN106792609A (en) | A kind of method of calling of mobile terminal and emergency numbers | |
CN107066604A (en) | A kind of cleaning garbage files method and terminal | |
CN106598538A (en) | Method and system for updating instruction set | |
CN106302992A (en) | A kind of mobile terminal and screen lighting method | |
CN106681722A (en) | Process processing method and electronic device | |
CN106791149A (en) | A kind of method of mobile terminal and control screen | |
CN106412328A (en) | Method and device for obtaining user feedback information | |
CN107071161A (en) | The aggregation display method and mobile terminal of icon in a kind of status bar | |
CN106789167A (en) | A kind of data processing method and server | |
CN106777251A (en) | A kind of file management method and device | |
CN106776845A (en) | A kind of information flow adaptive management method and terminal | |
CN106817145A (en) | A kind of mobile terminal and communication means | |
CN106843734A (en) | The multi-functional treating method and apparatus of one species pressure sensitivity button | |
CN106547424A (en) | A kind of icon sort method and a kind of terminal | |
CN106354278A (en) | Character input method combined with application programs and terminal | |
CN106713645A (en) | Method of controlling loudspeaker playing and mobile terminal | |
CN106775887A (en) | The discharging method and device of a kind of application program | |
CN106686316A (en) | Video recording method and device and mobile terminal |
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 |
Application publication date: 20170531 |
|
RJ01 | Rejection of invention patent application after publication |