CN107220294A - A kind of method and terminal for asking to handle - Google Patents

A kind of method and terminal for asking to handle Download PDF

Info

Publication number
CN107220294A
CN107220294A CN201710284269.0A CN201710284269A CN107220294A CN 107220294 A CN107220294 A CN 107220294A CN 201710284269 A CN201710284269 A CN 201710284269A CN 107220294 A CN107220294 A CN 107220294A
Authority
CN
China
Prior art keywords
identification information
current request
response message
hash table
request
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.)
Withdrawn
Application number
CN201710284269.0A
Other languages
Chinese (zh)
Inventor
陈金添
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201710284269.0A priority Critical patent/CN107220294A/en
Publication of CN107220294A publication Critical patent/CN107220294A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72469User interfaces specially adapted for cordless or mobile telephones for operating the device by selecting functions from two or more displayed items, e.g. menus or icons
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72484User interfaces specially adapted for cordless or mobile telephones wherein functions are triggered by incoming communication events

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention discloses a kind of method and terminal for asking to handle, wherein this method includes:When making requests on processing in MVC frameworks, hash table is set up using at least one request;Obtain the identification information of current request;When there is the identification information of the current request in the hash table, response message corresponding to the identification information of the current request is obtained from the hash table;Or, the index information of response message corresponding to identification information of the current request is obtained from the hash table, response message corresponding to the identification information that the current request is obtained according to the index information;When response message corresponding to the identification information of the current request is effective, the response message is exported.In this way, simplifying request processing flow in MVC frameworks, request response time is reduced, request treatment effeciency is improved.

Description

A kind of method and terminal for asking to handle
Technical field
The present invention relates to communication technique field, more particularly to a kind of method and terminal for asking to handle.
Background technology
View-model-controller (Model View Controller, MVC) framework is a kind of software in soft project Software systems, are divided into three essential parts by architecture mode:Model (Model), view (View) and controller (Controller).Model realizes the service logic in system, and View is used to interact with user, and Controller layers are The bridge linked up between Model and View.And Spring MVC are a kind of Web MVC frameworks realized based on Java, pass through reality Existing MVC well by data, business, show and separated, that is, used the thought of MVC architecture modes, web layer be subjected to responsibility Decoupling, request-response model based on request driving.
When making requests on handling process in Spring MVC frameworks, due to being asked in Spring MVC frameworks from initiation Response is asked, must be by front controller (Dispatcher Servlet) processing, and mapped using processor (Handler Mapping) is distributed to corresponding controller, and controller is assembled into corresponding model and view (Model And View), and by view resolver (View Resolver), view visible results are finally responded into user.
However, the flow of processing is more complicated, expends resource and time-consuming longer, interacted for some long-times, high concurrent The page (such as:Homepage etc.), enormous pressure will necessarily be brought to server, and because time-consuming, Consumer's Experience can be dropped It is low.
The content of the invention
In order to solve the above technical problems, the embodiment of the present invention provides a kind of method and terminal for asking to handle, reducing please The response time is asked, request treatment effeciency is improved.
To reach above-mentioned purpose, what the technical scheme of the embodiment of the present invention was realized in:
The embodiments of the invention provide a kind of method for asking processing, including:
When making requests on processing in view-model-controller MVC frameworks, hash table is set up using at least one request; The hash table includes:At least one identification information asked response message corresponding with the identification information each asked;Or, The hash table includes:The index of at least one identification information asked response message corresponding with the identification information each asked Information;
Obtain the identification information of current request;
When there is the identification information of the current request in the hash table, obtain described current from the hash table Response message corresponding to the identification information of request;Or, the identification information pair of the current request is obtained from the hash table The index information for the response message answered, believes according to the response that the identification information of the index information acquisition current request is corresponding Breath;
When response message corresponding to the identification information of the current request is effective, the response message is exported.
In such scheme, methods described also includes:The identification information of the current request is not present in the hash table When, the corresponding response message of the current request is obtained according to MVC frameworks;
There is the identification information of the current request, and the identification information correspondence of the current request in the hash table Response message it is invalid when, the corresponding response message of the current request is obtained according to MVC frameworks.
In such scheme, it is described in the hash table be not present the current request identification information when, according to MVC frames Frame is obtained after the corresponding response message of the current request, and methods described also includes:Utilize the identification information of the current request Response message corresponding with the current request updates the hash table;
There is the identification information of the current request, and the identification information correspondence of the current request in the hash table Response message it is invalid when, obtained according to MVC frameworks after the corresponding response message of the current request, methods described also includes: The hash table is updated using the corresponding response message of the current request of acquisition.
In such scheme, the identification information is Uniform Resource Identifier URI.
It is described to set up hash using at least one request when the MVC frameworks are Spring MVC frameworks in such scheme Table includes:In the filter of front controller hash table is set up using at least one request;
The identification information for obtaining current request includes:The identification information of current request is obtained by the filter.
The embodiment of the present invention additionally provides a kind of terminal, it is characterised in that the terminal includes:Processor, memory and Communication bus;Wherein,
The communication bus is used to realize the connection communication between processor and memory;
The processor is used to perform the request handler stored in memory, to realize following steps:
When making requests on processing in view-model-controller MVC frameworks, hash table is set up using at least one request; The hash table includes:At least one identification information asked response message corresponding with the identification information each asked;Or, The hash table includes:The index of at least one identification information asked response message corresponding with the identification information each asked Information;
Obtain the identification information of current request;
When there is the identification information of the current request in the hash table, obtain described current from the hash table Response message corresponding to the identification information of request;Or, the identification information pair of the current request is obtained from the hash table The index information for the response message answered, believes according to the response that the identification information of the index information acquisition current request is corresponding Breath;
When response message corresponding to the identification information of the current request is effective, the corresponding sound of the current request is exported Answer information.
In such scheme, the processor is additionally operable to perform the request handler, to realize following steps:
When the identification information of the current request being not present in the hash table, obtain described current according to MVC frameworks Ask corresponding response message;
There is the identification information of the current request, and the identification information correspondence of the current request in the hash table Response message it is invalid when, the corresponding response message of the current request is obtained according to MVC frameworks.
In such scheme, it is described in the hash table be not present the current request identification information when, according to MVC frames Frame is obtained after the corresponding response message of the current request, and the processor is additionally operable to perform the request handler, with reality Existing following steps:The hash is updated using the corresponding response message of the identification information and the current request of the current request Table;
There is the identification information of the current request, and the identification information correspondence of the current request in the hash table Response message it is invalid when, obtained according to MVC frameworks after the corresponding response message of the current request, the processor is additionally operable to The request handler is performed, to realize following steps:Updated using the corresponding response message of the current request of acquisition The hash table.
The embodiment of the present invention additionally provides a kind of computer-readable recording medium, it is characterised in that described computer-readable Storage medium is stored with one or more program, and one or more of programs can be held by one or more processor OK, to realize following steps:
When making requests on processing in view-model-controller MVC frameworks, hash table is set up using at least one request; The hash table includes:At least one identification information asked response message corresponding with the identification information each asked;Or, The hash table includes:The index of at least one identification information asked response message corresponding with the identification information each asked Information;
Obtain the identification information of current request;
When there is the identification information of the current request in the hash table, obtain described current from the hash table Response message corresponding to the identification information of request;Or, the identification information pair of the current request is obtained from the hash table The index information for the response message answered, believes according to the response that the identification information of the index information acquisition current request is corresponding Breath;
When response message corresponding to the identification information of the current request is effective, the corresponding sound of the current request is exported Answer information.
In such scheme, one or more of programs can also be by one or more of computing devices, with reality Existing following steps:
When the identification information of the current request being not present in the hash table, obtain described current according to MVC frameworks Ask corresponding response message;
There is the identification information of the current request, and the identification information correspondence of the current request in the hash table Response message it is invalid when, the corresponding response message of the current request is obtained according to MVC frameworks.
A kind of method and terminal for asking to handle provided in an embodiment of the present invention, this method includes:Carried out in MVC frameworks During request processing, hash table is set up using at least one request;The hash table includes:At least one request identification information and Response message corresponding to the identification information each asked;Or, the hash table includes:At least one request identification information and The index information of response message corresponding to the identification information each asked;Obtain the identification information of current request;In the hash When there is the identification information of the current request in table, the identification information correspondence of the current request is obtained from the hash table Response message;Or, the index of response message corresponding to identification information of the current request is obtained from the hash table Information, according to response message corresponding to the identification information of the index information acquisition current request;In the current request Identification information it is corresponding response message it is effective when, export the response message.Compared with prior art, the embodiment of the present invention is led to Cross and set up hash table with corresponding response message for request, when making requests on processing, directly can be asked from hash table Corresponding response message, simplifies request processing flow in MVC frameworks, reduces request response time, improves request processing Efficiency.
Brief description of the drawings
Fig. 1 is the hardware architecture diagram for realizing the optional mobile terminal of each embodiment one 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 diagram of normal Spring MVC request processing flows in the embodiment of the present invention;
The flow chart of the first embodiment for the method that Fig. 4 is handled for present invention request;
The flow chart of the second embodiment for the method that Fig. 5 is handled for present invention request;
The flow chart of the 3rd embodiment for the method that Fig. 6 is handled for present invention request;
Fig. 7 is the composition structural representation for the terminal that the embodiment of the present invention makes requests on processing.
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.
Describe to realize the mobile terminal of each embodiment of the invention referring now to accompanying drawing.In follow-up description, use For represent element such as " module ", " part " or " unit " suffix only for be conducive to the present invention explanation, 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 embodiment of the present invention can include it is all Such as mobile phone, smart phone, notebook computer, digit broadcasting receiver, personal digital assistant (PDA), tablet personal computer (PAD), the mobile terminal of portable media player (PMP), guider etc. and such as numeral TV, desktop computer Etc. fixed terminal.Hereinafter it is assumed that terminal is mobile terminal.However, it will be understood by those skilled in the art that, except special Outside element for moving purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Fig. 1 is the hardware architecture diagram for realizing the optional mobile terminal of each embodiment one of the invention.
Mobile terminal 1 00 can include wireless communication unit 110, audio/video (A/V) input block 120, user's 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 shown Part.More or less components 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 in 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..Moreover, broadcast singal may further include the broadcast singal combined with TV or radio signals.Broadcast phase Closing information can also provide 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 DMB (DMB) electronics The form of program guide (EPG), the electronic service guidebooks (ESG) of digital video broadcast-handheld (DVB-H) etc. and exist.Broadcast Receiving module 111 can receive signal broadcast by using various types of broadcast systems.Especially, broadcasting reception module 111 Can be wide by using such as multimedia broadcasting-ground (DMB-T), DMB-satellite (DMB-S), digital video Broadcast-hand-held (DVB-H), the Radio Data System of forward link media (MediaFLO@), received terrestrial digital broadcasting integrated service Etc. (ISDB-T) digit broadcasting system receives digital broadcasting.Broadcasting reception module 111, which may be constructed such that, to be adapted to provide for extensively Broadcast the various broadcast systems and above-mentioned digit broadcasting system of signal.Via broadcasting reception module 111 receive broadcast singal and/ Or broadcast related information 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 in server at least one and/or receive from it radio signal.Such radio signal can be logical including voice Talk about 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 include WLAN (WLAN) (Wi-Fi), nothing 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, calculate and come from as GPS location information module 115 The range information and correct time information of three or more satellites and for the Information application triangulation of calculating, so that Calculate according to longitude, latitude and highly accurately three-dimensional current location information.Currently, for calculating the side of position and temporal information Position and the error of temporal information that method is calculated using three satellites and by using other satellite correction.This Outside, GPS module 115 can be by Continuous plus current location information in real time come calculating speed information.
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 1220, the static map that 121 pairs of camera is obtained in video acquisition mode or image capture mode by image capture apparatus The view data of piece or video is handled.Picture frame after processing may be displayed on display unit 151.At camera 121 Picture frame after reason can be stored in memory 160 (or other storage mediums) or be carried 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 telephone calling model, Sound (voice data) is received via microphone in logging mode, speech recognition mode etc. operational mode, and can be by this The acoustic processing of sample is voice data.Audio (voice) data after processing can be converted in the case of telephone calling model The form output of mobile communication base station can be sent to via mobile communication module 112.Microphone 122 can be implemented various types of Noise eliminate (or suppress) algorithm with eliminate noise that (or suppression) produce during receiving and sending audio signal or Interference.
The order that user input unit 130 can be inputted according to user generates key input data to control each of mobile terminal Plant operation.User input unit 130 allows user to input various types of information, and can include keyboard, metal dome, touch Plate (for example, detection due to being touched caused by the change such as resistance, pressure, electric capacity sensitive component), roller, rocking bar etc.. 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 position of mobile terminal 1 00, user is for the presence or absence of contact (that is, touch input) of 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 opening or closing.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 as at least one external device (ED) with mobile terminal 1 00.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 is used to verify that user uses each of mobile terminal 1 00 Plant 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 external device (ED) and the input 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 may be used as allowing by it by electricity Power provides to the path of mobile terminal 1 00 from base or may be used as allowing passing through it from the various command signals that base is inputted It is transferred to the path of mobile terminal.The various command signals or electric power inputted from base may be used as being used to recognize that mobile terminal is 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 handled in mobile terminal 1 00.For example, when mobile terminal 1 00 is in electricity When talking about call mode, display unit 151 can be shown with conversing or other communicating (for example, text messaging, multimedia file Download etc.) related user interface (User's Interface, UI) or graphic user interface (GUI).When mobile terminal 1 00 During in video calling pattern or image capture mode, display unit 151 can show the image of capture and/or the figure of reception Picture, the UI or GUI for showing video or image 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 may be used 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 embodiment, 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 for detection to 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.Moreover, dio Output Modules 152 can be provided and movement The audio output (for example, call signal receives sound, message sink sound etc.) for the specific function correlation that terminal 100 is performed. Dio Output Modules 152 can include loudspeaker, buzzer etc..
Alarm unit 153 can provide output to notify event to mobile terminal 1 00.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 provide output in a different manner with the generation of notification event.For example, alarm unit 153 can be in the form of vibration Output is provided, when receiving calling, message or some other entrance communications (incoming communication), alarm list Member 153 can provide tactile output (that is, vibrating) to notify to user.Exported by providing such tactile, even in When the mobile phone of user is in the pocket of 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 of the processing performed by controller 180 and control operation etc., Huo Zheke Temporarily to store the data that has 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..Moreover, mobile terminal 1 00 can be with performing memory 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 processing.In addition, controller 180 can include being used to reproduce (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, by the handwriting input 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 member Appropriate electric power needed for part and component.
Various embodiments 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, embodiment 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 of electronic unit is implemented, and in some cases, such embodiment can be implemented in controller 180. For software implementation, the embodiment of such as process or function can be with allowing to perform the single of at least one function or operation Software module is implemented.Software code can by the software application (or program) write with any appropriate programming language Lai Implement, software code can be stored in memory 160 and be 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 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 for describing wherein be operated according to the mobile terminal of the present invention referring now to Fig. 2.
Such communication system can use different air interfaces 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 stations (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 the BSC275 formation interfaces with that can be couple to base station 270 via back haul link. Back haul link can be constructed according to any of some known interfaces, the interface include 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 each frequency distribution has specific frequency spectrum (for example, 1.25MHz, 5MHz etc.).
What subregion and frequency were distributed, which 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, specific BS270 each subregion can be claimed For multiple cellular stations.
As shown in Figure 2, broadcast singal is sent to the mobile terminal operated in system by broadcsting transmitter (BT) 295 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 to position multiple mobile terminals At least one in 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.GPS module 115 as shown in Figure 1 is generally configured to coordinate with satellite 300 to obtain desired positioning letter Breath.GPS tracking techniques or outside GPS tracking techniques are substituted, the other of the position that can track mobile terminal can be used Technology.In addition, at least one gps satellite 300 can optionally or additionally handle satellite dmb transmission.
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.It is each anti-that certain base station 270 is received Handled to link signal in specific BS270.The data of acquisition are forwarded to the BSC275 of correlation.BSC provides call Resource allocation and the mobile management function of coordination including the soft switching process between BS270.BSC275 is also by the number received According to MSC280 is routed to, it is provided for the extra route service with PSTN290 formation interfaces.Similarly, PSTN290 with MSC280 formation interfaces, MSC and BSC275 formation interface, and BSC275 correspondingly control BS270 with by forward link signals It is sent to mobile terminal 1 00.
Based on above-mentioned mobile terminal hardware configuration and communication system, each embodiment of the invention is proposed.
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described.
First embodiment
First embodiment of the invention proposes a kind of method for asking processing, can apply to request processing function In terminal.
Here, the terminal of above-mentioned record can be the fixed terminal with display screen or the shifting with display screen Dynamic terminal.
The fixed terminal of above-mentioned record can be computer etc., and the mobile terminal of above-mentioned record includes but is not limited to mobile electricity Words, notebook computer, camera, PDA, PAD, PMP, guider etc..The terminal can be connected to internet, wherein, institute The mode for stating connection can be that the mobile internet provided by operator is attached, and can also be and wirelessly connect by access Access point carries out network connection.
Here, if mobile terminal has operating system, the operating system can be UNIX, Linux, Windows, Android (Android), Windows Phone etc..
It should be noted that species, shape, size to the display screen in terminal etc. is not limited, it is exemplary, eventually Display screen on end can be LCDs etc..
In the first embodiment of the invention, the display screen of above-mentioned record is used for the interface for providing a user man-machine interaction, The mobile terminal of above-mentioned record can be mobile phone.
Fig. 3 is the schematic diagram of normal Spring MVC request processing flows in the embodiment of the present invention, as shown in figure 3, When making requests on handling process in Spring MVC frameworks, front controller captures and request is handled after request, uses Processor mapping is distributed to corresponding controller (such as:Controller 01, controller 02 and controller 03), controller processing completes phase After the request task answered, corresponding model and view are assembled into, and the view object after being parsed by view resolver, most Visible results show user afterwards.
It can be seen from the above description that obtaining the corresponding response message of request using existing Spring MVC frameworks When, each request is required for just obtaining corresponding response message by above-mentioned steps, is handed over for some long-times, high concurrent The mutual page is (such as:Homepage etc.), the handling process repeated will necessarily bring very big pressure to server, reduction server Processing speed, extends handling duration.Therefore, the problem above existed is handled in order to solve request under existing MVC frameworks, it is proposed that A kind of method of new request processing, it is possible to reduce request response time, improves request treatment effeciency.
The flow chart of the first embodiment for the method that Fig. 4 is handled for present invention request, as shown in figure 4, this method includes:
Step 401:When making requests on processing in MVC frameworks, hash table is set up using at least one request;The hash Table includes:At least one identification information asked response message corresponding with the identification information each asked;Or, the hash Table includes:The index information of at least one identification information asked response message corresponding with the identification information each asked.
It is exemplary, identification information can for Uniform Resource Identifier (Uniform Resource Identifier, URI), or URL (Uniform Resource Location, URL).URI, which is one, to be used to identify The character string of a certain Internet resources title, this mark can pass through specific to the resource of any (including local and internet) Agreement interact operation.The upper available every kind of resources of Web, image, video segment, program etc., are determined by a URI Position.
When actually implementing, it can include in hash table:The identification information of at least one request and the mark each asked The corresponding response message of information, wherein, identification information and the response message of request can be man-to-man mapping relations, by asking The identification information asked can directly determine unique response message.
It can also include in hash table:At least one identification information asked sound corresponding with the identification information each asked The index information of information is answered, wherein, the index information of response message can be in response to the storage address of information, the mark letter of request Cease and the index information of response message can be man-to-man mapping relations, can be determined uniquely by the identification information of request The index information of response message, further determines specific response message by index information.When actually implementing, hash table Can also be it is a kind of value value storage address is obtained according to keyword Key so that the data structure directly conducted interviews, close Key word Key (i.e. identification information), storage address (i.e. the index information of response message), value value (i.e. response message).
Step 402:Obtain the identification information of current request.
Exemplary, when MVC frameworks are Spring MVC frameworks in the embodiment of the present invention, pass through the mistake in front controller Hash table is set up using at least one request in filter filter, and is believed by the filter filter marks for obtaining current request Breath.
Step 403:When there is the identification information of the current request in the hash table, obtained from the hash table Response message corresponding to the identification information of the current request;Or, the mark of the current request is obtained from the hash table Know the index information of the corresponding response message of information, the identification information correspondence of the current request is obtained according to the index information Response message.
When actually implementing, when the identification information of current request being not present in hash table, obtain current according to MVC frameworks Ask corresponding response message.Further, after the corresponding response message of current request is got, it can also be asked using current The corresponding response message of identification information and current request asked updates hash table.
Exemplary, hash table is updated using the corresponding response message of the identification information and current request of current request, can With including:Set up storage after man-to-man mapping relations for identification information and the corresponding response message of current request and arrive hash table In;Or, it is that the identification information of current request is set up after man-to-man mapping relations with the index information of corresponding response message Store in hash table.
Exemplary, in Spring MVC frameworks, filter is obtained after the URI of current request, is judged in hash table With the presence or absence of the URI of current request, if it does, the corresponding response messages of URI of current request are obtained by hash table, if It is not present, currently please be handled by normal Spring MVC request processing flows (request processing flow i.e. shown in Fig. 3) Ask, obtain the corresponding response message of current request.After Spring MVC request processing flows are completed, it is output in response message Before the page, the output stream of the response message is intercepted and captured, and the URI of current request is arrived scattered with the storage of corresponding response message In list.
Here, normal Spring MVC request processing flows can include:In request after front controller is handled, The controller for being distributed to response is mapped using processor, controller is assembled into corresponding model and view, and model and view pass through After view resolver, view is returned.
Step 404:When response message corresponding to the identification information of the current request is effective, the response letter is exported Breath.
When actually implementing, there is the identification information of the current request, and the mark letter of current request in hash table Cease corresponding response message it is invalid when, the corresponding response message of the current request is obtained according to MVC frameworks.Further, exist Get after the corresponding response message of current request, hash can also be updated using the corresponding response message of the current request obtained Table.
Exemplary, hash table is updated using the corresponding response message of the current request of acquisition, can be included:To currently it ask Corresponding response message is asked to be stored as response message corresponding to the identification information of current request into hash table;Or, to work as The response message of preceding request sets up index information, by index information storage into hash table.
Exemplary, in Spring MVC frameworks, if there is the URI of current request in hash table, but by dissipating The corresponding response messages of URI for the current request that list is obtained are invalid (for example:Response message is sky), again by normal Spring MVC request processing flows handle current request, obtain the corresponding response message of current request.Complete Spring After MVC request processing flows, before response message is output to the page, the output stream of the response message is intercepted and captured, and should Response message is stored into hash table as the URI of current request with corresponding response message.
In order to be able to more embody the purpose of the present invention, on the basis of first embodiment of the invention, with Spring MVC frames Under frame exemplified by the processing of solicited message, such scheme is further illustrated.
Second embodiment
The flow chart for the method second embodiment that Fig. 5 is handled for present invention request, as shown in figure 5, the flow includes:
Step 501:Obtain current request.
Step 502:Judge whether to include the URI of current request in hash table, if it is, performing step 503;If not, Perform step 505.
In the embodiment of the present invention, hash table includes:The URI of at least one request and the corresponding responses of URI each asked Information, you can with the corresponding response messages of the URI that request is directly read from hash table.
Exemplary, the filter of front controller is intercepted and captured after the URI of current request, and inquiry is in the hash table of caching The no URI for including current request, if comprising, it may be determined that the corresponding response message of current request has been stored in scattered in advance In list, corresponding response message can be directly obtained from hash table, it is not necessary to continue executing with asking for normal Spring MVC Seek the request processing flow after front controller in handling process;If do not included, need to continue executing with normally Spring MVC request processing flow, so as to obtain the corresponding response message of current request.
Step 503:Judge whether the corresponding response messages of URI of current request in hash table are effective, if it is, performing step Rapid 504;If not, performing step 505.
Exemplary, whether the corresponding response messages of URI for judging current request in hash table are empty, if sky, are said The corresponding response messages of URI of current request are not stored in bright hash table.If being not sky, illustrate pre- in hash table First store the corresponding response messages of URI of current request.
Step 504:Export the corresponding response message of current request.
In this step, the response message obtained from hash table can be directly output to client.
Step 505:Normal Spring MVC request processing flow is continued executing with, the corresponding response of current request is obtained Information.
It should be noted that current request is when asking first, i.e. hash table is current to be not present in empty or hash table During the URI of request, the processing for current request needs to perform whole Spring MVC request processing flow, obtains current Corresponding response message is asked, recycles the URI and response message of current request to update hash table, equally please sending next time When asking, after filter through front controller judges, the buffered response message of the request in hash table is determined, is read simultaneously Export the response message of the request.
Step 506:Judge whether to need the URI of current request and corresponding response message being saved in hash table, such as Fruit is to perform step 507;If not, performing step 508.
It is understood that the page request of some response times long high concurrent interaction can be stored in hash table, to subtract Resource occupation during these requests of few server process, for the page request that the request frequency low-response time is short, then need not be deposited Store up in hash table, directly handled using normal Spring MVC request processing flow, can so improve storage empty Between utilization ratio.
When actually implementing, it can be judged whether to need to preserve corresponding response message according to the characteristic of current request Into hash table.
Step 507:Hash table is updated using the URI of current request and corresponding response message.
Step 508:Export response message.
The embodiment of the present invention is judged whether by the filter of front controller can be using the number in the hash table of caching According to current request is responded, resource consumption is reduced, improve response speed.The side of request processing provided in an embodiment of the present invention Method is drawn after actual test, when the page to a 2KB size makes requests on, passes through normal Spring MVC request Handling process needs 20ms or so time, and the method provided by the embodiment of the present invention only need to 10ms or so when Between, half will be shortened the response time, response speed is doubled.
3rd embodiment
In order to be able to more embody the purpose of the present invention, further illustrated on the basis of first embodiment of the invention Explanation.
The flow chart of the 3rd embodiment for the method that Fig. 6 is handled for present invention request, as shown in fig. 6, the flow includes:
Step 601:Set up a caching hash table hash-uri.
In the embodiment of the present invention, the storage address of keyword Key and response message can be included in hash table hash-uri, Keyword Key is the identification information of request in hash-uri, and the storage address of response message is the index letter of response message Breath, can be with the corresponding response data of read requests in storage address.
When actually implementing, the storage address of response message can be directly obtained according to keyword Key in hash-uri, it is crucial Corresponding relation can be set up between word Key and the storage address of response message by hash function, hash function can be expressed as: P=f (K), wherein, K is keyword, and p is the storage address of response message, and f is the hash function set up between k and p, from The storage address of response message can be determined in hash-uri directly according to the identification information of request.Exemplary, in hash- When the identification information of current request is included in uri, the identification information pair for obtaining current request is calculated using the hash function specified Storage address is answered, the response message in the storage address is obtained.
Step 602:Obtain current HTTP (HyperText Transfer Protocol, HTTP) request.
Here, when browser sends HTTP request to Web server, a solicited message can be transmitted to server, come Obtain response message.
Step 603:Judge whether to include the identification information of current HTTP request in hash-uri, if not, performing step 604;If it is, performing step 606.
Exemplary, when client needs output related web page, HTTP request, clothes are initiated by client The filter being engaged in the Dispatcher Servlet on device end intercepts and captures the identification information of current HTTP request, first judges hash- Whether the identification information of current HTTP request is included in uri, if it is, illustrating that the response message of current HTTP request is advance It is buffered in hash-uri, can be directly obtained by hash-uri;If not, illustrating the response message of current HTTP request It is not buffered, it is necessary to continue executing with normal request processing flow to obtain.
Step 604:Normal request processing flow is continued executing with, the corresponding response message of current HTTP request is obtained.
Exemplary, the normal request processing flow under Spring MVC frameworks is as shown in figure 3, obtaining current HTTP After the response message of request, step 605 is performed.
Step 605:Updated using the identification information of current HTTP request and corresponding response message after hash table, output is worked as The corresponding response message of preceding HTTP request.
In embodiments of the present invention, all corresponding response messages of HTTP request can be delayed using hash table Deposit, improve the response speed of all page requests.
Step 606:The storage address of the response message of current HTTP request is obtained from hash-uri.
Step 607:Whether be empty, if it is, performing step 608 if judging the data preserved in the storage address;If not, Perform step, 604.
Step 608:Export the corresponding response message of current HTTP request.
A kind of method and terminal for asking to handle provided in an embodiment of the present invention, this method includes:Carried out in MVC frameworks During request processing, hash table is set up using at least one request;The hash table includes:At least one request identification information and Response message corresponding to the identification information each asked;Or, the hash table includes:At least one request identification information and The index information of response message corresponding to the identification information each asked;Obtain the identification information of current request;In the hash When there is the identification information of the current request in table, the identification information correspondence of the current request is obtained from the hash table Response message;Or, the index of response message corresponding to identification information of the current request is obtained from the hash table Information, according to response message corresponding to the identification information of the index information acquisition current request;In the current request Identification information it is corresponding response message it is effective when, export the response message.Compared with prior art, the embodiment of the present invention is led to Cross and set up hash table with corresponding response message for request, when making requests on processing, directly can be asked from hash table Corresponding response message, simplifies request processing flow in MVC frameworks, reduces request response time, improves request processing Efficiency.
Fourth embodiment
For the method for the embodiment of the present invention, the embodiment of the present invention additionally provides a kind of terminal for asking to handle.
Fig. 7 is the composition structural representation for the terminal that the embodiment of the present invention makes requests on processing, as shown in fig. 7, the terminal Including:Processor 701, memory 702 and communication bus 703, wherein,
Communication bus 703 is used to realize the connection communication between processor 701 and memory 702;
Processor 701 is used to perform the request handler stored in memory 702, to realize following steps:
When making requests on processing in MVC frameworks, hash table is set up using at least one request;The hash table includes: At least one identification information asked response message corresponding with the identification information each asked;Or, the hash table includes: The index information of at least one identification information asked response message corresponding with the identification information each asked;
Obtain the identification information of current request;
When there is the identification information of the current request in the hash table, obtain described current from the hash table Response message corresponding to the identification information of request;Or, the identification information pair of the current request is obtained from the hash table The index information for the response message answered, believes according to the response that the identification information of the index information acquisition current request is corresponding Breath;
When response message corresponding to the identification information of the current request is effective, the corresponding sound of the current request is exported Answer information.
Processor 701 is additionally operable to perform the request handler, to realize following steps:
When the identification information of the current request being not present in the hash table, obtain described current according to MVC frameworks Ask corresponding response message;
There is the identification information of the current request, and the identification information correspondence of the current request in the hash table Response message it is invalid when, the corresponding response message of the current request is obtained according to MVC frameworks.
Optionally, when the identification information of the current request being not present in hash table, work as according to being obtained MVC frameworks Preceding to ask after corresponding response message, processor 701 is additionally operable to perform the request handler, to realize following steps:Profit The hash table is updated with the corresponding response message of the identification information and the current request of the current request;
There is the identification information of current request in hash table, and current request response message corresponding to identification information without During effect, obtained according to MVC frameworks after the corresponding response message of the current request, processor 701 is additionally operable to perform the request Processing routine, to realize following steps:The hash table is updated using the corresponding response message of the current request of acquisition.Mark It can be Uniform Resource Identifier URI to know information.
When MVC frameworks are Spring MVC frameworks, processor 701, specifically in front controller Dispatcher In Servlet filter hash table is set up using at least one request;
Processor 701, is additionally operable to obtain the identification information of current request by the filter.
In actual applications, above-mentioned processor 701 can be application-specific IC (ASIC, Application Specific Integrated Circuit), digital signal processing device (DSPD, Digital Signal Processing Device), programmable logic device (PLD, Programmable Logic Device), FPGA, DSP, CPU, controller, micro- At least one of controller, microprocessor.It is to be appreciated that for different equipment, for realizing the above-mentioned work(of processor 701 The electronic device of energy can also be other, and the embodiment of the present invention is not especially limited.
Above-mentioned memory 702 can be volatile memory (volatile memory), such as random access memory (RAM, Random-Access Memory);Or nonvolatile memory (non-volatile memory), such as it is read-only to deposit Reservoir (ROM, Read-Only Memory), flash memory (flash memory), hard disk (HDD, Hard Disk Drive) Or solid state hard disc (SSD, Solid-State Drive);Or the combination of the memory of mentioned kind, and carried to processor 701 For instruction and data.
In addition, each functional module in the present embodiment can be integrated in a processing unit or each list Member be individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated unit both can be with Realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.
If the integrated unit realizes that being not intended as independent product is sold in the form of software function module Or in use, can be stored in a computer read/write memory medium, based on such understanding, the technical side of the present embodiment The part or all or part of the technical scheme that case substantially contributes to prior art in other words can be produced with software The form of product is embodied, and the computer software product is stored in a storage medium, including some instructions are to cause one Platform computer equipment (can be personal computer, server, or network equipment etc.) or processor (processor) perform sheet The all or part of step of embodiment methods described.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD Etc. it is various can be with the medium of store program codes.
Specifically, a kind of corresponding computer program of method that application program is run in terminal in the present embodiment refers to CD can be stored in by making, hard disk, on the storage medium such as USB flash disk, when corresponding with a kind of information processing method in storage medium Computer program instructions when being read or be performed by an electronic equipment, comprise the following steps:
When making requests on processing in view-model-controller MVC frameworks, hash table is set up using at least one request; The hash table includes:At least one identification information asked response message corresponding with the identification information each asked;Or, The hash table includes:The index of at least one identification information asked response message corresponding with the identification information each asked Information;
Obtain the identification information of current request;
When there is the identification information of the current request in the hash table, obtain described current from the hash table Response message corresponding to the identification information of request;Or, the identification information pair of the current request is obtained from the hash table The index information for the response message answered, believes according to the response that the identification information of the index information acquisition current request is corresponding Breath;
When response message corresponding to the identification information of the current request is effective, the corresponding sound of the current request is exported Answer information.
Optionally, the following steps stored in storage medium:The mark of the current request is not present in the hash table When knowing information, the corresponding response message of the current request is obtained according to MVC frameworks;
There is the identification information of the current request, and the identification information correspondence of the current request in the hash table Response message it is invalid when, the corresponding response message of the current request is obtained according to MVC frameworks.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program Product.Therefore, the shape of the embodiment in terms of the present invention can use hardware embodiment, software implementation or combine software and hardware Formula.Moreover, the present invention can be used can use storage in one or more computers for wherein including computer usable program code The form for the computer program product that medium is implemented on (including but is not limited to magnetic disk storage and optical memory etc.).
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product Figure and/or block diagram are described.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which is produced, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the scope of the present invention.

Claims (10)

1. a kind of method for asking processing, it is characterised in that methods described includes:
When making requests on processing in view-model-controller MVC frameworks, hash table is set up using at least one request;It is described Hash table includes:At least one identification information asked response message corresponding with the identification information each asked;Or, it is described Hash table includes:The index letter of at least one identification information asked response message corresponding with the identification information each asked Breath;
Obtain the identification information of current request;
When there is the identification information of the current request in the hash table, the current request is obtained from the hash table Response message corresponding to identification information;Or, the identification information that the current request is obtained from the hash table is corresponding The index information of response message, according to response message corresponding to the identification information of the index information acquisition current request;
When response message corresponding to the identification information of the current request is effective, the response message is exported.
2. according to the method described in claim 1, it is characterised in that methods described also includes:It is not present in the hash table During the identification information of the current request, the corresponding response message of the current request is obtained according to MVC frameworks;
There is the identification information of the current request in the hash table, and sound corresponding to identification information of the current request When answering information invalid, the corresponding response message of the current request is obtained according to MVC frameworks.
3. method according to claim 2, it is characterised in that described that the current request is not present in the hash table Identification information when, obtained according to MVC frameworks after the corresponding response message of the current request, methods described also includes:Utilize The identification information of the current request and the corresponding response message of the current request update the hash table;
There is the identification information of the current request in the hash table, and sound corresponding to identification information of the current request When answering information invalid, obtained according to MVC frameworks after the corresponding response message of the current request, methods described also includes:Utilize The corresponding response message of the current request obtained updates the hash table.
4. according to the method described in claim 1, it is characterised in that the identification information is Uniform Resource Identifier URI.
5. according to the method described in claim 1, it is characterised in that when the MVC frameworks are Spring MVC frameworks, the profit Setting up hash table with least one request includes:In the filter of front controller hash is set up using at least one request Table;
The identification information for obtaining current request includes:The identification information of current request is obtained by the filter.
6. a kind of terminal, it is characterised in that the terminal includes:Processor, memory and communication bus;Wherein,
The communication bus is used to realize the connection communication between processor and memory;
The processor is used to perform the request handler stored in memory, to realize following steps:
When making requests on processing in view-model-controller MVC frameworks, hash table is set up using at least one request;It is described Hash table includes:At least one identification information asked response message corresponding with the identification information each asked;Or, it is described Hash table includes:The index letter of at least one identification information asked response message corresponding with the identification information each asked Breath;
Obtain the identification information of current request;
When there is the identification information of the current request in the hash table, the current request is obtained from the hash table Response message corresponding to identification information;Or, the identification information that the current request is obtained from the hash table is corresponding The index information of response message, according to response message corresponding to the identification information of the index information acquisition current request;
When response message corresponding to the identification information of the current request is effective, the corresponding response letter of the current request is exported Breath.
7. terminal according to claim 6, it is characterised in that the processor is additionally operable to perform the request processing journey Sequence, to realize following steps:
When the identification information of the current request being not present in the hash table, the current request is obtained according to MVC frameworks Corresponding response message;
There is the identification information of the current request in the hash table, and sound corresponding to identification information of the current request When answering information invalid, the corresponding response message of the current request is obtained according to MVC frameworks.
8. terminal according to claim 7, it is characterised in that described that the current request is not present in the hash table Identification information when, obtained according to MVC frameworks after the corresponding response message of the current request, the processor is additionally operable to perform The request handler, to realize following steps:It is corresponding with the current request using the identification information of the current request Response message update the hash table;
There is the identification information of the current request in the hash table, and sound corresponding to identification information of the current request When answering information invalid, obtained according to MVC frameworks after the corresponding response message of the current request, the processor is additionally operable to perform The request handler, to realize following steps:Update described using the corresponding response message of the current request of acquisition Hash table.
9. a kind of computer-readable recording medium, it is characterised in that the computer-readable recording medium storage have one or Multiple programs, one or more of programs can be by one or more computing device, to realize following steps:
When making requests on processing in view-model-controller MVC frameworks, hash table is set up using at least one request;It is described Hash table includes:At least one identification information asked response message corresponding with the identification information each asked;Or, it is described Hash table includes:The index letter of at least one identification information asked response message corresponding with the identification information each asked Breath;
Obtain the identification information of current request;
When there is the identification information of the current request in the hash table, the current request is obtained from the hash table Response message corresponding to identification information;Or, the identification information that the current request is obtained from the hash table is corresponding The index information of response message, according to response message corresponding to the identification information of the index information acquisition current request;
When response message corresponding to the identification information of the current request is effective, the corresponding response letter of the current request is exported Breath.
10. storage medium according to claim 9, it is characterised in that one or more of programs can also be described One or more computing device, to realize following steps:
When the identification information of the current request being not present in the hash table, the current request is obtained according to MVC frameworks Corresponding response message;
There is the identification information of the current request in the hash table, and sound corresponding to identification information of the current request When answering information invalid, the corresponding response message of the current request is obtained according to MVC frameworks.
CN201710284269.0A 2017-04-26 2017-04-26 A kind of method and terminal for asking to handle Withdrawn CN107220294A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710284269.0A CN107220294A (en) 2017-04-26 2017-04-26 A kind of method and terminal for asking to handle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710284269.0A CN107220294A (en) 2017-04-26 2017-04-26 A kind of method and terminal for asking to handle

Publications (1)

Publication Number Publication Date
CN107220294A true CN107220294A (en) 2017-09-29

Family

ID=59944820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710284269.0A Withdrawn CN107220294A (en) 2017-04-26 2017-04-26 A kind of method and terminal for asking to handle

Country Status (1)

Country Link
CN (1) CN107220294A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108881373A (en) * 2018-04-27 2018-11-23 安徽四创电子股份有限公司 A kind of front end data method for stream processing based on MVC frame
CN112015797A (en) * 2020-08-31 2020-12-01 中国平安人寿保险股份有限公司 Data reading method and computer equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639603A (en) * 2014-11-27 2015-05-20 四川长虹电器股份有限公司 RESTful (representational state transfer) service design method based on Spring MVC
CN105187521A (en) * 2015-08-25 2015-12-23 努比亚技术有限公司 Service processing device and method
CN105843609A (en) * 2016-03-18 2016-08-10 浪潮软件集团有限公司 MVC frame based on Spring and MyBatis

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639603A (en) * 2014-11-27 2015-05-20 四川长虹电器股份有限公司 RESTful (representational state transfer) service design method based on Spring MVC
CN105187521A (en) * 2015-08-25 2015-12-23 努比亚技术有限公司 Service processing device and method
CN105843609A (en) * 2016-03-18 2016-08-10 浪潮软件集团有限公司 MVC frame based on Spring and MyBatis

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
铿锵玫瑰-RAIN: "SpringMVC Ehcache的缓存实现", 《HTTPS://BLOG.CSDN.NET/U011257574/ARTICLE/DETAILS/50723743》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108881373A (en) * 2018-04-27 2018-11-23 安徽四创电子股份有限公司 A kind of front end data method for stream processing based on MVC frame
CN108881373B (en) * 2018-04-27 2021-07-06 安徽四创电子股份有限公司 MVC (model view controller) framework based front-end data stream processing method
CN112015797A (en) * 2020-08-31 2020-12-01 中国平安人寿保险股份有限公司 Data reading method and computer equipment

Similar Documents

Publication Publication Date Title
CN104883658B (en) The processing method of virtual card information and system
CN105282245B (en) Cross-server message push system and method
CN105100090B (en) Communication method, server and system based on internal and external network separation
CN104809213B (en) Start the methods, devices and systems of application software client
CN105159533A (en) Mobile terminal and automatic verification code input method thereof
CN104731512B (en) The method, apparatus and terminal that picture is shared
CN107241212A (en) A kind of log processing method and device, equipment
CN105187521A (en) Service processing device and method
CN104951229B (en) Screenshot method and device
CN105682150A (en) Multilink intelligent shunting method and mobile terminal
CN106453652A (en) Log file uploading method and system
CN104731411A (en) Single-click action recognition method and device of mobile terminal
CN105573916A (en) Fault detection method and mobile terminal
CN105335055A (en) Self-response type realization method and system of menu as well as terminal equipment
CN107071161A (en) The aggregation display method and mobile terminal of icon in a kind of status bar
CN105827531A (en) Routing access method and terminal
CN106254522B (en) A kind of based terminal system, method and terminal
CN105302457A (en) Terminal control method and device
CN107220294A (en) A kind of method and terminal for asking to handle
CN105183327B (en) A kind of method of terminal and terminal operation
CN106899574A (en) Application program login method and terminal
CN106534498A (en) Control device and method of application folder and mobile terminal
CN107071820A (en) A kind of method of mobile terminal and switch contents Distributor
CN106911795A (en) A kind of data request processing device and method
CN107249070A (en) A kind of terminal and gamma adjusting method

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20170929