CN107818022A - Application programming interfaces merging method, mobile terminal and computer-readable recording medium - Google Patents

Application programming interfaces merging method, mobile terminal and computer-readable recording medium Download PDF

Info

Publication number
CN107818022A
CN107818022A CN201711005557.4A CN201711005557A CN107818022A CN 107818022 A CN107818022 A CN 107818022A CN 201711005557 A CN201711005557 A CN 201711005557A CN 107818022 A CN107818022 A CN 107818022A
Authority
CN
China
Prior art keywords
interface
merging
startup
value
log
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.)
Granted
Application number
CN201711005557.4A
Other languages
Chinese (zh)
Other versions
CN107818022B (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 CN201711005557.4A priority Critical patent/CN107818022B/en
Publication of CN107818022A publication Critical patent/CN107818022A/en
Application granted granted Critical
Publication of CN107818022B publication Critical patent/CN107818022B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of application programming interfaces merging method, mobile terminal and computer-readable recording medium, methods described includes:During application program launching, multiple startup interfaces that request is sent to server are intercepted;Multiple startup interfaces are merged to obtain the first merging interface and corresponding first merging interface parameters;Sent to server and carry the first of the first merging interface parameters the first merging parameter value for merging interface requests and the reception server return;First merging parameter value is decomposed into multiple interface parameters values corresponding with starting interface and is distributed to each startup interface so that respectively startup interface completes the startup of application program.Compared with prior art, the present invention realizes the startup interface that carries out automatically dynamic in real time and merged, and interface incorporates the interface with log-on message when merging, improve the integrated level and comprehensive of interface merging, reduce the call number of interface so that the toggle speed of application program is obviously improved.

Description

Application programming interfaces merging method, mobile terminal and computer-readable recording medium
Technical field
The present invention relates to technical field of mobile terminals, more particularly to a kind of application programming interfaces merging method, mobile terminal And computer-readable recording medium.
Background technology
During application program launching, multiple interface loading resources can be called.Specifically, multiple interfaces are initiated to server respectively HTTP request, the resource that then the reception server returns., in the prior art can be right in order to improve the toggle speed of application program The startup interface of application program merges, that is, after merging together to server ask resource, but at present many applications It is required for account to carry out login use, therefore, many interfaces are all the log-on messages with user.Due to stepping on for each user It is all different to record information, so typically not doing merging treatment for this kind of interface when merging interface in the prior art.Therefore, it is existing Problems be present in the merging mode in technology:1. still there is part of interface not merge in start-up course.2. band logs in letter The interface interchange speed of breath is not still improved.3. work as in start-up course, if user is that logging status, application have been opened Dynamic speed can substantially reduce.So as to cause interface to merge raising and unobvious for application toggle speed, interface conjunction is wasted And cost, can not improve well again using toggle speed and reduce mobile terminal start power consumption.
Therefore, it is necessary to provide a kind of application programming interfaces merging method, mobile terminal and computer-readable storage Medium solves above-mentioned technical problem.
The content of the invention
It is a primary object of the present invention to propose a kind of application programming interfaces merging method, mobile terminal and computer Readable storage medium storing program for executing, it is intended to which solve existing interface folding causes to apply that can not merge with the interface of log-on message Toggle speed improves unconspicuous problem.
First, to achieve the above object, the present invention provides a kind of mobile terminal, and the mobile terminal includes memory, place Manage device and be stored in the application programming interfaces consolidation procedure that can be run on the memory and on the processor, the application Following steps are realized when routine interface consolidation procedure is by the computing device:
During application program launching, multiple startup interfaces that request is sent to server are intercepted, wherein, the startup interface bag Include generic interface and the interface with log-on message;
Multiple startup interfaces are merged to obtain the first merging interface and corresponding first merging interface parameters;
The the first merging interface requests for carrying the first merging interface parameters are sent to the server and receive institute State server return first merges parameter value, wherein, carry described step in the request header of the first merging interface requests Information is recorded to identify the interface with log-on message;
Described first merging parameter value is decomposed into multiple interface parameters values corresponding with the startup interface and is distributed to Each startup for starting interface so that each startup interface completes the application program.
Alternatively, the processor is additionally operable to perform the application programming interfaces consolidation procedure, to realize following steps:
Judge whether current be that application program starts first;
If starting first, the CRC check code of the interface parameters value by each interface with log-on message is calculated;
The interface parameters value and CRC check code for preserving the interface with log-on message are locally deposited in the mobile terminal Store up space;
If not starting first, parameter value is merged according to first received and updates the mobile terminal local storage space The interface parameters value and CRC check code preserved.
Alternatively, the processor is additionally operable to perform the application programming interfaces consolidation procedure, to realize following steps:
When application program is in logging status operation, is operated according to user to the server and send corresponding second conjunction And interface requests and the second merging parameter value for receiving the server return;
According to the described second interface parameters for merging the parameter value renewal mobile terminal local storage space preservation Value and CRC check code.
Alternatively, application programming interfaces consolidation procedure described in the computing device is taken with realizing to send to the server First with the described first merging interface parameters specifically includes the step of merging interface requests:
Judge that local storage space whether there is interface parameters value corresponding to the interface with log-on message;
If so, obtain the local CRC check that interface parameters value corresponding to the local interface with log-on message be present Code;
The local CRC check code is write so that the service simultaneously in the request header of the described first merging interface requests Device determines the need for returning to the band according to the comparative result of the local CRC check code and the CRC check code of server side Interface parameters value corresponding to the interface of log-on message.
Meanwhile the present invention also provides a kind of application programming interfaces merging method, applied to mobile terminal, the application program Interface merging method comprises the following steps:
During application program launching, multiple startup interfaces that request is sent to server are intercepted, wherein, the startup interface bag Include generic interface and the interface with log-on message;
Multiple startup interfaces are merged to obtain the first merging interface and corresponding first merging interface parameters;
The the first merging interface requests for carrying the first merging interface parameters are sent to the server and receive institute State server return first merges parameter value, wherein, carry described step in the request header of the first merging interface requests Information is recorded to identify the interface with log-on message;
Described first merging parameter value is decomposed into multiple interface parameters values corresponding with the startup interface and is distributed to Each startup for starting interface so that each startup interface completes the application program.
Alternatively, methods described also includes:
Judge whether current be that application program starts first;
If starting first, the CRC check code of the interface parameters value by each interface with log-on message is calculated;
The interface parameters value and CRC check code for preserving the interface with log-on message are locally deposited in the mobile terminal Store up space;
If not starting first, parameter value is merged according to first received and updates the mobile terminal local storage space The interface parameters value and CRC check code preserved.
Alternatively, methods described also includes:
When application program is in logging status operation, is operated according to user to the server and send corresponding second conjunction And interface requests and the second merging parameter value for receiving the server return;
According to the described second interface parameters for merging the parameter value renewal mobile terminal local storage space preservation Value and CRC check code.
Alternatively, the first merging interface that the first merging interface parameters is carried to server transmission please The step of asking specifically includes:
Judge locally to whether there is interface parameters value corresponding to the interface with log-on message;
If so, obtain the local CRC check that interface parameters value corresponding to the local interface with log-on message be present Code;
The local CRC check code is write so that the service simultaneously in the request header of the described first merging interface requests Device determines the need for returning to the band according to the comparative result of the local CRC check code and the CRC check code of server side Interface parameters value corresponding to the interface of log-on message.
Alternatively, it is described that described first merging parameter value is decomposed into multiple interface parameters corresponding with the startup interface It is worth and is distributed to each startup interface so that each startup interface is specially the step of completing the startup of the application program:
Described first merging parameter value is decomposed into multiple interface parameters values corresponding with the startup interface;
When exist it is any startup interface corresponding to interface parameters value be null value when, from the mobile terminal local storage space Search for interface parameters value corresponding to the startup interface that the interface parameters value is null value and update and connect corresponding to the startup interface Mouth parameter value is the value searched;
Interface parameters value corresponding to each startup interface is distributed to each startup interface so that each startup connects Mouth completes the startup of the application program.
In addition, to achieve the above object, the present invention also provides a kind of computer-readable recording medium, described computer-readable Application programming interfaces consolidation procedure is stored with storage medium, it is real when the application programming interfaces consolidation procedure is executed by processor Now such as the step of above-mentioned application programming interfaces merging method.
Compared to prior art, application programming interfaces merging method, mobile terminal and computer proposed by the invention can Storage medium is read, in application program launching, intercepts multiple startup interfaces that request is sent to server;By multiple startup interfaces Merge to obtain the first merging interface and corresponding first merging interface parameters;Sent to server and carry the first merging The first of interface parameters merges first that interface requests and the reception server return and merges parameter value;Parameter value will be merged to be decomposed into Multiple interface parameters values corresponding with starting interface are simultaneously distributed to each startup interface so that respectively starting interface completes application program Start.Compared with prior art, the present invention realizes the startup interface that carries out automatically dynamic in real time and merged, and during interface merging The interface with log-on message is incorporated, the integrated level and comprehensive of interface merging is improved, reduces the call number of interface, make The toggle speed for obtaining application program is obviously improved.
Brief description of the drawings
Fig. 1 is the hardware architecture diagram for realizing each one optional mobile terminal of embodiment of the present invention;
Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention;
Fig. 3 is the high-level schematic functional block diagram of application programming interfaces consolidation procedure first embodiment of the present invention;
Fig. 4 is the high-level schematic functional block diagram of application programming interfaces consolidation procedure second embodiment of the present invention;
Fig. 5 is the implementation process diagram of application programming interfaces merging method first embodiment of the present invention;
Fig. 6 is the implementation process diagram of application program launching merging method second embodiment of the present invention;
Fig. 7 is interface merging process schematic diagram when application program A starts.
Reference:
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
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.
In follow-up description, the suffix using such as " module ", " part " or " unit " for representing element is only Be advantageous to the explanation of the present invention, itself there is no a specific meaning.Therefore, " module ", " part " or " unit " can mix Ground uses.
Terminal can be implemented in a variety of manners.For example, the terminal described in the present invention can include such as mobile phone, flat board Computer, notebook computer, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable Media player (Portable Media Player, PMP), guider, wearable device, Intelligent bracelet, pedometer etc. move Dynamic terminal, and the fixed terminal such as digital TV, desktop computer.
It will be illustrated in subsequent descriptions by taking mobile terminal as an example, it will be appreciated 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.
Referring to Fig. 1, its hardware architecture diagram for a kind of mobile terminal of each embodiment of the realization present invention, the shifting Dynamic terminal 100 can include:RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103rd, A/V (audio/video) input block 104, sensor 105, display unit 106, user input unit 107, interface unit 108th, the part such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1 Mobile terminal structure does not form the restriction to mobile terminal, and mobile terminal can be included than illustrating more or less parts, Either combine some parts or different parts arrangement.
The all parts of mobile terminal are specifically introduced with reference to Fig. 1:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, the reception and transmission of signal, specifically, by base station Downlink information receive after, handled to processor 110;In addition, up data are sent to base station.Generally, radio frequency unit 101 Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrate Frequency unit 101 can also be communicated by radio communication with network and other equipment.Above-mentioned radio communication can use any communication Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division Multiple Access, WCDMA), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, FDD Long Term Evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time division duplex Long Term Evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102 Sub- mail, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 1 shows Go out WiFi module 102, but it is understood that, it is simultaneously not belonging to must be configured into for mobile terminal, completely can be according to need To be omitted in the essential scope for do not change invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or WiFi module 102 it is receiving or It is sound that the voice data stored in memory 109, which is converted into audio signal and exported,.Moreover, audio output unit 103 The audio output related to the specific function that mobile terminal 100 performs can also be provided (for example, call signal receives sound, disappeared Breath receives sound etc.).Audio output unit 103 can include loudspeaker, buzzer etc..
A/V input blocks 104 are used to receive audio or video signal.A/V input blocks 104 can include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the static images or the view data of video obtained in image capture mode by image capture apparatus (such as camera) are carried out Reason.Picture frame after processing may be displayed on display unit 106.Picture frame after the processing of graphics processor 1041 can be deposited Storage is transmitted in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (voice data), and can be voice data by such acoustic processing.Audio (voice) data after processing can To be converted to the form output that mobile communication base station can be sent to via radio frequency unit 101 in the case of telephone calling model. Microphone 1042 can implement various types of noises and eliminate (or suppression) algorithm to eliminate (or suppression) in reception and send sound Caused noise or interference during frequency signal.
Mobile terminal 100 also includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity transducer can close when mobile terminal 100 is moved in one's ear Display panel 1061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (general For three axles) size of acceleration, size and the direction of gravity are can detect that when static, the application available for identification mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, The other sensors such as hygrometer, thermometer, infrared ray sensor, will not be repeated here.
Display unit 106 is used for the information for showing the information inputted by user or being supplied to user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configures display panel 1061.
User input unit 107 can be used for the numeral or character information for receiving input, and produce the use with mobile terminal The key signals input that family is set and function control is relevant.Specifically, user input unit 107 may include contact panel 1071 with And other input equipments 1072.Contact panel 1071, also referred to as touch-screen, collect touch operation of the user on or near it (for example user uses any suitable objects or annex such as finger, stylus on contact panel 1071 or in contact panel 1071 Neighbouring operation), and corresponding attachment means are driven according to formula set in advance.Contact panel 1071 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it Contact coordinate is converted into, then gives processor 110, and the order sent of reception processing device 110 and can be performed.In addition, can To realize contact panel 1071 using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves.Except contact panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap Include but be not limited to physical keyboard, in function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc. One or more, do not limit herein specifically.
Further, contact panel 1071 can cover display panel 1061, detect thereon when contact panel 1071 or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, contact panel 1071 and display panel 1061 be the part independent as two to realize the input of mobile terminal and output function, but in certain embodiments, can Input and the output function of mobile terminal are realized so that contact panel 1071 and display panel 1061 is integrated, is not done herein specifically Limit.
Interface unit 108 is connected the interface that can pass through as at least one external device (ED) with mobile terminal 100.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..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with For transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storage software program and various data.Memory 109 can mainly include storing program area And storage data field, wherein, storing program area can storage program area, application program (such as the sound needed at least one function Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as Voice data, phone directory etc.) etc..In addition, memory 109 can include high-speed random access memory, can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the whole mobile terminal of connection Individual part, by running or performing the software program and/or module that are stored in memory 109, and call and be stored in storage Data in device 109, the various functions and processing data of mobile terminal are performed, so as to carry out integral monitoring to mobile terminal.Place Reason device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated Device is managed, wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor is main Handle radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) to all parts power supply, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, so as to realize management charging by power-supply management system, put The function such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also will not be repeated here including bluetooth module etc..
For the ease of understanding the embodiment of the present invention, the communications network system being based on below to the mobile terminal of the present invention enters Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention, the communication network system Unite as the LTE system of universal mobile communications technology, the UE that the LTE system includes communicating connection successively (User Equipment, is used Family equipment) 201, E-UTRAN (Evolved UMTS Terrestrial Radio Access Network, evolved UMTS lands Ground wireless access network) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP operation 204。
Specifically, UE201 can be above-mentioned terminal 100, and here is omitted.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning Journey (backhaul) (such as X2 interface) is connected with other eNodeB2022, and eNodeB2021 is connected to EPC203, ENodeB2021 can provide UE201 to EPC203 access.
EPC203 can include MME (Mobility Management Entity, mobility management entity) 2031, HSS (Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving Gate Way, Gateway) 2034, PGW (PDN Gate Way, grouped data network gateway) 2035 and PCRF (Policy and Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 be processing UE201 and The control node of signaling between EPC203, there is provided carrying and connection management.HSS2032 is all to manage for providing some registers Such as the function of attaching position register (not shown) etc, and preserve some and used about service features, data rate etc. The special information in family.All customer data can be transmitted by SGW2034, and PGW2035 can provide UE 201 IP Address is distributed and other functions, and PCRF2036 is strategy and the charging control strategic decision-making of business data flow and IP bearing resources Point, it selects and provided available strategy and charging control decision-making with charge execution function unit (not shown) for strategy.
IP operation 204 can include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia System) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art it is to be understood that the present invention not only Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with And following new network system etc., do not limit herein.
Based on the above-mentioned hardware configuration of mobile terminal 100 and communications network system, each embodiment of the inventive method is proposed.
Embodiment one:
First, the present invention proposes a kind of mobile terminal, and the mobile terminal includes memory, processor and is stored in described On memory and the application programming interfaces consolidation procedure 400 that can run on the processor.
As shown in figure 3, it is the high-level schematic functional block diagram of the first embodiment of application program launching consolidation procedure 400 of the present invention. In the present embodiment, the application program launching consolidation procedure 400 can be divided into one or more modules, it is one or Multiple modules are stored in the memory 109 of the mobile terminal 100, and (are in the present embodiment by one or more processors The controller 110) it is performed, to complete the present invention.For example, in figure 3, the application program launching consolidation procedure 400 can To be divided into blocking module 401, merging module 402, request module 403 and distribution module 404.Module alleged by the present invention Refer to a series of a kind of acquisition machine programmed instruction sections that can complete specific function, than obtaining machine program more suitable for describing software Implementation procedure in the mobile terminal 100.Above-mentioned each functional module 401-404 concrete function will be carried out below detailed Description.Wherein:
Blocking module 401, multiple startup interfaces of request are sent to server in application program launching, intercepting;
Specifically, application program can call multiple interfaces (starting interface) in startup stage, multiple interfaces that start are to clothes Business device initiates request, can complete application program after each startup interface all receives the interface parameters value of server return afterwards Start-up course, here, for it is many offer account login features application programs for, interface on startup will be divided into Two major classes.One kind is the interface unrelated with user, i.e. generic interface, and one kind is the interface relevant with user, i.e. band log-on message Interface.It will be usually that the interface merging method of different application is hard-coded in using journey that the interface of prior art, which merges, In sequence, also, because the log-on message of each user is different, so not closed typically for the interface with log-on message And handle, and merged just for generic interface, and the present invention is dynamically to enter line interface in real time to merge, and interface Merging both includes generic interface, also includes the interface with log-on message.Specifically, the present invention can block in application program launching Multiple startup interfaces to server transmission request are cut to prevent each startup interface from initiating to ask to server.Such as:Work as application When program A startup stages need to call startup interface 1, startup interface 2 and start interface 3, application programming interfaces of the present invention close And method can intercept these and start interface after scanning to these startup interfaces, and these is started interface and enter wait state, With etc. interface parameters value to be returned.In the present embodiment, it is specially http request to start the request that interface is sent to server.
Merging module 402, for multiple startup interfaces to be merged to obtain the first merging interface and corresponding First merges interface parameters;
Request module 403, the described first the first merging for merging interface parameters is carried for being sent to the server Interface requests simultaneously receive the first merging parameter value that the server returns;
Specifically, after multiple startup interfaces are intercepted, the plurality of startup interface can be merged into an interface, merging obtains Interface be designated as the first merging interface, and carry out start interface merge when can by it is each startup interface interface parameters reject log in Merged after information, obtain corresponding first and merge interface parameters.The form of the first merging interface parameters is as follows:{ start Interface 1:Parameter 1, start interface 2:Parameter 2, start interface 3:Parameter 3 ... ... starts interface n:Parameter n }, n represents to apply journey Sequence needs to call n startup interface when starting.For the interface with log-on message, its log-on message is typically also contained in the interface Interface parameters in, such as carry log-on message startup interface 1, its interface parameters is parameter 1+ log-on messages, and same For application program in same one-shot, the log-on message of all interface institute bands with log-on message is all identical, therefore, in order to avoid Duplicate message occupies redundant space, reduces the space merged shared by parameter, improves the efficiency that interface merges, can be connect each Mouth identical log-on message is placed on first sent to server and merged in the request header of interface requests, by being taken in request header With log-on message to mark the interface with log-on message.Assuming that have 5 startup interfaces, respectively start interface 1, start interface 2, Start interface 3, start interface 4, start interface 5.It is to need band user wherein to start interface 1, start interface 3 and start interface 5 Log-on message.So in request header, it is possible to information as increase:{ log-on message:ID, API:{ start interface 1, start interface 3, start interface 5, then this 5 startup interfaces are merged, remain general in interface parameters is merged Description, such as { start interface 1:Parameter 1, start interface 2:Parameter 2, start interface 3:Parameter 3, start interface 4:Parameter 4, Start interface 5:Parameter 5 }.The the first merging interface requests for merging interface parameters and log-on message are carried when server receives Afterwards, first it can merge interface parameters and log-on message according to this and search corresponding interface parameters value, and each be connect what is found Mouth parameter value merges according to the form for merging interface parameters, merges parameter value simultaneously as first to obtain a merging parameter value Return.Such as:The form of the first merging parameter value is as follows:{ start interface 1:Parameter value 1, start interface 2:Parameter value 2, start Interface 3:Parameter value 3 ... ... starts interface n:Parameter value n }, wherein parameter value n represents to start the interface parameters needed for interface n Value.Meanwhile server can merge the generic interface in interface by first according to the mark of log-on message entrained in request header Carry out separating caching with the interface with log-on message, still so that above-mentioned 5 start interface as an example, without the merging interface of log-on message Cache key (key) starts interface 4_ parameters 4 to start interface 2_ parameters 2_;Merging interface cache key with log-on message is user ID_ starts interface 1_ parameters 1_ IDs _ startup interface 3_ parameters 3_ and starts interface 5_ parameters 5, meanwhile, parameter corresponding to preservation Value, for example, start interface 2_ parameter values 2_ start interface 4_ parameter values 4 and ID _ startup interface 1_ parameter value 1_ IDs _ Start interface 3_ parameter values 3_ and start interface 5_ parameter values 5, when such mobile terminal performs merging interface again, it is possible to Directly read from the caching of server side, system can be greatly improved without carrying out computing repeatedly for parameter value in server Performance and return speed.
Distribution module 404, join for the merging parameter value to be decomposed into multiple interfaces corresponding with the startup interface Numerical value is simultaneously correspondingly distributed to each startup for starting interface so that each startup interface completes the application program.
Specifically, after mobile terminal receives the merging parameter value of server return, the merging parameter value can be carried out Decompose to obtain the interface parameters value needed for each startup interface, and be correspondingly distributed to each startup interface waited.Such as The merging parameter value that server returns is { startup interface 1:Parameter value 1, start interface 2:Parameter value 2, start interface 3:Parameter value 3, start interface 4:Parameter value 4, start interface 5:Parameter value 5 } when, mobile terminal is decomposed to the merging parameter value is joined Numerical value 1, parameter value 2, parameter value 3, parameter value 4, parameter value 5, parameter value 1 is distributed to starts interface 1 afterwards, by parameter value 2 It is distributed to and starts interface 2, parameter value 3 is distributed to and starts interface 3, parameter value is distributed to and starts interface 4, and by parameter value 5 are distributed to startup interface 5, and the startup of application program can be completed after each startup interface to return value.
Fig. 7 is refer to, Fig. 7 is interface merging process schematic diagram when application program A starts, as shown in fig. 7, application program Need to call when A starts and start interface 1, start interface 2, start interface 3, start interface 4 and start interface 5, wherein, start Interface 1,3,5 for need the interface with log-on message, then in start-up course, can will start interface 1, start interface 2, start connect Mouth 3, startup interface 4 and startup interface 5 merge to obtain a merging interface X and merge interface parameters, service utensil There is unified call address, if unified call address is http://app.nubia.com/api_united, afterwards request module 403 send the merging interface requests for carrying merging interface parameters and log-on message, service to the unified call address of server Device corresponding interface parameters value is searched according to log-on message and each interface parameters merged in interface parameters and merge and Obtain that after merging parameter application program A can be returned to, then application program A will merge parameter decomposition for interface parameters value 1, interface Parameter value 2, interface parameters value 3, interface parameters value 4 and interface parameters value 5 are simultaneously distributed to corresponding startup interface 1, opened respectively Mobile interface 2, startup interface 3, startup connect 4 and start interface 5.It is json string formats wherein to merge interface parameters.
By above-mentioned module 401-404, application programming interfaces consolidation procedure of the present invention in application program launching, intercept to Server sends multiple startup interfaces of request;Multiple startup interfaces are merged to obtain the first merging interface and corresponding First merges interface parameters;The the first merging interface requests for carrying the first merging interface parameters are sent to server and receive clothes The first merging parameter value that business device returns;Parameter value will be merged to be decomposed into multiple interface parameters values corresponding with starting interface and divide Each startup interface is issued so as to respectively start the startup that interface completes application program, it is achieved thereby that dynamically being opened automatically in real time Mobile interface merge, and interface merge when incorporate the interface with log-on message, improve interface merging integrated level and comprehensively Property, reduce the call number of interface so that the toggle speed of application program is obviously improved.
Embodiment two:
Further, the first embodiment based on the invention described above application programming interfaces consolidation procedure 400, the present invention is proposed The second embodiment of application programming interfaces consolidation procedure 400.Fig. 4 is refer to, Fig. 4 is application programming interfaces consolidation procedure of the present invention The high-level schematic functional block diagram of 400 second embodiments, compared with first embodiment, in the present embodiment, application programming interfaces merge journey Sequence 400 also includes correction verification module 405 and preserving module 406.In the present embodiment, each functional module is described as follows:
Correction verification module 405, for judging whether be currently that application program starts first;If starting first, calculate by each The CRC check code of the interface parameters value of the individual interface with log-on message;
Preserving module 406, for preserve the interface with log-on message interface parameters value and CRC check code in institute State mobile terminal local storage space;And
When application program not start first, parameter value is merged according to first received and updates the mobile terminal sheet The interface parameters value and CRC check code that ground memory space space preserves.
In the present embodiment, it is contemplated that user will not operate to application program before being initiated, and start it is latter as then For logging status, that is to say, that operation of the user to application program under its logging status is had been saved in server side.But Be in the presence of a part scene be that user has multiple mobile terminals, application program has all been logged under multiple mobile terminals, at this moment The mobile terminal logged in after time is possible to need to desynchronize the user's operation information of server.In order to further improve using journey Sequence toggle speed, the first merging interface that can receive the first time under user's logging status merges to be decomposited in parameter value The interface parameters value of each interface with log-on message after coming is stored in the memory space of mobile terminal, and calculates each connect The afterbody that the CRC check code of mouth parameter value is attached to interface parameters value together preserves.Meanwhile join for this part of interface of preservation CRC check code corresponding to numerical value and each interface parameters value, the new merging parameter value subsequently received every time, passes through CRC schools The comparison for testing code is confirmed whether to need to update, and is then updated at any time if desired for renewal.
In the present embodiment, request module 403 is additionally operable to:When application program is in logging status operation, according to user Operate to send corresponding second merging interface requests to the server and receive the second of the server return and merge parameter Value;
Corresponding, preserving module 406 is additionally operable to locally deposit according to the described second merging parameter value renewal mobile terminal Store up the interface parameters value and the CRC check code that space preserves.
Specifically, application program, after logging status operation, in response to the operation of user, mobile terminal can also call one A little interfaces are sent to server asks, and now, is merged for distinct interface is same using foregoing description method, obtains second Merge interface and corresponding second and merge parameter, then the merging for sending the second merging interface requests to server and receiving return is joined Numerical value.Second merges the equally possible interface parameters value for carrying the interface with log-on message in parameter value, now, preserving module 406 need the interface parameters value according to these interfaces with log-on message in the second merging parameter value received, calculate each The CRC of interface parameters value, it is confirmed whether to need to update by the comparison with local CRC check code, if desired for renewal then at any time more Newly.
Further, in the present embodiment, request module 403 carries first merging to server transmission and connect First merging interface requests of mouth parameter specifically include:
Judge that local storage space whether there is interface parameters value corresponding to the interface with log-on message;
If so, obtain the local CRC check that interface parameters value corresponding to the local interface with log-on message be present Code;
The local CRC check code is write so that the service simultaneously in the request header of the described first merging interface requests Device determines the need for returning to the band according to the comparative result of the local CRC check code and the CRC check code of server side Interface parameters value corresponding to the interface of log-on message.
Specifically, during application program launching, the CRC check code being locally stored can be placed on band together and stepped on by request module 403 In the request header for recording information, after server receives the first merging interface requests, it can go to compare obtained band log-on message interface Interface parameters value CRC check code and local CRC check code that request header carries it is whether consistent, if unanimously, illustrating service The part of interface parameter value in device has no difference with the interface parameters value that mobile terminal is locally stored, without renewal, therefore, clothes Business device does not return to the interface parameters value of this part then, can be replaced with null value;If it is inconsistent, explanation may user from other Operated during mobile terminal login application program, user operation has been stored in server, and now, mobile terminal needs Synchronous user operation, therefore, server normally return to the interface parameters value of this part, and mobile terminal receives the first merging ginseng After numerical value, the CRC check code being calculated and local check code can be compared again, and new interface parameters value renewal is deposited to local Store up in space.
Further, in the present embodiment, the merging parameter value is decomposed into and the startup interface by distribution module 404 Corresponding multiple interface parameters values are simultaneously correspondingly distributed to each startup interface so that each startup interface completes the application The startup of program specifically includes:
Described first merging parameter value is decomposed into multiple interface parameters values corresponding with the startup interface;
When exist it is any startup interface corresponding to interface parameters value be null value when, from the mobile terminal local storage space Search for interface parameters value corresponding to the startup interface that the interface parameters value is null value and update and connect corresponding to the startup interface Mouth parameter value is the value searched;
Interface parameters value corresponding to each startup interface is distributed to each startup interface so that each startup connects Mouth completes the startup of the application program.
Specifically, as described above, when the interface parameters value with log-on message in server is locally stored with mobile terminal The part of interface parameter value it is consistent when, then server does not return to the interface parameters value of this part then, and is substituted with null value.Cause This, after distribution module 404 decomposes the first merging parameter value, it is understood that there may be some starts interface parameters value corresponding to interface as sky Value, now illustrates that the interface parameters value server of the startup interface does not return, distribution module 404 is needed from local storage space Interface parameters value corresponding to middle search startup interface and to update null value be the value searched, so as to obtain complete each open Interface parameters value corresponding to mobile interface, then obtained each interface parameters value is distributed into each startup interface, start interface and complete The startup of application program.
By above-mentioned module 401-406, application programming interfaces consolidation procedure of the present invention in local storage space by storing The interface parameters value of interface with log-on message, and renewal is kept by the comparison of CRC check code, so, if server The part of interface parameter value at end does not update, then mobile terminal can be without obtaining the part of interface parameter from server end Value, and interface directly is read from local, it can further improve toggle speed.And CRC check code is carried in interface is merged, The synchronism with server end of the interface parameters value of the interface with log-on message on mobile terminal is may further ensure that, is protected Accuracy and synchronism that user gets data are demonstrate,proved.
Embodiment three:
Further it is proposed that a kind of application programming interfaces merging method, the application programming interfaces merging method is applied to Mobile terminal shown in Fig. 1 to Fig. 2, the mobile terminal include memory and processor.
As shown in figure 5, it is the implementing procedure figure of application programming interfaces merging method first embodiment of the present invention.In this implementation In example, according to different demands, the execution sequence of the step in flow chart shown in Fig. 5 can change, and some steps can save Slightly.The application programming interfaces merging method includes:
Step S501, during application program launching, intercept multiple startup interfaces that request is sent to server;
Specifically, application program can call multiple interfaces (starting interface) in startup stage, multiple interfaces that start are to clothes Business device initiates request, can complete application program after each startup interface all receives the interface parameters value of server return afterwards Start-up course, here, for it is many offer account login features application programs for, interface on startup will be divided into Two major classes.One kind is the interface unrelated with user, i.e. generic interface, and one kind is the interface relevant with user, i.e. band log-on message Interface.It will be usually that the interface merging method of different application is hard-coded in using journey that the interface of prior art, which merges, In sequence, also, because the log-on message of each user is different, so not closed typically for the interface with log-on message And handle, and merged just for generic interface, and the present invention is dynamically to enter line interface in real time to merge, and interface Merging both includes generic interface, also includes the interface with log-on message.Specifically, the present invention can block in application program launching Multiple startup interfaces to server transmission request are cut to prevent each startup interface from initiating to ask to server.Such as:Work as application When program A startup stages need to call startup interface 1, startup interface 2 and start interface 3, application programming interfaces of the present invention close And method can intercept these and start interface after scanning to these startup interfaces, and these is started interface and enter wait state, With etc. interface parameters value to be returned.In the present embodiment, it is specially http request to start the request that interface is sent to server.
Step S502, multiple startup interfaces are merged to obtain the first merging interface and corresponding first merging Interface parameters;
Step S503, sent to the server and carry the described first the first merging interface requests for merging interface parameters And receive the first merging parameter value that the server returns;
Specifically, after multiple startup interfaces are intercepted, the plurality of startup interface can be merged into an interface, merging obtains Interface be designated as the first merging interface, and carry out start interface merge when can by it is each startup interface interface parameters reject log in Merged after information, obtain corresponding first and merge interface parameters.The form of the first merging interface parameters is as follows:{ start Interface 1:Parameter 1, start interface 2:Parameter 2, start interface 3:Parameter 3 ... ... starts interface n:Parameter n }, n represents to apply journey Sequence needs to call n startup interface when starting.For the interface with log-on message, its log-on message is typically also contained in the interface Interface parameters in, such as carry log-on message startup interface 1, its interface parameters is parameter 1+ log-on messages, and same For application program in same one-shot, the log-on message of all interface institute bands with log-on message is all identical, therefore, in order to avoid Duplicate message occupies redundant space, reduces the space merged shared by parameter, improves the efficiency that interface merges, can be connect each Mouth identical log-on message is placed on first sent to server and merged in the request header of interface requests, by being taken in request header With log-on message to mark the interface with log-on message.Assuming that have 5 startup interfaces, respectively start interface 1, start interface 2, Start interface 3, start interface 4, start interface 5.It is to need band user wherein to start interface 1, start interface 3 and start interface 5 Log-on message.So in request header, it is possible to information as increase:{ log-on message:ID, API:{ start interface 1, start interface 3, start interface 5, then this 5 startup interfaces are merged, remain general in interface parameters is merged Description, such as { start interface 1:Parameter 1, start interface 2:Parameter 2, start interface 3:Parameter 3, start interface 4:Parameter 4, Start interface 5:Parameter 5 }.The the first merging interface requests for merging interface parameters and log-on message are carried when server receives Afterwards, first it can merge interface parameters and log-on message according to this and search corresponding interface parameters value, and each be connect what is found Mouth parameter value merges according to the form for merging interface parameters, merges parameter value simultaneously as first to obtain a merging parameter value Return.Such as:The form of the first merging parameter value is as follows:{ start interface 1:Parameter value 1, start interface 2:Parameter value 2, start Interface 3:Parameter value 3 ... ... starts interface n:Parameter value n }, wherein parameter value n represents to start the interface parameters needed for interface n Value.Meanwhile server can merge the generic interface in interface by first according to the mark of log-on message entrained in request header Carry out separating caching with the interface with log-on message, still so that above-mentioned 5 start interface as an example, without the merging interface of log-on message Cache key (key) starts interface 4_ parameters 4 to start interface 2_ parameters 2_;Merging interface cache key with log-on message is user ID_ starts interface 1_ parameters 1_ IDs _ startup interface 3_ parameters 3_ and starts interface 5_ parameters 5, meanwhile, parameter corresponding to preservation Value, for example, start interface 2_ parameter values 2_ start interface 4_ parameter values 4 and ID _ startup interface 1_ parameter value 1_ IDs _ Start interface 3_ parameter values 3_ and start interface 5_ parameter values 5, when such mobile terminal performs merging interface again, it is possible to Directly read from the caching of server side, system can be greatly improved without carrying out computing repeatedly for parameter value in server Performance and return speed.
Step S504, the merging parameter value is decomposed into and corresponding multiple interface parameters values of the startup interface and right Each startup for starting interface so that each startup interface completes the application program should be distributed to.
Specifically, after mobile terminal receives the merging parameter value of server return, the merging parameter value can be carried out Decompose to obtain the interface parameters value needed for each startup interface, and be correspondingly distributed to each startup interface waited.Such as The merging parameter value that server returns is { startup interface 1:Parameter value 1, start interface 2:Parameter value 2, start interface 3:Parameter value 3, start interface 4:Parameter value 4, start interface 5:Parameter value 5 } when, mobile terminal is decomposed to the merging parameter value is joined Numerical value 1, parameter value 2, parameter value 3, parameter value 4, parameter value 5, parameter value 1 is distributed to starts interface 1 afterwards, by parameter value 2 It is distributed to and starts interface 2, parameter value 3 is distributed to and starts interface 3, parameter value is distributed to and starts interface 4, and by parameter value 5 are distributed to startup interface 5, and the startup of application program can be completed after each startup interface to return value.
Fig. 7 is refer to, Fig. 7 is interface merging process schematic diagram when application program A starts, as shown in fig. 7, application program Need to call when A starts and start interface 1, start interface 2, start interface 3, start interface 4 and start interface 5, wherein, start Interface 1,3,5 for need the interface with log-on message, then in start-up course, can will start interface 1, start interface 2, start connect Mouth 3, startup interface 4 and startup interface 5 merge to obtain a merging interface X and merge interface parameters, service utensil There is unified call address, if unified call address is http://app.nubia.com/api_united, afterwards mobile terminal to The unified call address of server sends the merging interface requests for carrying and merging interface parameters and log-on message, server according to Log-on message and each interface parameters merged in interface parameters search corresponding interface parameters value and merge and closed And application program A can be returned to after parameter, then application program A will merge parameter decomposition for interface parameters value 1, interface parameters value 2nd, interface parameters value 3, interface parameters value 4 and interface parameters value 5 and start interface 1 corresponding to being distributed to respectively, start interface 2nd, interface 3 is started, startup connects 4 and starts interface 5.It is json string formats wherein to merge interface parameters.
By above-mentioned steps S501-S504, application programming interfaces merging method of the present invention intercepts in application program launching Multiple startup interfaces of request are sent to server;Multiple startup interfaces are merged to obtain the first merging interface and corresponding First merge interface parameters;The the first merging interface requests for carrying the first merging interface parameters are sent to server and are received The first merging parameter value that server returns;Parameter value will be merged and be decomposed into multiple interface parameters values corresponding with starting interface simultaneously Each startup interface is distributed to so that respectively startup interface completes the startup of application program, it is achieved thereby that automatic progress dynamic in real time Start interface to merge, and incorporate the interface with log-on message when interface merges, improve the integrated level of interface merging and complete Face property, reduce the call number of interface so that the toggle speed of application program is obviously improved.
Further, based on above-mentioned first embodiment, propose that the second of application programming interfaces merging method of the present invention is implemented Example.As shown in fig. 6, it is the implementing procedure figure of application programming interfaces merging method second embodiment of the present invention.In the present embodiment, According to different demands, the execution sequence of the step in flow chart shown in Fig. 6 can change, and some steps can be omitted.Institute Stating application programming interfaces merging method includes:
Step S601, during application program launching, multiple startup interfaces that request is sent to server are intercepted, wherein, it is described Starting interface includes generic interface and the interface with log-on message;
Step S602, multiple startup interfaces are merged to obtain the first merging interface and corresponding first merging Interface parameters;
Step S603, sent to the server and carry the described first the first merging interface requests for merging interface parameters And the first merging parameter value that the server returns is received, wherein, carried in the request header of the first merging interface requests There is the log-on message to identify the interface with log-on message;
Step S604, the described first merging parameter value is decomposed into multiple interface parameters values corresponding with the startup interface And it is distributed to each startup for starting interface so that each startup interface completes the application program.
Step S605, judge whether current be that application program starts first;If starting first, into step S606, meter Calculate by the CRC check code of the interface parameters value of each interface with log-on message;If not start first, into step S608;
Step S607, the interface parameters value and CRC check code of the preservation interface with log-on message are in the movement Terminal local memory space;
Step S608, parameter value is merged according to first received and updates the mobile terminal local storage space space guarantor The interface parameters value and CRC check code deposited.
In the present embodiment, it is contemplated that user will not operate to application program before being initiated, and start it is latter as then For logging status, that is to say, that operation of the user to application program under its logging status is had been saved in server side.But Be in the presence of a part scene be that user has multiple mobile terminals, application program has all been logged under multiple mobile terminals, at this moment The mobile terminal logged in after time is possible to need to desynchronize the user's operation information of server.In order to further improve using journey Sequence toggle speed, the first merging interface that can receive the first time under user's logging status merges to be decomposited in parameter value The interface parameters value of each interface with log-on message after coming is stored in the memory space of mobile terminal, and calculates each connect The afterbody that the CRC check code of mouth parameter value is attached to interface parameters value together preserves.Meanwhile join for this part of interface of preservation CRC check code corresponding to numerical value and each interface parameters value, the new merging parameter value subsequently received every time, passes through CRC schools The comparison for testing code is confirmed whether to need to update, and is then updated at any time if desired for renewal.
Step S609, when application program is in logging status operation, is operated according to user to the server and send phase Second answered merges interface requests and receives the second merging parameter value that the server returns;
Step S610, merge parameter value according to described second and update described in the mobile terminal local storage space preservation Interface parameters value and CRC check code.
Specifically, application program, after logging status operation, in response to the operation of user, mobile terminal can also call one A little interfaces are sent to server asks, and now, is merged for distinct interface is same using foregoing description method, obtains second Merge interface and corresponding second and merge parameter, then the merging for sending the second merging interface requests to server and receiving return is joined Numerical value.Second merges the equally possible interface parameters value for carrying the interface with log-on message in parameter value, now, preserving module 406 need the interface parameters value according to these interfaces with log-on message in the second merging parameter value received, calculate each The CRC of interface parameters value, it is confirmed whether to need to update by the comparison with local CRC check code, if desired for renewal then at any time more Newly.
Further, in the present embodiment, step is sent to the server carries the first merging interface parameters First merging interface requests specifically include following steps:
Judge that local storage space whether there is interface parameters value corresponding to the interface with log-on message;
If so, obtain the local CRC check that interface parameters value corresponding to the local interface with log-on message be present Code;
The local CRC check code is write so that the service simultaneously in the request header of the described first merging interface requests Device determines the need for returning to the band according to the comparative result of the local CRC check code and the CRC check code of server side Interface parameters value corresponding to the interface of log-on message.
Specifically, during application program launching, the CRC check code being locally stored can be placed on band together and log in letter by mobile terminal In the request header of breath, after server receives the first merging interface requests, it can go to compare obtained connecing with log-on message interface Whether the CRC check code of mouth parameter value and the local CRC check code that request header carries are consistent, if unanimously, illustrated in server The interface parameters value that is locally stored of the part of interface parameter value and mobile terminal have no difference, without renewal, therefore, server Do not return to the interface parameters value of this part then, can be replaced with null value;If it is inconsistent, the possible user of explanation moves from other Operated during terminal login application program, user operation has been stored in server, and now, mobile terminal needs synchronization The user operates, and therefore, server normally returns to the interface parameters value of this part, and mobile terminal receives the first merging parameter value Afterwards, the CRC check code being calculated and local check code can be compared again, and by new interface parameters value renewal to sky is locally stored Between in.
Further, in the present embodiment, step S604 specifically includes following steps:
Described first merging parameter value is decomposed into multiple interface parameters values corresponding with the startup interface;
When exist it is any startup interface corresponding to interface parameters value be null value when, from the mobile terminal local storage space Search for interface parameters value corresponding to the startup interface that the interface parameters value is null value and update and connect corresponding to the startup interface Mouth parameter value is the value searched;
Interface parameters value corresponding to each startup interface is distributed to each startup interface so that each startup connects Mouth completes the startup of the application program.
Specifically, as described above, when the interface parameters value with log-on message in server is locally stored with mobile terminal The part of interface parameter value it is consistent when, then server does not return to the interface parameters value of this part then, and is substituted with null value.Cause This, after mobile terminal decomposes the first merging parameter value, it is understood that there may be interface parameters value corresponding to some startup interface is null value, Now illustrate that the interface parameters value server of the startup interface does not return, mobile terminal needs to search for from local storage space Interface parameters value corresponding to the startup interface and to update null value be the value searched, so as to obtain complete each startup interface Corresponding interface parameters value, then obtained each interface parameters value is distributed into each startup interface, start interface and complete to apply journey The startup of sequence.
By above-mentioned steps S601-S610, application programming interfaces merging method of the present invention in local storage space by depositing The interface parameters value of the interface with log-on message is stored up, and renewal is kept by the comparison of CRC check code, so, if service The part of interface parameter value at device end does not update, then mobile terminal can be without obtaining part of interface ginseng from server end Numerical value, and interface directly is read from local, it can further improve toggle speed.And CRC check code is carried in interface is merged, The synchronism with server end of the interface parameters value of the interface with log-on message on mobile terminal can also be further ensured that, It ensure that user gets the accuracy and synchronism of data.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or device institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone, computer, clothes Be engaged in device, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of mobile terminal, it is characterised in that the mobile terminal includes memory, processor and is stored in the memory Application programming interfaces consolidation procedure that is upper and can running on the processor, the application programming interfaces consolidation procedure are described Following steps are realized during computing device:
During application program launching, multiple startup interfaces that request is sent to server are intercepted, wherein, the startup interface includes general Connect mouth and the interface with log-on message;
Multiple startup interfaces are merged to obtain the first merging interface and corresponding first merging interface parameters;
The the first merging interface requests for carrying the first merging interface parameters are sent to the server and receive the clothes The first merging parameter value that business device returns, wherein, carry described log in the request header of the first merging interface requests and believe Cease to identify the interface with log-on message;
Described first merging parameter value is decomposed into multiple interface parameters values corresponding with the startup interface and is distributed to each institute State and start interface so that each startup for starting interface and completing the application program.
2. mobile terminal as claimed in claim 2, it is characterised in that the processor, which is additionally operable to perform the application program, to be connect Mouth consolidation procedure, to realize following steps:
Judge whether current be that application program starts first;
If starting first, the CRC check code of the interface parameters value by each interface with log-on message is calculated;
Sky is locally stored in the mobile terminal in the interface parameters value and CRC check code for preserving the interface with log-on message Between;
If not starting first, parameter value is merged according to first received and updates the mobile terminal local storage space preservation The interface parameters value and CRC check code.
3. mobile terminal as claimed in claim 2, it is characterised in that the processor, which is additionally operable to perform the application program, to be connect Mouth consolidation procedure, to realize following steps:
When application program is in logging status operation, operates to corresponding second merging of server transmission and connect according to user The second merging parameter value that the server returns is asked and received to mouth;
According to described second merge parameter value update the interface parameters value that the mobile terminal local storage space preserves with And CRC check code.
4. mobile terminal as claimed in claim 3, it is characterised in that application programming interfaces described in the computing device merge The step of program is to realize that carrying the first of the first merging interface parameters to server transmission merges interface requests Specifically include:
Judge that local storage space whether there is interface parameters value corresponding to the interface with log-on message;
If so, obtain the local CRC check code that interface parameters value corresponding to the local interface with log-on message be present;
The local CRC check code is write so that the server root simultaneously in the request header of the described first merging interface requests Determine the need for returning to the band login according to the comparative result of the local CRC check code and the CRC check code of server side Interface parameters value corresponding to the interface of information.
5. a kind of application programming interfaces merging method, applied to mobile terminal, it is characterised in that the application programming interfaces merge Method comprises the following steps:
During application program launching, multiple startup interfaces that request is sent to server are intercepted, wherein, the startup interface includes general Connect mouth and the interface with log-on message;
Multiple startup interfaces are merged to obtain the first merging interface and corresponding first merging interface parameters;
The the first merging interface requests for carrying the first merging interface parameters are sent to the server and receive the clothes The first merging parameter value that business device returns, wherein, carry described log in the request header of the first merging interface requests and believe Cease to identify the interface with log-on message;
Described first merging parameter value is decomposed into multiple interface parameters values corresponding with the startup interface and is distributed to each institute State and start interface so that each startup for starting interface and completing the application program.
6. application programming interfaces merging method as claimed in claim 5, it is characterised in that methods described also includes:
Judge whether current be that application program starts first;
If starting first, the CRC check code of the interface parameters value by each interface with log-on message is calculated;
Sky is locally stored in the mobile terminal in the interface parameters value and CRC check code for preserving the interface with log-on message Between;
If not starting first, parameter value is merged according to first received and updates the mobile terminal local storage space preservation The interface parameters value and CRC check code.
7. application programming interfaces merging method as claimed in claim 6, it is characterised in that methods described also includes:
When application program is in logging status operation, operates to corresponding second merging of server transmission and connect according to user The second merging parameter value that the server returns is asked and received to mouth;
According to described second merge parameter value update the interface parameters value that the mobile terminal local storage space preserves with And CRC check code.
8. application programming interfaces merging method as claimed in claim 5, it is characterised in that described sent to the server is taken First with the described first merging interface parameters specifically includes the step of merging interface requests:
Judge locally to whether there is interface parameters value corresponding to the interface with log-on message;
If so, obtain the local CRC check code that interface parameters value corresponding to the local interface with log-on message be present;
The local CRC check code is write so that the server root simultaneously in the request header of the described first merging interface requests Determine the need for returning to the band login according to the comparative result of the local CRC check code and the CRC check code of server side Interface parameters value corresponding to the interface of information.
9. application programming interfaces merging method as claimed in claim 5, it is characterised in that described to merge parameter by described first Value is decomposed into multiple interface parameters values corresponding with the startup interface and is distributed to each startup interface so as to be opened described in each Mobile interface completes the step of startup of the application program and is specially:
Described first merging parameter value is decomposed into multiple interface parameters values corresponding with the startup interface;
When exist it is any startup interface corresponding to interface parameters value be null value when, from the mobile terminal local storage space search The interface parameters value is interface parameters value corresponding to the startup interface of null value and updates interface ginseng corresponding to the startup interface Numerical value is the value searched;
Interface parameters value corresponding to each startup interface is distributed to each startup interface so that each startup interface is complete Into the startup of the application program.
10. a kind of computer-readable recording medium, it is characterised in that be stored with the computer-readable recording medium using journey Sequence interface consolidation procedure, realized when the application programming interfaces consolidation procedure is executed by processor as any in claim 5 to 9 Described in application programming interfaces merging method the step of.
CN201711005557.4A 2017-10-25 2017-10-25 Application program interface merging method, mobile terminal and computer readable storage medium Active CN107818022B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711005557.4A CN107818022B (en) 2017-10-25 2017-10-25 Application program interface merging method, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711005557.4A CN107818022B (en) 2017-10-25 2017-10-25 Application program interface merging method, mobile terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107818022A true CN107818022A (en) 2018-03-20
CN107818022B CN107818022B (en) 2021-08-24

Family

ID=61607569

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711005557.4A Active CN107818022B (en) 2017-10-25 2017-10-25 Application program interface merging method, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107818022B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108512924A (en) * 2018-03-29 2018-09-07 努比亚技术有限公司 Interface merging method, equipment, system and computer-readable storage media
CN109344050A (en) * 2018-08-20 2019-02-15 中国平安人寿保险股份有限公司 A kind of interface parameters analysis method and device based on structure tree
CN110062274A (en) * 2019-04-30 2019-07-26 深圳市迅雷网络技术有限公司 A kind of video file caching method, device, equipment and readable storage medium storing program for executing
CN112565056A (en) * 2020-11-11 2021-03-26 中国软件与技术服务股份有限公司 Method and device for processing group sending on-line and off-line messages through instant messaging

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012171133A1 (en) * 2011-06-13 2012-12-20 Telefonaktiebolaget L M Ericsson (Publ) Method and device for rate matching
CN103345420A (en) * 2013-06-03 2013-10-09 百度在线网络技术(北京)有限公司 Method for massively calling API interfaces, system for massively calling API interfaces and device for massively calling API interfaces
CN104580501A (en) * 2015-01-23 2015-04-29 广东能龙教育股份有限公司 Http interface dynamic publishing method and system based on reflex mechanism
CN105989070A (en) * 2015-02-10 2016-10-05 阿里巴巴集团控股有限公司 Method and system for requesting data from middleware and middleware client

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012171133A1 (en) * 2011-06-13 2012-12-20 Telefonaktiebolaget L M Ericsson (Publ) Method and device for rate matching
CN103345420A (en) * 2013-06-03 2013-10-09 百度在线网络技术(北京)有限公司 Method for massively calling API interfaces, system for massively calling API interfaces and device for massively calling API interfaces
CN104580501A (en) * 2015-01-23 2015-04-29 广东能龙教育股份有限公司 Http interface dynamic publishing method and system based on reflex mechanism
CN105989070A (en) * 2015-02-10 2016-10-05 阿里巴巴集团控股有限公司 Method and system for requesting data from middleware and middleware client

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108512924A (en) * 2018-03-29 2018-09-07 努比亚技术有限公司 Interface merging method, equipment, system and computer-readable storage media
CN108512924B (en) * 2018-03-29 2022-06-03 努比亚技术有限公司 Interface merging method, apparatus, system, and computer-readable storage medium
CN109344050A (en) * 2018-08-20 2019-02-15 中国平安人寿保险股份有限公司 A kind of interface parameters analysis method and device based on structure tree
CN110062274A (en) * 2019-04-30 2019-07-26 深圳市迅雷网络技术有限公司 A kind of video file caching method, device, equipment and readable storage medium storing program for executing
CN112565056A (en) * 2020-11-11 2021-03-26 中国软件与技术服务股份有限公司 Method and device for processing group sending on-line and off-line messages through instant messaging

Also Published As

Publication number Publication date
CN107818022B (en) 2021-08-24

Similar Documents

Publication Publication Date Title
CN108536481A (en) A kind of application program launching method, mobile terminal and computer storage media
CN107390972A (en) A kind of terminal record screen method, apparatus and computer-readable recording medium
CN107229402A (en) Dynamic screenshotss method, device and the readable storage medium storing program for executing of terminal
CN107463481A (en) Data interactive method, mobile terminal and storage medium
CN107682627A (en) A kind of acquisition parameters method to set up, mobile terminal and computer-readable recording medium
CN107340833A (en) Terminal temperature control method, terminal and computer-readable recording medium
CN107133302A (en) Realize method, system, terminal and the computer-readable recording medium of data consistency
CN108111392A (en) A kind of information processing method, device and computer readable storage medium
CN107749919A (en) A kind of application program page display method and equipment
CN107729103A (en) A kind of method for switching theme, mobile terminal and computer-readable storage medium
CN107818022A (en) Application programming interfaces merging method, mobile terminal and computer-readable recording medium
CN107463324A (en) A kind of image display method, mobile terminal and computer-readable recording medium
CN107688429A (en) Management method, mobile terminal and the computer-readable recording medium of application controls
CN107483804A (en) A kind of image pickup method, mobile terminal and computer-readable recording medium
CN107682630A (en) Dual camera anti-fluttering method, mobile terminal and computer-readable recording medium
CN107800879A (en) A kind of audio regulation method, terminal and computer-readable recording medium
CN107678625A (en) Information Sharing menu display method, mobile terminal and computer-readable recording medium
CN108076134A (en) Record information acquisition method, terminal, server and computer readable storage medium
CN110187808A (en) Dynamic wallpaper setting method, device and computer readable storage medium
CN108776600A (en) Application program pretrigger method, mobile terminal and computer readable storage medium
CN107566608A (en) A kind of system air navigation aid, equipment and computer-readable recording medium
CN107105058A (en) Folder transmission method and mobile terminal
CN109445945A (en) Memory allocation method, mobile terminal, server and the storage medium of application program
CN107943366A (en) Image processing method and mobile terminal
CN108040116A (en) Information push method, router and computer-readable recording medium

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
GR01 Patent grant
GR01 Patent grant