CN103699451B - The data sharing method and device of application software and plug-in unit - Google Patents
The data sharing method and device of application software and plug-in unit Download PDFInfo
- Publication number
- CN103699451B CN103699451B CN201310753019.9A CN201310753019A CN103699451B CN 103699451 B CN103699451 B CN 103699451B CN 201310753019 A CN201310753019 A CN 201310753019A CN 103699451 B CN103699451 B CN 103699451B
- Authority
- CN
- China
- Prior art keywords
- identity
- plug
- allocator
- application software
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Abstract
The present invention provides the data sharing method and device and the method to set up of data sharing of a kind of application software and plug-in unit, is related to Internet technology.Wherein, the data sharing method of the application software and plug-in unit includes:Application software judges whether the identity allocator in identity allocator and application software in plug-in unit matches, wherein, the identity that identity allocator corresponds in operating system, operating system distributes identical identity to the application software and target plug-in of the identity allocator with matching;When the identity allocator matching in the identity allocator and application software in plug-in unit, application software and target plug-in shared data.By embodiments of the present invention, the setting of operating system aspect can be avoided, data sharing is realized, simplify the mode of data sharing.
Description
Technical field
The present invention relates to internet arena, the data sharing method and device of more particularly to a kind of application software and plug-in unit and
The method to set up of data sharing.
Background technology
With the development of Internet technology, the function also increasingly diversification of application software, the function of application software is richer
Richness, the volume of the application software is bigger, and volume had both occupied greatly space, and the stream downloaded needed for the application software is added again
Amount.In order to reduce the volume of application software, part of functions can be integrated in the plug-in unit matched with the application software.Plug-in unit
It is to follow the program that the framework interface of certain specification is write out, for the function of expanded application software, it is possible to and application is soft
Part shared data, user downloads the plug-in unit needed for installing after application software is installed further according to the demand of oneself, soft by application
The data sharing of part and plug-in unit, realizes the function of the plug-in unit.
The data sharing of plug-in unit and application software is more complicated in the prior art, is related to the other action of operating system grade, and
And need to call many interfaces, these are operated brings inconvenience to the exploitation of plug-in unit.
The content of the invention
The embodiment of the present invention provides the data sharing method and device of a kind of application software and plug-in unit, to avoid operating system
The setting of aspect, realizes data sharing, so as to simplify the mode of data sharing.
There is provided a kind of application software and the data sharing method of plug-in unit to achieve these goals by the present invention.This method bag
Include:Application software judges whether the identity allocator in identity allocator and application software in plug-in unit matches, wherein, identity point
The identity corresponded to symbol in operating system, application software and target of the operating system to the identity allocator with matching
Plug-in unit distributes identical identity;, should when the identity allocator matching in the identity allocator and application software in plug-in unit
With software and target plug-in shared data.
In one embodiment, identity allocator prompting operating system distribution identity, wherein, the distribution of identical identity
Symbol prompting operating system distribution identical identity.
In one embodiment, application software and target plug-in, which carry out data sharing, includes:
Application software and target plug-in carry out data sharing by default path.
In one embodiment, identity allocator is application or the SharedUserId labels of plug-in unit.
In one embodiment, in addition to:Application software reads application software and the installation kit title of plug-in unit;Application software
Target plug-in is determined by identity allocator or installation kit title, wherein, when determining target plug-in by installation kit title, with
There is application software the plug-in unit of identical installation kit title to be target plug-in;Application software and target plug-in data sharing.
The present invention to achieve these goals, also provides the data sharing device of a kind of application software and plug-in unit.The device
Including:Whether judge module, match for the identity allocator in the identity allocator and application software in the plug-in unit that breaks, wherein,
The identity that identity allocator corresponds in operating system, application software of the operating system to the identity allocator with matching
Identical identity is distributed with target plug-in;First sharing module, for when the identity allocator and application software in plug-in unit
In identity allocator matching when, with target plug-in shared data.
In one embodiment, identity allocator prompting operating system distribution identity, wherein, the distribution of identical identity
Symbol prompting operating system distribution identical identity.
In one embodiment, sharing module is additionally operable to carry out data sharing by default path with target plug-in.
In one embodiment, identity allocator is application or the SharedUserId labels of plug-in unit.
In one embodiment, in addition to:Read module, the installation kit title for reading application software and plug-in unit;Really
Cover half block, for determining target plug-in by identity allocator or installation kit title, wherein, when determining mesh by installation kit title
When marking plug-in unit, with application software there is the plug-in unit of identical installation kit title to be target plug-in;Second sharing module, is used for and mesh
Plug-in's data is marked to share.
The present invention to achieve these goals, also provides a kind of method to set up of data sharing.This method includes:To application
Software and plug-in unit set the identity allocator of matching, wherein, the application software and plug-in unit for being provided with identity allocator can be pacified
It is attached in operating system, operating system distributes identical identity to be provided with the application software and plug-in unit of the identity allocator of matching
Mark;Application software is set in the identity allocator being attached to during plug-in unit is read after operating system, and with matching identity allocator
Plug-in unit carry out data sharing.
In one embodiment, identity allocator is application or the SharedUserId labels of plug-in unit.
The present invention realizes application software and plug-in unit identity indirectly by the identity allocator in application software and plug-in unit
Always, so that application software and plug-in unit can carry out data sharing, the mode of existing data sharing is simplified.
Brief description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the application, not
Constitute limitation of the invention.In the accompanying drawings:
Fig. 1 is the flow chart of the data sharing method 100 of application software shown in the embodiment of the present invention and plug-in unit;
Fig. 2 shows the schematic diagram of a kind of application software of the preferred embodiment of the present invention and the data sharing method of plug-in unit;
Fig. 3 is identity allocator shown in the preferred embodiment of the present invention and the schematic diagram of identity;
Fig. 4 is the structured flowchart of the data sharing device of application software shown in the embodiment of the present invention and plug-in unit;
Fig. 5 shows the structural frames of a kind of application software of the preferred embodiment of the present invention and the data sharing device of plug-in unit
Figure;
Fig. 6 is the flow chart of the method to set up 600 of the data sharing shown in the embodiment of the present invention.
Embodiment
For the object, technical solutions and advantages of the present invention are more clearly understood, below in conjunction with the accompanying drawings to present invention implementation
Example is described in further detail.Here, the schematic description and description of the present invention is used to explain the present invention, but it is not intended as
Limitation of the invention.
The present invention is described in further detail referring now to accompanying drawing.
The present invention can be realized in many different forms, should not be construed as being limited to implementation set forth herein
Example.These embodiments are only used as example offer, to provide the complete understanding to the present invention for those skilled in the art.
The embodiments of the invention provide a kind of application software and the data sharing method of plug-in unit, Fig. 1 is the embodiment of the present invention
The application software and the flow chart of the data sharing method 100 of plug-in unit shown.
As shown in figure 1, this method comprises the following steps:
Step 110, application software judge identity allocator in identity allocator and the application software in plug-in unit whether
Match somebody with somebody, wherein, the identity that identity allocator corresponds in operating system, operating system is to the identity allocator with matching
Application software and target plug-in distribution identical identity.
Step 120, when in the identity allocator and application software in plug-in unit identity allocator matching when, application software with
Target plug-in shared data.
Application software can only be with the plug-in unit shared data that is identified with common identity, so in order to carry out data sharing, needing
Application software and the identity of plug-in unit are set to it is consistent, but set identity be operating system aspect operation, and
It is not the operation of application software aspect, therefore in development and application software and plug-in unit, if it is desired to common identity mark is directly set
Know the workload, it is necessary to larger.Identity is set by identity allocator in the present embodiment, due to identical identity
The application software and plug-in unit of allocator when mounted can by operating system distribute identical identity, therefore can realize should
With identity allocator is set in software or plug-in unit, so as to set identity indirectly, and then the number of application software and plug-in unit is realized
According to shared.
Preferably, data sharing can also be carried out by way of installation kit title is combined with identity allocator.For example have
In the case of a little application software by certain approach know in advance the installation kit name of plug-in unit into, as built in code, later stage Network Capture
Deng, will now be determined by default installation kit title the plug-in unit be target plug-in, and directly with the plug-in unit carry out data sharing;
Target plug-in is determined whether for the plug-in unit different from the installation kit title of application software, then by identity allocator, true
When the fixed plug-in unit is target plug-in, then with the plug-in unit carry out data sharing.
Below by taking the data sharing of ocr software in Android operation system and novel plug-in unit as an example, this is specifically described
The implementation method of inventive embodiments, ocr software is as application software, the function with reading;Novel plug-in unit can be read soft
Part is called, and ocr software passes through the data sharing with novel plug-in unit, it will be appreciated that the progress of reading, so as to show in correct
Hold, an ocr software can carry out data sharing with one or more novel plug-in units.Fig. 2 shows the preferred embodiment of the present invention
A kind of application software and plug-in unit data sharing method 200 schematic diagram, as shown in Fig. 2 this method comprises the following steps:
Step 210, SharedUserID labels are set.
In Android operation system, ocr software and novel plug-in unit can be Android bags(AndroidPackage,
Referred to as APK), for security reasons, general different APK has different identity(UserId), in order to avoid by one
Information leakage in individual APK gives another APK, but when needing several APK to use cooperatively, in order that energy between the APK of part
Enough data sharing be carried out, it is necessary to set identical UserId to these APK, the setting to UserId is Android operation system
Bottom operation, set-up mode is more complicated.Present embodiments providing one kind can just be set without directly performing bottom operation
UserId method, specifically, can be added in the AndroidManifest.xml files of development phase in advance to each APK
One be called SharedUserId label:
Fig. 3 is the schematic diagram of the relation 300 of identity allocator shown in the preferred embodiment of the present invention and identity.In figure
Only it is described by taking a plug-in unit as an example, the data sharing of multiple plug-in units and application software is also identical principle, such as Fig. 3 institutes
Show, Android operation system 31 includes being used for distributing the identity distributor 311 of identity, application software 32 and insert
Include application software identity allocator 321 and plug-in unit identity allocator 331, application software identity allocator 321 in part 33 respectively
It can indicate that identity distributor 311 carries out the distribution of identity with plug-in unit identity allocator 331, when application software identity
When allocator 321 and identical plug-in unit identity allocator 331, identity distributor 311 is that application software 32 and plug-in unit 33 are distributed
Identical identity.
APK with identical UserId can be with shared data, and SharedUserID is the identity point of Android operation system
With symbol, when distributing UserID from indicative function, two APK with identical SharedUserId is allocated phase when mounted
Same UserId, in order that ocr software is consistent with the UserId of novel plug-in unit, first to ocr software and can need data to be total to
Each novel plug-in unit enjoyed carries out SharedUserId settings:There is a inventory in each APK(AndroidManifest.xml),
Recorded in the inventory perform the APK needed for specifying information, needing each APK's of shared resource
ShareuserId label is added in AndroidMainfest.xml respectively, for example:android:SharedUserId="
Com.plugin.platform ", i.e., be set to " com.plugin.platform ", in other embodiment by SharedUserId
In, SharedUserId name can arbitrarily be set, it is only necessary to ensure that plug-in unit and application software have used identical
Only one of which Shareuserid labels in SharedUserId, and an AndroidManifest.xml.
Step 220, data are set to deposit path., can be again each APK's in order to simplify the shared of data
Unified data are set to deposit path in AndroidManifest.xml, for being carried out with it needed for APK of data sharing is obtained
Data.
Unified data storage path is set make it that the transmission of data is more direct, because ocr software reads the road of data
Footpath is exactly the path that novel plug-in unit deposits data, so not having anyly between the reading of ocr software and the storage of novel plug-in unit
Redirecting for location, can so simplify the flow of data sharing, improve the speed of data sharing.
Step 230, application software reads itself SharedUserId with other plug-in units respectively.
Ocr software is wanted to call novel plug-in unit, it is necessary first to confirm the bar of data sharing whether is met with novel plug-in unit
Part, it is therefore desirable to confirm whether there is identical UserId with novel plug-in unit, further, it is necessary to by confirming and novel plug-in unit
Whether there is identical SharedUserId indirectly to determine whether with identical UserId.Ocr software can be with this step
Read the SharedUserId of all APK in the SharedUserId and Android operation system of itself.
Step 240, compare SharedUserId, determine target plug-in.
Which APK ocr softwares by being compared one by one with each APK, determines after read each APK SharedUserId
It is that can carry out the target plug-in of data sharing, it is however generally that only novel plug-in unit can just be set and ocr software phase in exploitation
Same SharedUserId, thus may determine that target plug-in is novel plug-in unit.
Step 250, application software carries out data sharing with plug-in unit.
Ocr software reads the content of novel plug-in unit in default data storage address, records the progress read, and should
Progress feeds back to novel plug-in unit, realizes data sharing.
The embodiment of the present invention additionally provides the data sharing device of a kind of application software and plug-in unit, and Fig. 4 is implementation of the present invention
The application software and the structured flowchart of the data sharing device 400 of plug-in unit exemplified.
As shown in figure 4, the device includes the sharing module 420 of judge module 410 and first.
Whether judge module 410 matches for the identity allocator in the identity allocator and application software in the plug-in unit that breaks,
Wherein, the identity that identity allocator corresponds in operating system, operating system should to the identity allocator with matching
With software and target plug-in distribution identical identity.First sharing module 420 be used for work as plug-in unit in identity allocator and
When identity allocator in application software is matched, with target plug-in shared data.
Preferably, identity allocator prompting operating system distribution identity, wherein, identical identity allocator prompting behaviour
Make system distribution identical identity.
Preferably, sharing module is additionally operable to carry out data sharing by default path with target plug-in.
Preferably, identity allocator is application or the SharedUserId labels of plug-in unit.
Fig. 5 is the structured flowchart of the data sharing device 500 of application software shown in the preferred embodiment of the present invention and plug-in unit,
As shown in figure 5, the device includes read module 510, the sharing module 530 of determining module 520 and second.
Read module 510 is used to read application software and the installation kit title of plug-in unit;Determining module 520 is used to pass through identity
Allocator or installation kit title determine target plug-in, wherein, when determining target plug-in by installation kit title, default installation
The plug-in unit of bag title is target plug-in;Second sharing module 530 is used for and target plug-in data sharing.
The embodiment of the present invention additionally provides a kind of method to set up of data sharing, and Fig. 6 is answering shown in the embodiment of the present invention
With the flow chart of the data sharing method 600 of software and plug-in unit.
As shown in fig. 6, this method comprises the following steps:
Step 610, the identity allocator of matching is set to application software and plug-in unit, wherein, it is provided with identity allocator
Application software and plug-in unit can be installed in operating system, and application of the operating system to be provided with the identity allocator of matching is soft
Part and plug-in unit distribution identical identity.
Step 620, application software is set in the identity allocator being attached to during plug-in unit is read after operating system, and with matching
The plug-in unit of identity allocator carries out data sharing.
Preferably, identity allocator is application or the SharedUserId labels of plug-in unit.
Those skilled in the art further appreciate that, with reference to each example of the embodiments described herein description
Unit and algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate
The interchangeability of hardware and software, generally describes the composition and step of each example according to function in the above description
Suddenly.These functions are performed with hardware or software mode actually, depending on the application-specific and design constraint bar of technical scheme
Part.Those skilled in the art can realize described function to each specific application using distinct methods, but this
Plant and realize it is not considered that beyond the scope of this invention.
The method that is described with reference to the embodiments described herein can use hardware, computing device the step of algorithm
Software module, or the two combination are implemented.Software module can be placed in random access memory(RAM), internal memory, read-only storage
(ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field
In any other form of storage medium well known to interior.
Embodiment above, has been carried out further in detail to the purpose of the present invention, technical scheme and beneficial effect
Illustrate, should be understood that the embodiment that these are only the present invention, the protection model being not intended to limit the present invention
Enclose, within the spirit and principles of the invention, any modification, equivalent substitution and improvements done etc. should be included in the present invention
Protection domain within.
Claims (10)
1. the data sharing method of a kind of application software and plug-in unit, it is characterised in that including:
The application software judge identity allocator in identity allocator and the application software in the plug-in unit whether
Match somebody with somebody, wherein, the identity that the identity allocator corresponds in operating system, the operating system is to the identity with matching
The application software and target plug-in the distribution identical identity of allocator;
When in the identity allocator and the application software in the plug-in unit identity allocator matching when, the application software with
The target plug-in shared data;
Methods described, in addition to:The application software reads the application software and the installation kit title of the plug-in unit;
The application software determines the target plug-in by the identity allocator or the installation kit title, wherein, when logical
When crossing the installation kit title and determining the target plug-in, the plug-in unit of the default installation kit title is the target plug-in;
The application software and the target plug-in data sharing.
2. according to the method described in claim 1, it is characterised in that the identity allocator prompting operating system distributes the body
Part mark, wherein, identity allocator described in identical points out identity described in the operating system distribution identical.
3. according to the method described in claim 1, it is characterised in that the application software carries out data with the target plug-in and is total to
Enjoy including:
The application software carries out data sharing with the target plug-in by default path.
4. according to the method described in claim 1, it is characterised in that the identity allocator is the application or plug-in unit
SharedUserId labels.
5. the data sharing device of a kind of application software and plug-in unit, it is characterised in that including:
Judge module, for judge the identity allocator in identity allocator and the application software in the plug-in unit whether
Match somebody with somebody, wherein, the identity that the identity allocator corresponds in operating system, the operating system is to the identity with matching
The application software and target plug-in the distribution identical identity of allocator;
First sharing module, for when the identity allocator matching in the identity allocator and the application software in the plug-in unit
When, with the target plug-in shared data;
Read module, the installation kit title for reading the application software and the plug-in unit;
Determining module, for determining the target plug-in by the identity allocator or the installation kit title, wherein, when logical
When crossing the installation kit title and determining the target plug-in, the plug-in unit of the default installation kit title is the target plug-in;
Second sharing module, for the target plug-in data sharing.
6. device according to claim 5, it is characterised in that the identity allocator prompting operating system distributes the body
Part mark, wherein, identity allocator described in identical points out identity described in the operating system distribution identical.
7. device according to claim 5, it is characterised in that the sharing module is additionally operable to pass through with the target plug-in
Default path carries out data sharing.
8. device according to claim 5, it is characterised in that the identity allocator is the application or plug-in unit
SharedUserId labels.
9. a kind of method to set up of data sharing, it is characterised in that including:
The identity allocator of matching is set to application software and plug-in unit, wherein, it is provided with the application of the identity allocator
Software and the plug-in unit can be installed in operating system, and the operating system is there is provided the institute of the identity allocator of matching
State application software and plug-in unit distribution identical identity;
The application software is set in the identity allocator being attached to during the plug-in unit is read after the operating system, and with matching
The plug-in unit of identity allocator carries out data sharing;
Methods described, in addition to:The application software reads the application software and the installation kit title of the plug-in unit;
The application software determines target plug-in by the identity allocator or the installation kit title, wherein, when passing through institute
When stating installation kit title and determining the target plug-in, the plug-in unit of the default installation kit title is the target plug-in;
The application software and the target plug-in data sharing.
10. method according to claim 9, it is characterised in that the identity allocator is the application or plug-in unit
Shareduserld labels.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310753019.9A CN103699451B (en) | 2013-12-31 | 2013-12-31 | The data sharing method and device of application software and plug-in unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310753019.9A CN103699451B (en) | 2013-12-31 | 2013-12-31 | The data sharing method and device of application software and plug-in unit |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103699451A CN103699451A (en) | 2014-04-02 |
CN103699451B true CN103699451B (en) | 2017-08-11 |
Family
ID=50360990
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310753019.9A Active CN103699451B (en) | 2013-12-31 | 2013-12-31 | The data sharing method and device of application software and plug-in unit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103699451B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109032820B (en) * | 2018-08-08 | 2021-02-12 | 网易(杭州)网络有限公司 | Processing method and device for application program version compatibility |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101030144A (en) * | 2006-02-28 | 2007-09-05 | 国际商业机器公司 | Software packaging method and system |
CN101566954A (en) * | 2009-05-31 | 2009-10-28 | 珠海金山软件股份有限公司 | Method and device for managing plug-in |
CN101699405A (en) * | 2009-10-26 | 2010-04-28 | 中兴通讯股份有限公司 | Method and device for interaction between host program and plug-in and interaction between plug-ins |
CN102523295A (en) * | 2011-12-20 | 2012-06-27 | 深圳市茁壮网络股份有限公司 | Plug-in registration method and system thereof |
-
2013
- 2013-12-31 CN CN201310753019.9A patent/CN103699451B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101030144A (en) * | 2006-02-28 | 2007-09-05 | 国际商业机器公司 | Software packaging method and system |
CN101566954A (en) * | 2009-05-31 | 2009-10-28 | 珠海金山软件股份有限公司 | Method and device for managing plug-in |
CN101699405A (en) * | 2009-10-26 | 2010-04-28 | 中兴通讯股份有限公司 | Method and device for interaction between host program and plug-in and interaction between plug-ins |
CN102523295A (en) * | 2011-12-20 | 2012-06-27 | 深圳市茁壮网络股份有限公司 | Plug-in registration method and system thereof |
Also Published As
Publication number | Publication date |
---|---|
CN103699451A (en) | 2014-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105373396B (en) | Update of plug-in loading method and device in plug-platform | |
Boschma et al. | The handbook of evolutionary economic geography | |
CN105900104B (en) | Applet migration in safety element | |
CN102087716B (en) | Multi-application Java smart card | |
CN104754062B (en) | Information popularization method, server and user terminal based on internet | |
CN107967316A (en) | A kind of method of data synchronization, equipment and computer-readable recording medium | |
CN107506221A (en) | Application program updating method, apparatus and equipment | |
CN106598672A (en) | Application configuration method and apparatus | |
CN103019791A (en) | Software deploying method and system | |
CN109766199A (en) | Node communication method and device in a kind of robot operating system | |
CN101983376A (en) | Access device, information recording device, information recording system, file management method, and program | |
CN103605537B (en) | The installation method of a kind of software and device | |
CN107526608A (en) | A kind of OTA AKUs upgrade method and equipment | |
CN103716346A (en) | Management method and device of application on android handset client | |
CN107729072A (en) | Control property read method, device, terminal and readable storage medium storing program for executing | |
CN106610859A (en) | Program update method, device and system, and imaging box | |
CN110008665A (en) | A kind of authority control method and device of block chain | |
CN110213290A (en) | Data capture method, API gateway and storage medium | |
CN105955773A (en) | System upgrading method and device | |
CN105103125B (en) | The acquisition methods and NFV devices of clock interrupt signal | |
CN103699451B (en) | The data sharing method and device of application software and plug-in unit | |
CN103905201B (en) | Interaction method and device for master application and multiple slave applications | |
CN107102889A (en) | A kind of resources of virtual machine method of adjustment and device | |
CN106990988A (en) | The method and device that a kind of program updates | |
CN103761118B (en) | A kind of smart card and the method for smartcard internal administration application |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |