Summary of the invention
In view of this, the application's is designed to provide a kind of application function update method, updating device and electronic equipment,
The embodiment of the present application by update system function interface packet dependence, and use Android reflection mechanism, can efficiently into
Row multi-zone supervision can be improved the flexibility for updating functional configuration, integrality, tightness and division of labor development efficiency, with satisfaction pair
The growing demand of the complexity of functional configuration.
In a first aspect, the embodiment of the present application provides a kind of application function update method, comprising: when detecting system data
When updating, first node is generated application and is updated file based on the application more new data in system data;Second node according to
The description information of the update file of acquisition, classifies to file is updated, at least one functional interface packet after being encapsulated;Root
According to the interface message of application function interface, at least one functional interface packet is sent to corresponding application function interface, to realize
The update of application function Application of Interface function.
With reference to first aspect, the embodiment of the present application provides the first possible embodiment of first aspect, wherein the
One node generates the update file of application based on the application more new data in system data, comprising: obtains system using principle of reflection
Application more new data in data of uniting;According to the update file for automatically generating application using more new data.
The possible embodiment of with reference to first aspect the first, the embodiment of the present application provide second of first aspect
Possible embodiment, wherein according to the update file for automatically generating application using more new data, comprising: update number in application
According to middle acquisition Application Programming Interface data;Description information is generated according to programming interface data;Description information is carried and is answered in basis
In update file with the generation of more new data.
With reference to first aspect, the embodiment of the present application provides the third possible embodiment of first aspect, wherein the
Two nodes are classified according to the description information of the update file of acquisition to file is updated, at least one function after being encapsulated
Before energy interface packet, further includes: judge whether normal using file is updated;If application updates, file is normal, and second node obtains
Take the description information for updating file;If it is abnormal that application updates file, first node, which reacquires, applies more new data.
The third possible embodiment with reference to first aspect, the embodiment of the present application provide the 4th kind of first aspect
Possible embodiment, wherein at least one functional interface packet is sent to before corresponding application function interface, further includes:
Data detection is carried out to the interface message of application function interface, generates inspection result;Judge that application function connects according to inspection result
Whether the interface message of mouth is complete;If it is determined that interface message is imperfect, then functional interface packet corresponding with interface message is abandoned;If
It determines that interface message is complete, then the corresponding functional interface packet of interface message is sent to corresponding application function interface.
Second aspect, the embodiment of the present application provide a kind of application function updating device, comprising: generation module, for working as
When detecting that system data updates, first node is generated application and is updated text based on the application more new data in system data
Part;Categorization module is classified to file is updated, is obtained for second node according to the description information of the update file of acquisition
At least one functional interface packet after encapsulation;Sending module, for the interface message according to application function interface, by least one
Functional interface packet is sent to corresponding application function interface, to realize the update of application function Application of Interface function.
In conjunction with second aspect, the embodiment of the present application provides the first possible embodiment of second aspect, wherein raw
It include: acquisition module at module, for obtaining the application more new data in system data using principle of reflection;Generation module, also
For according to the update file for automatically generating application using more new data.
In conjunction with the first possible embodiment of second aspect, the embodiment of the present application provides second of second aspect
Possible embodiment, application function updating device include: acquisition module, are also used to obtain application in application more new data and compile
Journey interface data;Generation module is also used to generate description information according to programming interface data;Generation module is also used to describe
Information carries in the update file generated according to application more new data.
In conjunction with second aspect, the embodiment of the present application provides the third possible embodiment of second aspect, wherein answers
With function updating device further include: whether judgment module is normal using file is updated for judging;If application is updating file just
Often, then second node obtains the description information for updating file;If it is abnormal that application updates file, first node reacquisition is answered
With more new data.
In conjunction with the third possible embodiment of second aspect, the embodiment of the present application provides the 4th kind of second aspect
Possible embodiment, application function updating device include: generation module, be also used to the interface message of application function interface into
Row data detection generates inspection result;Judgment module is also used to judge according to inspection result the interface message of application function interface
It is whether complete;If it is determined that interface message is imperfect, then functional interface packet corresponding with interface message is abandoned;If it is determined that interface message
Completely, then the corresponding functional interface packet of interface message is sent to corresponding application function interface.
The third aspect, the embodiment of the present application also provides a kind of electronic equipment, comprising: processor, memory and bus are deposited
Reservoir is stored with the executable machine readable instructions of processor, when electronic equipment operation, passes through between processor and memory
Bus communication executes the application function update method such as any of the above-described when machine readable instructions are run by processor.
Fourth aspect, the embodiment of the present application also provides a kind of computer readable storage medium, computer-readable storage mediums
It is stored with computer program in matter, the application function update side such as any of the above-described is executed when computer program is run by processor
Method.
Application function update method provided by the embodiments of the present application and device pass through newly-increased first node and second node
The dependence that system function interface packet can be updated, with the application software in the prior art for going out function change by System build
Installation file, the installation file of the application software that replacement addition system layer-by-layer later provides realizes functional interface, could be complete
Function is newly increased at corresponding system, i.e., successively the installation file of addition application software relies on exploitation, it is necessary to ensure that system is to answering
With requiring consistency up and down, while safeguarding that the compatibility of software application is compared with stability, the embodiment of the present application by using
The method of multi-zone supervision can not only improve the flexibility for updating functional configuration, integrality, tightness and division of labor development efficiency,
The demand growing to the complexity of functional configuration can also be met.
Further, application function update method provided by the embodiments of the present application, can be flexible by using principle of reflection
Corresponding system function is obtained, the compatible of the multiple application software of model may be implemented and use.
To enable the above objects, features, and advantages of the application to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate
Appended attached drawing, is described in detail below.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
Middle attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only
It is some embodiments of the present application, instead of all the embodiments.The application being usually described and illustrated herein in the accompanying drawings is real
The component for applying example can be arranged and be designed with a variety of different configurations.Therefore, below to the application's provided in the accompanying drawings
The detailed description of embodiment is not intended to limit claimed scope of the present application, but is merely representative of the selected reality of the application
Apply example.Based on embodiments herein, those skilled in the art institute obtained without making creative work
There are other embodiments, shall fall in the protection scope of this application.
In view of each what's new of system requires that relevant frame (Framework) is specified to generate phase in the related technology
The installation file for the application software answered just is able to achieve the update of application software, and is installation text of all references to application software
Part is required to update and is compiled to last state, if the system updated occurs abnormal, it will System build is occurred and is gone out to ask
Topic malfunctions using operation, and then causes function that cannot normally update.
In view of this, the embodiment of the present application provides a kind of application function update method, updating device and electronic equipment, lead to
The dependence for updating system function interface packet is crossed, and uses Android reflection mechanism, can be carried out efficiently multi-zone supervision, it can
The flexibility for updating functional configuration, integrality, tightness and division of labor development efficiency are improved, to meet the complicated journey to functional configuration
Spend growing demand.
The embodiment of the application first aspect, as shown in Figure 1, for a kind of application function update provided by the embodiments of the present application
The flow chart of method, the processing method include:
S101, when detecting that system data updates, first node based in system data application more new data,
It generates application and updates file;
S102, second node are classified to file is updated, are encapsulated according to the description information of the update file of acquisition
At least one functional interface packet afterwards;
At least one functional interface packet is sent to corresponding application according to the interface message of application function interface by S103
Functional interface, to realize the update of application function Application of Interface function.
Application function update method provided by the embodiments of the present application, for one-to-many prototype software function system, this is
System is communicated with the operation interface software of the multiple users of vehicle, can be updated by newly-increased first node and second node and is
The dependence of system functional interface packet, specifically, when system data updates, first node obtains answering in system data
With more new data, and generate using updating file, i.e. APK (AndroidPackage, Android installation kit) file, further,
Second node obtains the description information for updating file, is classified to file is updated and obtains at least one functional interface after being encapsulated
Interface packet is arranged in packet, such as brightness interface packet, blue tooth interface packet, language interface packet, sound field interface packet, audio interface packet, vehicle,
By the update for calling the operation interface software application function of corresponding functional interface packet realization user.The embodiment of the present application uses
The method of multi-zone supervision reduces the dimension of code between layers without the association of JAR (Java Archive, archive file)
Shield, key data code are changed into an APK by JAR and are present in system, can not only improve and update the flexible of functional configuration
Property, integrality, tightness and division of labor development efficiency, additionally it is possible to meet the demand growing to the complexity of functional configuration.
Wherein, first node can be generated based on the application more new data in system data using update file APK;The
Two nodes are classified according to the description information of the update file of acquisition to file is updated, at least one function after being encapsulated
It can interface packet JAR;The operation interface software of user is not limited to UI-APP, system software.
In one embodiment of the application, it is preferable that as shown in Fig. 2, another kind provided by the embodiment of the present application is answered
With the flow chart of function update method, comprising:
S201 obtains the application in system data using principle of reflection and updates when detecting that system data is updated
Data, according to the update file for automatically generating application using more new data;
S202, second node are classified to file is updated, are encapsulated according to the description information of the update file of acquisition
At least one functional interface packet afterwards;
At least one functional interface packet is sent to corresponding application according to the interface message of application function interface by S203
Functional interface, to realize the update of application function Application of Interface function.
In this embodiment, first node obtains the application more new data in system data, Jin Erneng by principle of reflection
It is enough that different type further can be encapsulated according to the update file APK for automatically generating application using more new data as desired
Functional interface packet JAR, such as: realize language switching just only encapsulation linguistic function provide an interface packet.The embodiment of the present application is logical
Corresponding system function can flexibly be obtained using principle of reflection by crossing, and the simultaneous of multiple application software an of model may be implemented
Hold and use, realize that the function of all functional modules links using principle of reflection by the characteristic of Android, layer and layer may be implemented
Between association, that is, do not depend on and do not lack function yet and realize that system is changed by the phase, and function everyday increases, model function will not be influenced
The realization of energy, the system for being applicable in all versions of implementation model, if the method interface that the system original phase has has altered or removes, this
When just need to carry out supplement process, without handle user operation interface under software.
It should be noted that principle of reflection (reflection principle) is also known as reflection theorem.Specifically, ifFor the arbitrary finite axiom of ZF system (axiomatics), then there is aggregation model M, makeI.e. M isModel, this conclusion is known as principle of reflection.In ZF system
In, it is impossible to it proves that there are ZF system standard aggregation models, but by principle of reflection, can prove (in ZF system), Ren Heyou
There is aggregation model in limit segment.
In one embodiment of the application, it is preferable that as shown in figure 3, another kind provided by the embodiment of the present application is answered
With the flow chart of function update method, comprising:
S301 obtains the application in system data using principle of reflection and updates when detecting that system data is updated
Data;Application Programming Interface data are obtained in application more new data;Description information is generated according to programming interface data;It will description
Information carries in the update file generated according to application more new data;
S302, second node are classified to file is updated, are encapsulated according to the description information of the update file of acquisition
At least one functional interface packet afterwards;
At least one functional interface packet is sent to corresponding application according to the interface message of application function interface by S303
Functional interface, to realize the update of application function Application of Interface function.
In this embodiment, first node is retouched by obtaining Application Programming Interface data, and by the generation of programming interface data
It states information and is added to and update in file, can be realized and the application function of respective application functional interface is updated, specifically, when
When needing to update some application function interface, obtains first with principle of reflection and retouched with corresponding carry of application function interface
The update file of information is stated, and then obtains functional interface packet, so that the application to the functional interface is updated.
In one embodiment of the application, second node according to acquisition update file description information, to update text
Just whether part is classified, before at least one functional interface packet after being encapsulated, further includes: judge using update file
Often;If application updates, file is normal, and second node obtains the description information for updating file;If it is abnormal that application updates file,
Then first node, which reacquires, applies more new data.
In this embodiment, by add judge using update file whether normally execute step, can prevent due to
File abnormal the case where causing the function renewal to application function interface to fail is updated, the standard that update method executes is improved
True rate after capable of also guaranteeing that abnormal function occurs, also can be obtained timely corresponding anti-while assurance function operates normally
Feedback, the update without influencing other application functional interface function.
In one embodiment of the application, by least one functional interface packet be sent to corresponding application function interface it
Before, further includes: data detection is carried out to the interface message of application function interface, generates inspection result;Judged according to inspection result
Whether the interface message of application function interface is complete;If it is determined that interface message is imperfect, then function corresponding with interface message is abandoned
It can interface packet;If it is determined that interface message is complete, then the corresponding functional interface packet of interface message is sent to corresponding application function
Interface.
In this embodiment, data detection is carried out by the interface message to application function interface, can prevents interface from believing
The occurrence of breath mismatches with application function interface and function renewal is caused to fail, it is ensured that the validity of function renewal.
In the specific embodiment of the application, show as shown in figure 4, providing a kind of application function update method process
It is intended to, wherein specific implementation step is as follows:
1) system provide corresponding application programming interface (Application Programming Interface,
API);
2) first node writes data analysis layer according to system API, and generates corresponding UI-APP.jar;
3) second node by frame (Framework) carry out with system carry out verifying system function it is whether normal, guarantee
Function operate normally while, also to guarantee abnormal function occur after, function also can timely respective feedback, without influencing other function
The progress of energy module;
4) first node provides JAR interface, realizes and uses system function indirectly;
5) second node carries out data detection by frame, judges the integrality of system function, and carry out function realization;
6) by the same model, the JAR provided realize different by UI-APP1, UI-APP2, UI-APP3, UI-APP4
Functional module, mode.jar also can handle different editions, will not influence mode.jar and mode.apk data communication;
7) UI-APP1, UI-APP2, UI-APP3, UI-APP4 carry out handling different APK by second node, without
Consider the change of system, it is only necessary to the mode.jar of concern correspondence or different editions.
Wherein, UI-APP1, UI-APP2, UI-APP3, UI-APP4 are the operation interface software of user.
Based on the same inventive concept, it is additionally provided in the embodiment of the application second aspect and application function update method pair
The updating device answered, the principle and the above-mentioned update of the embodiment of the present application solved the problems, such as due to the updating device in the embodiment of the present application
Method is similar, therefore the implementation of device may refer to the implementation of method, and overlaps will not be repeated.
The embodiment of the application second aspect, as shown in figure 5, more for a kind of application function provided by the embodiment of the present application
The structural schematic diagram of new equipment, the device include:
Generation module 10, for when detecting that system data updates, first node to be based on answering in system data
With more new data, generates application and update file;
Categorization module 20 is divided for second node according to the description information of the update file of acquisition file is updated
Class, at least one functional interface packet after being encapsulated;
At least one functional interface packet is sent to by sending module 30 for the interface message according to application function interface
Corresponding application function interface, to realize the update of application function Application of Interface function.
Application function updating device provided by the present application, including generation module 10, categorization module 20 and sending module 30 lead to
The dependence for updating system function interface packet is crossed, and uses Android reflection mechanism, can be carried out efficiently multi-zone supervision, it can
The flexibility for updating functional configuration, integrality, tightness and division of labor development efficiency are improved, to meet the complicated journey to functional configuration
Spend growing demand.
In one embodiment of the application, it is preferable that as shown in fig. 6, for another kind provided by the embodiment of the present application
The structural schematic diagram of application function updating device, the device include:
Generation module 10 includes obtaining module 40, obtains module 40 and is used to obtain answering in system data using principle of reflection
With more new data;Generation module 10, for according to the update file for automatically generating application using more new data;
Categorization module 20 is divided for second node according to the description information of the update file of acquisition file is updated
Class, at least one functional interface packet after being encapsulated;
At least one functional interface packet is sent to by sending module 30 for the interface message according to application function interface
Corresponding application function interface, to realize the update of application function Application of Interface function.
In one embodiment of the application, it is preferable that obtain module 40, be also used to obtain in application more new data and answer
With programming interface data;Generation module 10 is also used to generate description information according to programming interface data;Generation module 10, is also used
It carries in by description information according in the update file generated using more new data.
In one embodiment of the application, it is preferable that device further include: judgment module, for judging that application updates text
Whether part is normal;If application updates, file is normal, and second node obtains the description information for updating file;If application updates file
Abnormal, then first node, which reacquires, applies more new data.
In one embodiment of the application, it is preferable that generation module 10 is also used to the interface letter to application function interface
Breath carries out data detection, generates inspection result;Judgment module is also used to judge according to inspection result the interface of application function interface
Whether information is complete;If it is determined that interface message is imperfect, then functional interface packet corresponding with interface message is abandoned;If it is determined that interface
Information is complete, then the corresponding functional interface packet of interface message is sent to corresponding application function interface.
In the embodiment of the application third aspect, it is preferable that as shown in fig. 7, for one kind provided by the embodiment of the present application
The structural schematic diagram of electronic equipment, the electronic equipment include: processor 100, memory 200 and bus 300, and memory 200 is deposited
The executable machine readable instructions of processor 100 are contained, when electronic equipment operation, are led between processor 100 and memory 200
The communication of bus 300 is crossed, executes when machine readable instructions are executed by processor 100 and executes instruction as follows:
When detecting that system data updates, first node is generated based on the application more new data in system data
Using update file;
Second node is classified, after being encapsulated according to the description information of the update file of acquisition to file is updated
At least one functional interface packet;
According to the interface message of application function interface, at least one functional interface packet is sent to corresponding application function and is connect
Mouthful, to realize the update of application function Application of Interface function.
In one embodiment of the application, it is preferable that in the step of above-mentioned processor 100 executes, first node is based on
Application more new data in system data, generates the update file of application, comprising:
The application more new data in system data is obtained using principle of reflection;
According to the update file for automatically generating application using more new data.
In one embodiment of the application, it is preferable that in the step of above-mentioned processor 100 executes, updated according to application
Data automatically generate the update file of application, comprising:
Application Programming Interface data are obtained in application more new data;
Description information is generated according to programming interface data;
Description information is carried in the update file generated according to application more new data.
In one embodiment of the application, it is preferable that above-mentioned processor 100 execute the step of in, second node according to
Acquisition update file description information, to update file classify, at least one functional interface packet after being encapsulated it
Before, further includes:
Judge whether normal using file is updated;
If application updates, file is normal, and second node obtains the description information for updating file;
If it is abnormal that application updates file, first node, which reacquires, applies more new data.
In one embodiment of the application, it is preferable that in the step of above-mentioned processor 100 executes, by least one function
Energy interface packet is sent to before corresponding application function interface, further includes:
Data detection is carried out to the interface message of application function interface, generates inspection result;
Judge whether the interface message of application function interface is complete according to inspection result;
If it is determined that interface message is imperfect, then functional interface packet corresponding with interface message is abandoned;
If it is determined that interface message is complete, then the corresponding functional interface packet of interface message is sent to corresponding application function and connect
Mouthful.
In the embodiment of the application fourth aspect, it is preferable that computer-readable deposited the embodiment of the present application also provides a kind of
Storage media is stored with computer program on computer readable storage medium, executes when computer program is run by processor above-mentioned
Application function update method.
Specifically, computer readable storage medium can be general storage medium, such as mobile disk, hard disk, this is deposited
When computer program on storage media is run, it is able to carry out above-mentioned application function update method, is connect by updating system function
The dependence of mouth packet, and Android reflection mechanism is used, it can be carried out efficiently multi-zone supervision, can be improved update functional configuration
Flexibility, integrality, tightness and division of labor development efficiency, to meet need growing to the complexity of functional configuration
It asks.
The computer program product of application function update method provided by the embodiment of the present application, including store program generation
The computer readable storage medium of code, the instruction that program code includes can be used for executing the method in previous methods embodiment, have
Body, which is realized, can be found in embodiment of the method, and details are not described herein.
It is apparent to those skilled in the art that for convenience and simplicity of description, the equipment of foregoing description
It with the specific work process of device, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
If function is realized in the form of SFU software functional unit and when sold or used as an independent product, can store
In a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially in other words to existing
Having the part for the part or the technical solution that technology contributes can be embodied in the form of software products, the computer
Software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be personal meter
Calculation machine, server or network equipment etc.) execute each embodiment method of the application all or part of the steps.And it is above-mentioned
Storage medium includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory
The various media that can store program code such as (RAM, Random Access Memory), magnetic or disk.
More than, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, and it is any to be familiar with
Those skilled in the art within the technical scope of the present application, can easily think of the change or the replacement, and should all cover
Within the protection scope of the application.Therefore, the protection scope of the application should be subject to the protection scope in claims.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.