CN105120055B - Data processing method and terminal - Google Patents

Data processing method and terminal Download PDF

Info

Publication number
CN105120055B
CN105120055B CN201510359914.1A CN201510359914A CN105120055B CN 105120055 B CN105120055 B CN 105120055B CN 201510359914 A CN201510359914 A CN 201510359914A CN 105120055 B CN105120055 B CN 105120055B
Authority
CN
China
Prior art keywords
mode
date
data
calculating
input
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.)
Active
Application number
CN201510359914.1A
Other languages
Chinese (zh)
Other versions
CN105120055A (en
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 CN201510359914.1A priority Critical patent/CN105120055B/en
Publication of CN105120055A publication Critical patent/CN105120055A/en
Application granted granted Critical
Publication of CN105120055B publication Critical patent/CN105120055B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of data processing method and terminals, which comprises calculator is switched to the first calculating mode;Under the first calculating mode, first group of input data is obtained, the corresponding computation rule of mode is calculated according to first and handles first group of input data, obtain result data;Export the result data.

Description

Data processing method and terminal
Technical field
The present invention relates to data processing technique more particularly to a kind of data processing methods and terminal.
Background technique
Calculator is a Xiang Gongneng indispensable in terminal, but the function of calculator is limited, this is not frequently used in user Function.As the function of the raising that user requires calculator, calculator is gradually enriched, scientific calculator increases many triangles The calculating of function and power exponent.In some scenes, user may not only be intended to carry out numerical calculation, for example user wants to calculate Between date 2015.5.25 to date 5015.8.13 share how many days or calculation date 2015.5.25 plus 17 days be several Month which, for another example when user wants to calculate the average value of several groups of numbers, require to add up one group of number every time divided by number Data can be obtained, troublesome in poeration, user experience is low.
Summary of the invention
In order to solve the above technical problems, the embodiment of the invention provides a kind of data processing method and terminals.
Data processing method provided in an embodiment of the present invention is applied to the terminal with calculator, which comprises
The calculator is switched into the first calculating mode;
Under the first calculating mode, first group of input data is obtained, the corresponding calculating of mode is calculated according to first and advises First group of input data is then handled, result data is obtained;
Export the result data.
In the embodiment of the present invention, described first, which calculates mode, calculates mode for the date;
Correspondingly, described under the first calculating mode, first group of input data is obtained, calculates mode pair according to first The computation rule answered handles first group of input data, obtains result data, comprising:
Under date calculating mode, the first date and the second date are obtained;
The number of days being separated by between first date and second date is calculated, as a result data.
It is described under the first calculating mode in the embodiment of the present invention, first group of input data is obtained, according to the first meter The corresponding computation rule of calculation mode handles first group of input data, obtains result data, comprising:
Under date calculating mode, obtain the first date be added number of days or subtract each other number of days;
Using first date as from date, the date data as a result after being added number of days are calculated, or calculate phase Date after subtracting number of days data as a result.
In the embodiment of the present invention, the method also includes:
When calculator switches under date calculating mode, current date is shown as first date by default.
In the embodiment of the present invention, described first calculates mode as default calculating mode;The method also includes: it presets Computation rule.
Terminal provided in an embodiment of the present invention has calculator;The terminal includes:
Switch unit, for the calculator to be switched to the first calculating mode;
Input unit, for obtaining first group of input data under the first calculating mode;
Processing unit handles first group of input data for calculating the corresponding computation rule of mode according to first, obtains To result data;
Output unit, for exporting the result data.
In the embodiment of the present invention, described first, which calculates mode, calculates mode for the date;
The input unit is also used under date calculating mode, obtains the first date and the second date;
The processing unit is also used to calculate the number of days being separated by between first date and second date, as Result data.
In the embodiment of the present invention, the input unit is also used under date calculating mode, obtain the first date be added Number of days subtracts each other number of days;
The processing unit is also used to calculate the date conduct after being added number of days using first date as from date Result data, or calculate and subtract each other the data as a result of the date after number of days.
In the embodiment of the present invention, the output unit is also used to when calculator switches under date calculating mode, default Current date is shown as first date.
In the embodiment of the present invention, the terminal further include: described first calculates mode as default calculating mode;
Setting unit, for presetting computation rule.
In the technical solution of the embodiment of the present invention, terminal has calculator, which can not only carry out traditional number Value calculates, and can also handle certain nonumeric classes and calculate, as the date calculates.Specifically, computer has a variety of calculating modes, when When carrying out the calculating of nonumeric class, calculator is switched to the first calculating mode.Then single using input under the first calculating mode Member obtains first group of input data of user's input, then handles first group of input data according to computation rule, obtains number of results According to and export.Here, computation rule is corresponding with the first calculating mode, when it is to calculate mode on the date that first, which calculates mode, meter Calculate the regular mutually plus-minus then handled between date and number of days.Certainly, the first calculating mode can also be pre-defined by user, such as The data of input are averaging by definition, then computation rule is to average automatically to multiple data of input.For another example calculating the Chinese The stroke of word, then computation rule is to calculate its stroke number to the Chinese character of input automatically.The calculator function of the embodiment of the present invention It is abundant, facilitate a variety of applications met in actual conditions, also, user can be used for computation rule needed for oneself definition Experience is preferable.
Detailed description of the invention
The hardware structural diagram of Fig. 1 mobile terminal of each embodiment to realize the present invention;
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the flow diagram of the data processing method of the embodiment of the present invention one;
Fig. 4 is the flow diagram of the data processing method of the embodiment of the present invention two;
Fig. 5 is the flow diagram of the data processing method of the embodiment of the present invention three;
Fig. 6 is the structure composition schematic diagram of the terminal of the embodiment of the present invention one;
Fig. 7 is to calculate schematic diagram on the date of the embodiment of the present invention;
Fig. 8 is that the average of the embodiment of the present invention calculates schematic diagram.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
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 terminal of each embodiment of the present invention is realized in description with reference to the drawings.In subsequent description, using being used for Indicate the suffix of such as " module ", " component " or " unit " of element only for being conducive to the explanation of the embodiment of the present invention, There is no specific meanings for body.Therefore, " module " can be used mixedly with " component ".
Terminal can be implemented in a variety of manners.For example, terminal described in the embodiment of the present invention may include such as moving Mobile phone, smart phone, laptop, digit broadcasting receiver, personal digital assistant (PDA, Personal Digital Assistant), tablet computer (PAD), portable media player (PMP, Portable Media Player), navigation dress The fixed terminal of the terminal and such as number TV, desktop computer etc. set etc..Hereinafter it is assumed that terminal is mobile terminal. However, it will be understood by those skilled in the art that other than the element for being used in particular for mobile purpose, implementation according to the present invention The construction of mode can also apply to the terminal of fixed type.
Fig. 1 to realize the present invention the mobile terminal of each embodiment hardware configuration signal.
Mobile terminal 100 may include wireless communication unit 110, audio/video (A/V) input unit 120, user's input Unit 130, sensing unit 140, output unit 150, memory 160, interface unit 170, controller 180 and power supply unit 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 fewer 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 components, allows mobile terminal 100 and wireless communication system Or the radio communication between network.For example, wireless communication unit may include broadcasting reception module 111, mobile communication module 112, 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 from external broadcast management server via broadcast channel Relevant information.Broadcast channel may include satellite channel and/or terrestrial channel.Broadcast management server, which can be, to 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 may include TV broadcast singal, 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 receives.Broadcast singal can exist in a variety of manners, for example, its can with digital multimedia broadcasting (DMB, Digital Multimedia Broadcasting) electronic program guides (EPG, Electronic Program Guide), The electronic service guidebooks of digital video broadcast-handheld (DVB-H, Digital Video Broadcasting-Handheld) The form of (ESG, Electronic Service Guide) etc. and exist.Broadcasting reception module 111 can be by using each The broadcast system of seed type receives signal broadcast.Particularly, broadcasting reception module 111 can be by using such as multi-media broadcast Broadcast-ground (DMB-T, Digital Multimedia Broadcasting-Terrestrial), digital multimedia broadcasting-defend Star (DMB-S, Digital Multimedia Broadcasting-Satellite), digital video broadcast-handheld (DVB-H), The Radio Data System of forward link media (MediaFLO, Media Forward Link Only), received terrestrial digital broadcasting are comprehensive The number for servicing (ISDB-T, Integrated Services Digital Broadcasting-Terrestrial) etc. is wide It broadcasts system and receives digital broadcasting.Broadcasting reception module 111 may be constructed such that the various broadcast systems for being adapted to provide for broadcast singal And above-mentioned digit broadcasting system.It can be deposited via the received broadcast singal of broadcasting reception module 111 and/or broadcast related information Storage is 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 may include that voice is logical Talk about signal, video calling signal or according to text and/or Multimedia Message transmission and/or received various types of data.
The Wi-Fi (Wireless Internet Access) of the support mobile terminal of wireless Internet module 113.The module can be internally or externally It is couple to terminal.Wi-Fi (Wireless Internet Access) technology involved in the module may include Wireless LAN (WLAN, Wireless Local Area Networks) (Wi-Fi), WiMAX (Wibro), worldwide interoperability for microwave accesses (Wimax), high-speed downstream Link packet accesses (HSDPA, High Speed Downlink Packet Access) etc..
Short range communication module 114 is the module for supporting short range communication.Some examples of short-range communication technology include indigo plant Tooth, radio frequency identification (RFID, Radio Frequency Identification), Infrared Data Association (IrDA, Infrared Data Association), ultra wide band (UWB, Ultra Wideband), purple honeybee etc..
Location information module 115 is the module for checking or obtaining the location information of mobile terminal.Location information module Typical case be global positioning system (GPS, Global Positioning System).According to current technology, GPS mould Block 115 calculates range information from three or more satellites and correct time information and for the Information application of calculating three Angle, to according to longitude, latitude and highly accurately calculate three-dimensional current location information.Currently, it is used for calculating position Method with temporal information is using three satellites and by using the other calculated position of satellite correction and time The error of information.In addition, GPS module 115 can be by Continuous plus current location information in real time come calculating speed information.
A/V input unit 120 is for receiving audio or video signal.A/V input unit 120 may include 121 He of camera Microphone 1220, camera 121 is to the static map obtained in video acquisition mode or image capture mode by image capture apparatus The image data of piece or video is handled.Treated, and picture frame may be displayed on display unit 151.At camera 121 Picture frame after reason can store in memory 160 (or other storage mediums) or carry out via wireless communication unit 110 It sends, two or more cameras 1210 can be provided according to the construction of mobile terminal.Microphone 122 can be in telephone relation mould Sound (audio data) is received via microphone in formula, logging mode, speech recognition mode etc. operational mode, and can be incited somebody to action Such acoustic processing is audio data.Audio that treated (voice) data can be converted in the case where telephone calling model For the format output that can be sent to mobile communication base station via mobile communication module 112.Various types can be implemented in microphone 122 Noise eliminate (or inhibit) algorithm with eliminate noise that (or inhibition) generates during sending and receiving audio signal or Person's interference.
The order that user input unit 130 can be inputted according to user generates key input data to control each of mobile terminal Kind operation.User input unit 130 allows user to input various types of information, and may include keyboard, metal dome, touch Plate (for example, the sensitive component of detection due to the variation of resistance, pressure, capacitor etc. caused by being contacted), idler wheel, rocking bar etc. Deng.Particularly, when touch tablet is superimposed upon in the form of layer on display unit 151, touch screen can be formed.
Sensing unit 140 detects the current state of mobile terminal 100, (for example, mobile terminal 100 opens or closes shape State), the position of mobile terminal 100, user is for the presence or absence of contact (that is, touch input) of mobile terminal 100, mobile terminal 100 orientation, the acceleration or deceleration movement of mobile terminal 100 and direction etc., and generate for controlling mobile terminal 100 The order of operation or signal.For example, sensing unit 140 can sense when mobile terminal 100 is embodied as sliding-type mobile phone The sliding-type phone is to open or close.In addition, sensing unit 140 be able to detect power supply unit 190 whether provide electric power or Whether person's interface unit 170 couples with external device (ED).Sensing unit 140 may include that proximity sensor 1410 will combine below Touch screen is described this.
Interface unit 170 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example, External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing Line data port, 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 storage and use each of mobile terminal 100 for verifying user Kind of information and may include subscriber identification module (UIM, User Identify Module), client identification module (SIM, Subscriber Identity Module), Universal Subscriber identification module (USIM, Universal Subscriber Identity Module) etc..In addition, the device (hereinafter referred to as " identification device ") with identification module can take intelligence The form of card, therefore, identification device can be connect via port or other attachment devices with mobile terminal 100.Interface unit 170 It can be used for receiving the input (for example, data information, electric power etc.) from external device (ED) and transmit the input received One or more elements in mobile terminal 100 can be used for transmitting data between mobile terminal and external device (ED).
In addition, when mobile terminal 100 is connect with external base, interface unit 170 may be used as allowing will be electric by it Power, which is provided from pedestal to the path or may be used as of mobile terminal 100, allows the various command signals inputted from pedestal to pass through it It is transferred to the path of mobile terminal.The various command signals or electric power inputted from pedestal, which may be used as mobile terminal for identification, is The no signal being accurately fitted on pedestal.Output unit 150 is configured to provide with vision, audio and/or tactile manner defeated Signal (for example, audio signal, vision signal, alarm signal, vibration signal etc.) out.Output unit 150 may include display Unit 151, audio output module 152, alarm unit 153 etc..
Display unit 151 may be displayed on the information handled in mobile terminal 100.For example, when mobile terminal 100 is in electricity When talking about call mode, display unit 151 can show and converse or other communicate (for example, text messaging, multimedia file Downloading etc.) relevant user interface (UI, User Interface) or graphic user interface (GUI, Graphical User Interface).When mobile terminal 100 is in video calling mode or image capture mode, display unit 151 can be shown Show captured image and/or received image, the UI or GUI that show video or image and correlation function etc..
Meanwhile when display unit 151 and touch tablet 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 may include liquid crystal display (LCD, Liquid Crystal Display), thin film transistor (TFT) LCD (TFT-LCD, Thin Film Transistor-LCD), organic light-emitting diodes It manages in (OLED, Organic Light-Emitting Diode) display, flexible display, three-dimensional (3D) display etc. It is at least one.Some in these displays may be constructed such that transparence to allow user to watch from outside, 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 100 may include two or more display units (or other display devices), example Such as, mobile terminal may include outernal display unit (not shown) and inner display unit (not shown).Touch screen can be used for examining Survey touch input pressure and touch input position and touch input area.
Audio output module 152 can mobile terminal be in call signal reception pattern, call mode, logging mode, It is when under the isotypes such as speech recognition mode, broadcast reception mode, wireless communication unit 110 is received or in memory 160 The audio data transducing audio signal of middle storage and to export be sound.Moreover, audio output module 152 can provide and movement The relevant audio output of specific function (for example, call signal receives sound, message sink sound etc.) that terminal 100 executes. Audio output module 152 may include loudspeaker, buzzer etc..
Alarm unit 153 can provide output notifying event to mobile terminal 100.Typical event can be with Including calling reception, message sink, key signals input, touch input etc..Other than audio or video output, alarm unit 153 can provide output in different ways 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 (incomingcommunication), alarm list Member 153 can provide tactile output (that is, vibration) to notify to user.By providing such tactile output, even if 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 audio output module 152.
Memory 160 can store the software program etc. of the processing and control operation that are executed by controller 180, Huo Zheke Temporarily to store oneself data (for example, telephone directory, message, still image, video etc.) through exporting or will export.And And memory 160 can store about the vibrations of various modes and audio signal exported when touching and being applied to touch screen Data.
Memory 160 may include the storage medium of at least one type, and the storage medium includes flash memory, hard disk, more Media card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM, Random Access Memory), static random-access memory (SRAM, Static Random Access Memory), read-only memory (ROM, Read Only Memory), electrically erasable programmable read-only memory (EEPROM, Electrically Erasable Programmable Read Only Memory), programmable read only memory (PROM, Programmable Read Only Memory), magnetic storage, disk, CD etc..Moreover, mobile terminal 100 can execute memory with by network connection The network storage device of 160 store function cooperates.
The overall operation of the usually control mobile terminal of controller 180.For example, controller 180 executes and voice communication, data Communication, video calling etc. relevant control and processing.In addition, controller 180 may include for reproducing (or playback) more matchmakers The multi-media module 1810 of volume data, multi-media module 1810 can construct in controller 180, or can be structured as and control Device 180 processed separates.Controller 180 can be with execution pattern identifying processing, by the handwriting input executed on the touchscreen or figure Piece draws input and is identified as character or image.
Power supply unit 190 receives external power or internal power under the control of controller 180 and provides operation each member Electric power appropriate needed for part and component.
Various embodiments described herein can be to use the calculating of such as computer software, hardware or any combination thereof Machine readable medium is implemented.Hardware is implemented, embodiment described herein can be by using application-specific IC (ASIC, Application Specific Integrated Circuit), digital signal processor (DSP, Digital Signal Processing), digital signal processing device (DSPD, Digital Signal Processing Device), can Programmed logic device (PLD, Programmable Logic Device), field programmable gate array (FPGA, Field Programmable Gate Array), processor, controller, microcontroller, microprocessor, be designed to execute it is described herein At least one of the electronic unit of function implement, in some cases, such embodiment can be in controller 180 Middle implementation.For software implementation, the embodiment of such as process or function can with allow to execute at least one functions or operations Individual software module implement.Software code can be by the software application write with any programming language appropriate (or program) is implemented, and software code can store in memory 160 and executed by controller 180.
So far, oneself is through describing mobile terminal according to its function.In the following, 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., which is used as, to be shown 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 100 as shown in Figure 1 may be constructed such that using via frame or grouping send data it is all if any Line and wireless communication system and satellite-based communication system operate.
Referring now to Fig. 2 description communication system that wherein mobile terminal according to an embodiment of the present invention can operate.
Different air interface and/or physical layer can be used in such communication system.For example, used by communication system Air interface includes such as frequency division multiple access (FDMA, Frequency Division Multiple Access), time division multiple acess (TDMA, Time Division Multiple Access), CDMA (CDMA, Code Division Multiple Access) and Universal Mobile Communication System (UMTS, Universal Mobile Telecommunications System) is (special Not, long term evolution (LTE, Long Term Evolution)), global system for mobile communications (GSM) etc..As unrestricted Property example, description below is related to cdma communication system, but such introduction is equally applicable to other types of system.
With reference to Fig. 2, cdma wireless communication system may include multiple mobile terminals 100, multiple base station (BS, Base Station) 270, base station controller (BSC, Base Station Controller) 275 and mobile switching centre (MSC, Mobile Switching Center)280.MSC280 is configured to and Public Switched Telephony Network (PSTN, Public Switched Telephone Network) 290 formation interfaces.MSC280 is also structured to and can couple via back haul link BSC275 to base station 270 forms interface.Back haul link can be constructed according to any in several known interfaces, described Interface includes such as E1/T1, ATM, IP, PPP, frame relay, HDSL, ADSL or xDSL.It will be appreciated that as shown in Figure 2 System may include multiple BSC2750.
Each BS270 can service one or more subregions (or region), by multidirectional antenna or the day of direction specific direction Each subregion of line covering is radially far from BS270.Alternatively, each subregion can be by two or more for diversity reception Antenna covering.Each BS270, which may be constructed such that, supports multiple frequency distribution, and the distribution of each frequency 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, Base Transceiver Station) or other equivalent terms.In this case, term " base station " It can be used for broadly indicating single BSC275 and at least one BS270.Base station can also be referred to as " cellular station ".Alternatively, special Each subregion for determining BS270 can be referred to as multiple cellular stations.
As shown in Figure 2, broadcast singal is sent to by broadcsting transmitter (BT, Broadcast Transmitter) 295 The mobile terminal 100 operated in system.Broadcasting reception module 111 as shown in Figure 1 is arranged at mobile terminal 100 to connect Receive the broadcast singal sent by BT295.In fig. 2 it is shown that several global positioning system (GPS) satellites 300.Satellite 300 is helped Help at least one of multiple mobile terminals 100 of positioning.
In Fig. 2, multiple satellites 300 are depicted, it is understood that, it is useful to can use any number of satellite acquisition Location information.GPS module 115 as shown in Figure 1 is generally configured to cooperate with satellite 300 to obtain desired positioning and believe Breath.It substitutes GPS tracking technique or except GPS tracking technique, the other of the position that can track mobile terminal can be used Technology.In addition, at least one 300 property of can choose of GPS satellite or extraly processing satellite dmb transmission.
As a typical operation of wireless communication system, BS270 receives the reverse link from various mobile terminals 100 Signal.Mobile terminal 100 usually participates in call, information receiving and transmitting and other types of communication.Certain base station 270 is received each anti- It is handled in specific BS270 to link signal.The data of acquisition are forwarded to relevant BSC275.BSC provides call The mobile management function of resource allocation and the coordination including the soft switching process between BS270.The number that BSC275 will also be received According to MSC280 is routed to, the additional route service for forming interface with PSTN290 is provided.Similarly, PSTN290 with MSC280 forms interface, and MSC and BSC275 form interface, and BSC275 controls BS270 correspondingly with by forward link signals It is sent to mobile terminal 100.
Based on above-mentioned mobile terminal hardware configuration and communication system, each embodiment of the method for the present invention is proposed.
Fig. 3 is the flow diagram of the data processing method of the embodiment of the present invention one, the data processing method in this example Applied to terminal, the terminal have calculator, as shown in figure 3, the data processing method the following steps are included:
Step 301: the calculator is switched into the first calculating mode.
In the embodiment of the present invention, the terminal can be the electronic equipments such as mobile phone, tablet computer, notebook.The electronics Equipment has calculator, and the display interface of calculator can refer to Fig. 7 or Fig. 8.
Calculator in the embodiment of the present invention can not only carry out traditional numerical value and calculate, and can also handle certain nonumeric Class calculates, such as the date calculates.
It is calculated for traditional numerical value, calculator can handle addition subtraction multiplication and division operation, power operation, exponent arithmetic etc..
It is calculated for nonumeric class, calculator corresponding first calculates mode, and user can be switched and be calculated by handover operation The calculating mode of device is in calculator under the first calculating mode.
Specifically, when calculator is handled under the first calculating mode, calculator is automatically matched to the meter of the first calculating mode Rule is calculated, to perform corresponding processing to input data.
In the embodiment of the present invention, the first calculating mode can be calculator with the date calculate mode, stroke calculate mode, Maximum value calculation mode, minimum value calculating mode etc..First calculating mode can also be pre-defined by user, for example, user Defining the corresponding computation rule of the first calculating mode is to be averaging or sum or ask variance to input data.
Step 302: under the first calculating mode, obtaining first group of input data.
In the embodiment of the present invention, calculator has input interface, has multiple input keys on input interface, which presses Key can be physical button, be also possible to the virtual key as shown by the touching display screen of terminal.When user inputs multiple numbers According to when, calculator obtain first group of input data.
In one embodiment, first mode is calculated as date calculating mode, under date calculating mode, acquisition first day Phase and the second date.Referring to Fig. 7, the first calculating mode is that user can be confirmed that the key of output be shown when calculating mode on the date For the pattern on " date=", facilitate user to the current confirmation for calculating mode.Mode is calculated based on the date, user can input two A date, respectively the first date and the second date, such as 2015.05.25 and 2015.07.13, here, when the first of input When group input data is two dates, the sequencing on two dates is not distinguished, can calculate and be separated by between two dates Number of days.It can 2015.05.25-2015.07.13=2015.07.13-2015.05.25=48.
In the embodiment of the present invention, the format that the date of input need to meet the requirements, such as requiring the format on date is the date Format, separated between the date with " ", year is indicated with 4-digit number, and the moon and day are indicated with two digits respectively.
In another embodiment, under date calculating mode, obtain the first date be added number of days or subtract each other number of days.Ginseng According to Fig. 7, the first date was 2015.07.13, and subtracting each other number of days is 48, then 2015.07.13-48=2015.05.25.That is the date It is date 2015.05.25 2015.07.13 subtracting 48 days.It is of course also possible to carry out addition fortune to the date by putting in marks It calculates, such as 2015.07.13+10=2015.07.23.
In the embodiment of the present invention, the first calculating mode can also be pre-defined by user, such as be defined the data of input It is averaging, then computation rule is to average automatically to multiple data of input.Referring to Fig. 8, the first calculating mode is predefined When seeking three several average value modes, user being confirmed to, the key of output be shown as the pattern of " ÷ 3=", facilitate user couple The current confirmation for calculating mode.Based on three several average value modes are sought, user inputs three data, as first group of data number According to, such as 45,53,124.The mode of input can directly input three data, and oeprator is not necessarily between three data, is only needed It is separated with space.Three data can also be inputted, with adding up between three data.Then calculated result is (45+53+124) ÷ 3=74.
Step 303: calculating the corresponding computation rule of mode according to first and handle first group of input data, obtain result Data.
In one embodiment, first mode is calculated as date calculating mode, calculate first date and described second The number of days being separated by between date, as a result data.For example, 2015.05.25-2015.07.13=2015.07.13- 2015.05.25=48.
In another embodiment, using first date as from date, the date after being added number of days is calculated as knot Fruit data, or calculate and subtract each other the data as a result of the date after number of days.Such as 2015.07.13+10=2015.07.23.
Under predefined calculating mode, such as when seeking three several average value modes, input data 45+53+124, Then calculated result is (45+53+124) ÷ 3=74.
Step 304: exporting the result data.
After user presses confirmation output key, calculator exports the result data.
The calculator of the embodiment of the present invention can not only carry out traditional numerical value and calculate, and can also handle certain nonumeric classes It calculates, as the date calculates.Specifically, computer has a variety of calculating modes, and when carrying out the calculating of nonumeric class, calculator is cut It is changed to the first calculating mode.Then under the first calculating mode, first group of input number of user's input is obtained using input unit According to, then according to computation rule handle first group of input data, obtain result data and export.Here, computation rule and first Calculating mode is corresponding, and when it is to calculate mode on the date that first, which calculates mode, computation rule is then handled between date and number of days Mutually add and subtract.Certainly, the first calculating mode can also be pre-defined by user, such as the data of input are averaging by definition, then are counted Rule is calculated to average automatically to multiple data of input.For another example calculating the stroke of Chinese character, then computation rule is automatic right The Chinese character of input calculates its stroke number.The calculator function of the embodiment of the present invention is abundant, facilitate meet it is more in actual conditions Kind application, also, user can be with computation rule needed for oneself definition, for experiencing preferably.
Fig. 4 is the flow diagram of the data processing method of the embodiment of the present invention two, the data processing method in this example Applied to terminal, the terminal have calculator, as shown in figure 4, the data processing method the following steps are included:
Step 401: the calculator is switched into date calculating mode.
In the embodiment of the present invention, the terminal can be the electronic equipments such as mobile phone, tablet computer, notebook.The electronics Equipment has calculator, and the display interface of calculator can refer to Fig. 7.
Calculator in the embodiment of the present invention can not only carry out traditional numerical value and calculate, and can also handle certain nonumeric Class calculates, as the date calculates.
It is calculated for traditional numerical value, calculator can handle addition subtraction multiplication and division operation, power operation, exponent arithmetic etc..
It is calculated for nonumeric class, calculator corresponds to date calculating mode, and user can be switched and be calculated by handover operation The calculating mode of device is in calculator under date calculating mode.
Specifically, when calculator is handled under date calculating mode, calculator is automatically matched to the meter for calculating mode on the date Rule is calculated, to perform corresponding processing to input data.
Step 402: under date calculating mode, obtaining first group of input data.
In the embodiment of the present invention, calculator has input interface, has multiple input keys on input interface, which presses Key can be physical button, be also possible to the virtual key as shown by the touching display screen of terminal.When user inputs multiple numbers According to when, calculator obtains the first date and the second date.
In one embodiment, under date calculating mode, the first date and the second date are obtained.Referring to Fig. 7, can will use The key of family confirmation output is shown as the pattern on " date=", facilitates user to the current confirmation for calculating mode.Based on the date Calculation mode, user can input two dates, respectively the first date and the second date, for example, 2015.05.25 with 2015.07.13, here, when first group of input data of input is two dates, the sequencing on two dates is not distinguished, The number of days being separated by between two dates can be calculated.It can 2015.05.25-2015.07.13=2015.07.13- 2015.05.25=48.
In the embodiment of the present invention, the format that the date of input need to meet the requirements, such as requiring the format on date is the date Format, separated between the date with " ", year is indicated with 4-digit number, and the moon and day are indicated with two digits respectively.
In another embodiment, under date calculating mode, obtain the first date be added number of days or subtract each other number of days.Ginseng According to Fig. 7, the first date was 2015.07.13, and subtracting each other number of days is 48, then 2015.07.13-48=2015.05.25.That is the date It is date 2015.05.25 2015.07.13 subtracting 48 days.It is of course also possible to carry out addition fortune to the date by putting in marks It calculates, such as 2015.07.13+10=2015.07.23.
Step 403: the corresponding computation rule of mode being calculated according to the date and handles first group of input data, obtains result Data.
In one embodiment, it is to calculate mode on the date that the date, which calculates mode, calculates first date and described second The number of days being separated by between date, as a result data.For example, 2015.05.25-2015.07.13=2015.07.13- 2015.05.25=48.
In another embodiment, using first date as from date, the date after being added number of days is calculated as knot Fruit data, or calculate and subtract each other the data as a result of the date after number of days.Such as 2015.07.13+10=2015.07.23.
Under predefined calculating mode, such as when seeking three several average value modes, input data 45+53+124, Then calculated result is (45+53+124) ÷ 3=74.
Step 404: exporting the result data.
After user presses confirmation output key, calculator exports the result data.
The calculator of this law inventive embodiments can not only carry out traditional numerical value and calculate, and can also handle certain nonumeric Class calculates, as the date calculates.Specifically, computer has a variety of calculating modes, when carrying out the calculating of nonumeric class, by calculator It is switched to date calculating mode.Then under date calculating mode, first group of input of user's input is obtained using input unit Then data handle first group of input data according to computation rule, obtain result data and export.Here, computation rule and day Phase calculating mode is corresponding, and when it is to calculate mode on the date that the date, which calculates mode, computation rule is then handled between date and number of days Mutually plus-minus.The calculator function of the embodiment of the present invention is abundant, facilitates a variety of applications met in actual conditions, also, user It can be with computation rule needed for oneself definition, for experiencing preferably.
Fig. 5 is the flow diagram of the data processing method of the embodiment of the present invention three, the data processing method in this example Applied to terminal, the terminal have calculator, as shown in figure 5, the data processing method the following steps are included:
Step 501: presetting computation rule.
Step 502: the calculator is switched into default calculating mode.
In the embodiment of the present invention, the terminal can be the electronic equipments such as mobile phone, tablet computer, notebook.The electronics Equipment has calculator, and the display interface of calculator can refer to Fig. 8.
Calculator in the embodiment of the present invention can not only carry out traditional numerical value and calculate, and can also handle certain nonumeric Class calculates, such as calculating of averaging.
It is calculated for traditional numerical value, calculator can handle addition subtraction multiplication and division operation, power operation, exponent arithmetic etc..
It is calculated for nonumeric class, the corresponding default calculating mode of calculator, user can be switched and be calculated by handover operation The calculating mode of device is in calculator under default calculating mode.
Specifically, when under the default calculating mode of calculator processing, calculator is automatically matched to the meter of default calculating mode Rule is calculated, to perform corresponding processing to input data.
In the embodiment of the present invention, default calculating mode can be pre-defined by user, for example, user's definition is default to calculate mould The corresponding computation rule of formula is to be averaging to input data.It can certainly sum or ask variance.
Step 503: under the default calculating mode, obtaining first group of input data.
In the embodiment of the present invention, calculator has input interface, has multiple input keys on input interface, which presses Key can be physical button, be also possible to the virtual key as shown by the touching display screen of terminal.When user inputs multiple numbers According to when, calculator obtain first group of input data.
In the embodiment of the present invention, default calculating mode can be pre-defined by user, such as the data of input are asked flat by definition , then computation rule is to average automatically to multiple data of input.Referring to Fig. 8, the first calculating mode is predefined asks When three several average value modes, user can be confirmed that the key of output is shown as the pattern of " ÷ 3=", facilitate user to current The confirmation of calculating mode.Based on three several average value modes are sought, user inputs three data, as first group of Data Data, Such as 45,53,124.The mode of input can directly input three data, be not necessarily to oeprator between three data, only need to use Space separates.Three data can also be inputted, with adding up between three data.Then calculated result is (45+ 53+124) ÷ 3=74.
Step 504: first group of input data being handled according to the corresponding computation rule of default calculating mode, obtains result Data.
Under predefined calculating mode, such as when seeking three several average value modes, input data 45+53+124, Then calculated result is (45+53+124) ÷ 3=74.
Step 505: exporting the result data.
After user presses confirmation output key, calculator exports the result data.
The calculator of this law inventive embodiments can not only carry out traditional numerical value and calculate, and can also handle certain nonumeric Class calculates.Specifically, computer has a variety of calculating modes, when carrying out the calculating of nonumeric class, calculator is switched to default Calculating mode.Then under default calculating mode, first group of input data of user's input is obtained using input unit, then root First group of input data is handled according to computation rule, result data is obtained and exports.Here, computation rule and default calculating mode phase It is corresponding, such as definition by the data averaging of input, then computation rule is to average automatically to multiple data of input.This hair The calculator function of bright embodiment is abundant, facilitates a variety of applications met in actual conditions, also, user can be with oneself definition Required computation rule, for experiencing preferably.
Fig. 6 is the structure composition schematic diagram of the terminal of the embodiment of the present invention, as shown in fig. 6, the terminal has calculator; The terminal includes:
Switch unit 61, for the calculator to be switched to the first calculating mode;
Input unit 62, for obtaining first group of input data under the first calculating mode;
Processing unit 63 handles first group of input data for calculating the corresponding computation rule of mode according to first, Obtain result data;
Output unit 64, for exporting the result data.
In the embodiment of the present invention, described first, which calculates mode, calculates mode for the date;
The input unit 62 is also used under date calculating mode, obtains the first date and the second date;
The processing unit 63 is also used to calculate the number of days being separated by between first date and second date, makees For result data.
In the embodiment of the present invention, the input unit 62 is also used under date calculating mode, obtains the first date and phase Add number of days or subtracts each other number of days;
The processing unit 63 is also used to calculate the date work after being added number of days using first date as from date For result data, or calculate the data as a result of the date after subtracting each other number of days.
In the embodiment of the present invention, the output unit 64 is also used to when calculator switches under date calculating mode, is write from memory Recognize and current date is shown as first date.
In the embodiment of the present invention, the terminal further include: described first calculates mode as default calculating mode;
Setting unit 65, for presetting computation rule.
It will be appreciated by those skilled in the art that the function that each unit in above-mentioned terminal is realized can refer at aforementioned data The associated description of reason method understands.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (2)

1. a kind of data processing method, applied to the terminal with calculator, which is characterized in that the described method includes:
Preset computation rule;
The calculator is switched into the first calculating mode, described first calculates mode counts for default calculating mode, described first Calculation mode is that user is predetermined;
Under the first calculating mode, first group of input data is obtained, is calculated at the corresponding computation rule of mode according to first First group of input data is managed, result data is obtained;
Export the result data;
Wherein, described first mode is calculated as stroke calculating mode;
The computation rule is to calculate its stroke number to the Chinese character of input automatically.
2. a kind of terminal, which is characterized in that the terminal has calculator;The terminal includes:
Switch unit, for the calculator to be switched to the first calculating mode;
Input unit, under the first calculating mode, obtaining first group of input data, the first calculating mode is pre- Calculation mode is designed, the first calculating mode is that user is predetermined;
Processing unit handles first group of input data for calculating the corresponding computation rule of mode according to first, is tied Fruit data;
Output unit, for exporting the result data;
Setting unit, for presetting computation rule;
Wherein, described first mode is calculated as stroke calculating mode;
The computation rule is to calculate its stroke number to the Chinese character of input automatically.
CN201510359914.1A 2015-06-25 2015-06-25 Data processing method and terminal Active CN105120055B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510359914.1A CN105120055B (en) 2015-06-25 2015-06-25 Data processing method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510359914.1A CN105120055B (en) 2015-06-25 2015-06-25 Data processing method and terminal

Publications (2)

Publication Number Publication Date
CN105120055A CN105120055A (en) 2015-12-02
CN105120055B true CN105120055B (en) 2019-04-19

Family

ID=54667936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510359914.1A Active CN105120055B (en) 2015-06-25 2015-06-25 Data processing method and terminal

Country Status (1)

Country Link
CN (1) CN105120055B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271083B (en) * 2018-08-22 2021-06-29 创新先进技术有限公司 Data processing method and device, computing equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4386412A (en) * 1979-12-17 1983-05-31 Casio Computer Company, Ltd. Calculator with equation display device
CN1353348A (en) * 2000-11-02 2002-06-12 英新达(上海)电子有限公司 Calculator with automatic date memory and calculation functions
CN1410865A (en) * 2002-11-14 2003-04-16 无敌科技(西安)有限公司 System and method using hand writing mode to execute computing
CN103577157A (en) * 2013-11-13 2014-02-12 Tcl通讯(宁波)有限公司 Calculation method and device of mobile terminal calculator

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4386412A (en) * 1979-12-17 1983-05-31 Casio Computer Company, Ltd. Calculator with equation display device
CN1353348A (en) * 2000-11-02 2002-06-12 英新达(上海)电子有限公司 Calculator with automatic date memory and calculation functions
CN1410865A (en) * 2002-11-14 2003-04-16 无敌科技(西安)有限公司 System and method using hand writing mode to execute computing
CN103577157A (en) * 2013-11-13 2014-02-12 Tcl通讯(宁波)有限公司 Calculation method and device of mobile terminal calculator

Also Published As

Publication number Publication date
CN105120055A (en) 2015-12-02

Similar Documents

Publication Publication Date Title
CN105718027B (en) The management method and mobile terminal of background application
CN104991819B (en) Terminal applies switching method and device
CN104735255B (en) Multi-screen display method and system
CN104731512B (en) The method, apparatus and terminal that picture is shared
CN104899090B (en) The method, device and mobile terminal of fast dispatch application process
CN104915169B (en) Terminal applies multi-screen display method and device
CN104850799B (en) The method and mobile terminal of a kind of data in hiding mobile terminal
CN105045509B (en) A kind of device and method of editing picture
CN104967573B (en) A kind of monitoring method and terminal of data traffic
CN104881346B (en) The detection method and device of a kind of mobile terminal and its application program power consumption
CN105721002B (en) A kind of terminal filtering method, system, device and terminal can be filtered
CN104881219B (en) A kind of mobile terminal and its frame auxiliary input method and device
CN104915127B (en) A kind of membrane keyboard method to set up and device and mobile terminal
CN105430258B (en) A kind of method and apparatus of self-timer group photo
CN104850325A (en) Mobile terminal application processing method and device
CN104735254B (en) terminal screen locking method and system
CN104954582B (en) A kind of method and device for initiating speed dialling according to pressing touch-control
CN104834473B (en) The method and device of input
CN104810033B (en) Audio frequency playing method and device
CN105049610B (en) A kind of input method and terminal
CN105260096B (en) A kind of method and mobile terminal controlling user's operation
CN104837122B (en) Multi-party communications method, terminal and system
CN105389007A (en) Application processing apparatus and method, and mobile terminal
CN105487710B (en) Screen video recorder and method based on pressure screen
CN105357188B (en) A kind of method that realizing WIFI connections, server and mobile terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant