CN104917884B - A kind of data transmission method and device - Google Patents
A kind of data transmission method and device Download PDFInfo
- Publication number
- CN104917884B CN104917884B CN201510267104.3A CN201510267104A CN104917884B CN 104917884 B CN104917884 B CN 104917884B CN 201510267104 A CN201510267104 A CN 201510267104A CN 104917884 B CN104917884 B CN 104917884B
- Authority
- CN
- China
- Prior art keywords
- data
- transmission data
- activity
- transmission
- memory space
- 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.)
- Expired - Fee Related
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention discloses a kind of data transmission method and device, method therein may include:When monitoring that the first Activity in Android platform carries out data transmission to the 2nd Activity, the size of the transmission data is judged;When the size for judging the transmission data exceedes predetermined threshold value, designated memory space is arrived into target data storage corresponding to the transmission data, the target data includes transmitting the related information of data or the transmission data in itself;When receiving the 2nd Activity and obtaining the instruction of the transmission data, target data corresponding to described in the designated memory space obtains the Data Concurrent that transmits and delivers to the 2nd Activity.The communication that can cause that between the Activity in Android platform big data can be carried out using the present invention improves the communication efficiency of component in Android platform with interacting.
Description
Technical field
The present invention relates to data communication technology field, more particularly to a kind of data transmission method and device.
Background technology
Activity be most basic and most commonly seen four big component in Android components (Activity,
One of Service is serviced, Content Provider content providers, Broadcast Receiver radio receivers).One
In individual Android applications, an Activity is exactly generally a single screen, and it can show that some controls also may be used above
Responded with monitoring and handling the event of user.Communicated between Activity by Intent (intention), Intent master
If solving the communication between every component of Android applications, Intent is responsible for action, action to once-through operation in application
Be related to data, additional data is described, Android then according to this Intent description, is responsible for finding corresponding component, will
Intent passes to the component of calling, and completes the calling of component.Therefore, Intent plays the part of in Activity communication interaction
The effect of media mediation, the special relevant information that component is provided and called mutually, realizes the solution between caller and callee
Coupling.
Many individual Activity are had in one application program of Android platform at present, and are all existed between Activity
There are data transfer or the process of communication, and be typically all to realize the communication between Activity with interacting by Intent.So
And in the prior art, there is limitation in Intent and drawback, the i.e. data more than 1K would not allow for being passed between Activity
It is defeated.Therefore for needing to carry out the transmission of big image data between some Activity, for example, some just lists need to transmit
To another Activity processing, will be unable to realize.
The content of the invention
Technical problem to be solved of the embodiment of the present invention is, there is provided a kind of data transmission method and device, realizes
The communication of the big data between Activity in Android platform improves the communication effect of component in Android platform with interacting
Rate.
In a first aspect, the embodiments of the invention provide a kind of data transmission method, applied to android system, it may include:
When monitoring that the first Activity in Android platform carries out data transmission to the 2nd Activity, judge
The size of the transmission data;
When the size for judging the transmission data exceedes predetermined threshold value, by target data corresponding to the transmission data
Designated memory space is stored, the target data includes the related information for transmitting data or the transmission data in itself,
The related information is the shortcut for obtaining the transmission data;
When receiving the instruction of the 2nd Activity acquisitions transmission data, according to the designated memory space
In it is described corresponding to target data obtain it is described transmission Data Concurrent deliver to the 2nd Activity.
It is described when the size that judge the transmission data with reference in a first aspect, in the first possible implementation
During more than predetermined threshold value, designated memory space is arrived into target data storage corresponding to the transmission data, including:
When the size for judging the transmission data exceedes predetermined threshold value, triggering creates data space;By described in
Target data storage corresponding to data is transmitted into the data space of the establishment;Or
When the size for judging the transmission data exceedes predetermined threshold value, the memory space pre-set is obtained;By institute
Target data storage corresponding to transmission data is stated into the memory space pre-set.
With reference in a first aspect, in second of possible implementation, the target data includes transmitting the pass of data
Join information;
Target data corresponding to described in the designated memory space obtains the transmission data, including:
Related information corresponding to the transmission data in the designated memory space, search the transmission data
Actual deposit position;
According to the actual deposit position, search and obtain the transmission data.
With reference in a first aspect, in the third possible implementation, it is characterised in that the related information includes described
Transmit at least one related information in routing information, address information or the index information of data storage.
Second with reference to the possible implementation of the first of first aspect or first aspect or first aspect is possible
Any one mode in the possible implementation of the third of implementation or first aspect, in the 4th kind of possible implementation
In, the first Activity and the 2nd Activity, which belongs to same Android applications or belongs to different Android, to be answered
With.
Second aspect, the embodiments of the invention provide a kind of data transmission device, it may include:
Detection module, monitor that the first Activity in Android platform enters line number to the 2nd Activity for working as
During according to transmission, the size of the transmission data is judged;
Memory module, for when judge it is described transmission data size exceed predetermined threshold value when, by the transmission data
Designated memory space is arrived in corresponding target data storage, and the target data includes the related information or described of the transmission data
Transmit data in itself, the related information is the shortcut for obtaining the transmission data;
Acquisition module, for when receiving the 2nd Activity and obtaining the instruction of the transmission data, according to institute
The corresponding target data acquisition transmission Data Concurrent stated in designated memory space delivers to the 2nd Activity.
With reference to second aspect, in the first possible implementation, the memory module, including:
First memory cell, for when the size for judging the transmission data exceedes predetermined threshold value, triggering to create number
According to memory space;By target data storage corresponding to the transmission data into the data space of the establishment;Or
Second memory cell, for when the size for judging the transmission data exceedes predetermined threshold value, acquisition to be set in advance
The memory space put;By target data storage corresponding to the transmission data into the memory space pre-set.
With reference to second aspect, in second of possible implementation, the target data includes transmitting the pass of data
Join information;
The acquisition module, including:
Searching unit, for when receiving the 2nd Activity and obtaining the instruction of the transmission data, according to institute
Related information corresponding to the transmission data in designated memory space is stated, searches the actual deposit position of the transmission data;
Acquiring unit, for according to the actual deposit position, searching and obtaining the transmission data;
Transmitting element, for the transmission data of the acquisition to be sent to the 2nd Activity.
With reference to second aspect, in the third possible implementation, the related information includes the transmission data and deposited
At least one related information in routing information, address information or the index information put.
Second with reference to the possible implementation of the first of second aspect or second aspect or second aspect is possible
Any one mode in the possible implementation of the third of implementation or second aspect, in the 4th kind of possible implementation
In, the first Activity and the 2nd Activity, which belongs to same Android applications or belongs to different Android, to be answered
With.
Implement the embodiment of the present invention, have the advantages that:
The embodiment of the present invention, by monitor and judge in data transmission method the Activity in Android platform it
Between the size that carries out data transmission, related information corresponding to the transmission data more than predetermined threshold value or transmission data are stored in itself
, then can be according to designated memory space when the Activity for receiving transmission data need to obtain transmission data to designated memory space
In corresponding related information or transmission data obtain transmission data in itself, i.e., when between the Activity in Android platform
When carrying out big data transmission, due to by transmit data in itself or transmission data related information storage to the shared sky specified
Between, so that when Activity need to obtain transmission data, it can be obtained and appointed by way of the data sharing of such a communal space
The transmission data for size of anticipating, avoid because transmission data are excessive and the drawbacks of communication can not be transmitted, improve Android
The performance and efficiency carried out data transmission between Activity in platform.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of data transmission method in the embodiment of the present invention;
Fig. 2 a are the schematic flow sheets of another data transmission method in the embodiment of the present invention;
Fig. 2 b are the schematic flow sheets of another data transmission method in the embodiment of the present invention;
Fig. 3 is the schematic flow sheet of another data transmission method in the embodiment of the present invention;
Fig. 4 and Fig. 5 is a concrete application scene schematic diagram of data transmission method in the embodiment of the present invention;
Fig. 6 is a kind of structural representation of data transmission device in the embodiment of the present invention;
Fig. 7 is the structural representation of another data transmission device in the embodiment of the present invention;
Fig. 8 is the structural representation of another data transmission device in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
Although it should be appreciated that using the grade of term first, second describe Activity or unit herein, these
Activity or unit should should not be limited by these terms, and these terms are only applied to be distinguished from each other.In the embodiment of the present invention
The middle term that uses is only merely for the purpose of description specific embodiment, and is not intended to be limiting the present invention.In the embodiment of the present invention
" one kind ", " described " and "the" with the singulative used in appended claims are also intended to including most forms, are removed
Non- context clearly shows that other implications.It is also understood that term "and/or" used herein refer to and comprising one or
Multiple associated list items purposes any or all may combine.
It should be noted that the data transmission method in the embodiment of the present invention can apply to android system
Smart mobile phone, tablet personal computer, media player, intelligent television, Intelligent bracelet, Intelligent worn device, MP3 player (Moving
Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio aspect 3), MP4
(Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio aspect 3) is broadcast
Put device, personal digital assistant (Personal Digital Assistant, PDA) pocket computer on knee and desktop computer
Deng user equipment.
It should also be noted that, the everything executive agent in the present invention is mainly by android system according to Intent
Mechanism performs completion, wherein also including the interactive actions such as the request between Activity or Activity, inquiry, in following reality
Apply in example no longer to emphasize one by one.
Fig. 1 is a kind of schematic flow sheet of data transmission method in the embodiment of the present invention, below in conjunction with accompanying drawing 1 to this
A kind of data transmission method in inventive embodiments describes in detail, as shown in figure 1, a kind of data transfer in the present embodiment
Method may comprise steps of S101- steps S103.
Step S101:When monitor the first Activity in Android platform to the 2nd Activity carry out data biography
When defeated, the size of the transmission data is judged.
Specifically, when between monitoring the Activity in Android platform carrying out data transmission, judge to transmit data
Size.Such as in Android platform, the first Activity to the 2nd Activity carry out data transmission when, judge the biography
The size of transmission of data.Wherein, transmission data may include image data, file data, video data or voice data etc..Need
Bright, the first Activity and the 2nd Activity may belong to same Android applications and can also belong to different
Android is applied.
Step S102:It is when the size for judging the transmission data exceedes predetermined threshold value, the transmission data are corresponding
Target data storage arrive designated memory space.
Specifically, when judging that the size for transmitting data exceedes predetermined threshold value, by target data corresponding to transmission data
Designated memory space is stored, the target data includes the related information for transmitting data or the transmission data in itself,
The related information is the shortcut for obtaining the transmission data.Further, related information includes the transmission number
According at least one related information in the routing information of storage, address information or index information.It can will transmit the fast of data
Prompt acquisition modes are stored in designated memory space, and transmission data can also be stored in into designated memory space in itself.Transmit data
Preset threshold range can be set according to actual conditions, it is preferable that predetermined threshold value could be arranged to 1K.Wherein, store
Space can be database either other data spaces.
Step S103:When receiving the instruction of the 2nd Activity acquisitions transmission data, according to the finger
The corresponding target data acquisition transmission Data Concurrent determined in memory space delivers to the 2nd Activity.
Specifically, when the instruction of the acquisition that the 2nd Activity is received in the Android platform transmission data,
Corresponding target data in designated memory space obtains transmission Data Concurrent and delivers to the 2nd Activity.I.e. when second
When Activity need to obtain the transmission data, the corresponding target data in designated memory space obtains the transmission number
According to.For example, in Android platform when the first Activity carries out image data transmission to the 2nd Activity, by sentencing
The image data size of breaking can not be directly transmitted more than 1K, then is the pass of image data by the target data of the image data
Join information, such as designated memory space is arrived in routing information, address information or index information storage;Or by the image data
Target data is that image data stores designated memory space in itself.When the 2nd Activity needs to carry out the acquisition of image data
When, then the target data in designated memory space obtains to image data, according to routing information, address information or
Index information etc. searches actual deposit position or the address of image data, so as to finally obtain image data.
The embodiment of the present invention, by monitor and judge in data transmission method the Activity in Android platform it
Between the size that carries out data transmission, related information corresponding to the transmission data more than predetermined threshold value or transmission data are stored in itself
, then can be according to designated memory space when the Activity for receiving transmission data need to obtain transmission data to designated memory space
In corresponding related information or transmission data obtain transmission data in itself, i.e., when between the Activity in Android platform
When carrying out big data transmission, due to by transmit data in itself or transmission data related information storage to the shared sky specified
Between, so that when Activity need to obtain transmission data, it can be obtained and appointed by way of the data sharing of such a communal space
The transmission data for size of anticipating, avoid because transmission data are excessive and the drawbacks of communication can not be transmitted, improve Android
The performance and efficiency carried out data transmission between Activity in platform.
Fig. 2 a and Fig. 2 b are the schematic flow sheets of another data transmission method in the embodiment of the present invention, below in conjunction with
Accompanying drawing 2a and accompanying drawing 2b describes in detail to another data transmission method in the embodiment of the present invention, such as Fig. 2 a and 2b institutes
Show, another data transmission method in the embodiment of the present invention may comprise steps of S201- steps S203.
Step S201:When monitor the first Activity in Android platform to the 2nd Activity carry out data biography
When defeated, the size of the transmission data is judged.
Specifically, the method and step S101 in the embodiment of reference chart 1 can be corresponded to, will not be repeated here.
Step S202a:When the size for judging the transmission data exceedes predetermined threshold value, it is empty that triggering creates data storage
Between;By target data storage corresponding to the transmission data into the data space of the establishment.
Specifically, when judging that the size for transmitting data exceedes predetermined threshold value, triggering creates data space, will pass
Target data storage is into the data space of establishment corresponding to transmission of data;The target data includes the transmission data
In itself, the related information is the shortcut for obtaining the transmission data for related information or the transmission data.
So that the shortcut for transmitting data is stored in the data space of establishment, transmission data can also be stored in wound in itself
In the data space built.Wherein, transmitting the preset threshold range of data can be set according to actual conditions, preferably
Ground, predetermined threshold value could be arranged to 1K;Memory space can be database either other data spaces.Further,
Related information includes at least one association letter in routing information, address information or the index information of the transmission data storage
Breath.
Further, working as in the step S202a in above-described embodiment, it is pre- to judge that the size of the transmission data exceedes
If during threshold value, triggering creates data space;By target data storage corresponding to the transmission data to the number of the establishment
According in memory space, S202b can also realize as follows.
Step S202b:When the size for judging the transmission data exceedes predetermined threshold value, the storage pre-set is obtained
Space;By target data storage corresponding to the transmission data into the memory space pre-set.
Specifically, when judging that the size for transmitting data exceedes predetermined threshold value, the memory space pre-set is obtained;Will
Target data storage is into the memory space pre-set corresponding to the transmission data;The target data includes described
In itself, the related information is for obtaining the quick of the transmission data for the related information of transmission data or the transmission data
Mode.The shortcut for transmitting data can be stored in the memory space pre-set, can also be by transmission data in itself
It is stored in the memory space pre-set.The preset threshold range of transmission data can be set according to actual conditions, preferably
Ground, predetermined threshold value could be arranged to 1K.Wherein, memory space can be database either other data spaces.Enter one
Step ground, related information include at least one pass in routing information, address information or the index information of the transmission data storage
Join information.
Step S203:When receiving the instruction of the 2nd Activity acquisitions transmission data, according to the finger
The corresponding target data acquisition transmission Data Concurrent determined in memory space delivers to the 2nd Activity.
Specifically, when the instruction of the acquisition that the 2nd Activity is received in the Android platform transmission data,
Corresponding target data in designated memory space obtains transmission Data Concurrent and delivers to the 2nd Activity.I.e. when second
When Activity need to obtain the transmission data, the data space created according to triggering or the memory space pre-set
In corresponding target data obtain the transmission data.For example, when the first Activity is to second in Android platform
When Activity carries out image data transmission, by judging that the image data size can not be directly transmitted more than 1K, then will
The target data of the image data is the related information of image data, such as routing information, address information or index information are deposited
Store up designated memory space;Or by the target data of the image data be image data in itself store triggering create data
In memory space or the memory space pre-set, when the 2nd Activity needs to carry out the acquisition of image data, then root
Target data in the data space created according to triggering or the memory space pre-set obtains to image data,
Actual deposit position or the address of image data are searched according to routing information, address information or index information etc., so as to final
Obtain image data.It is understood that either it is that the data space that triggering creates or the storage pre-set are empty
Between, when the first Activity transmits data to the 2nd Activity, it is necessary to which the information of memory space is notified to second
Activity, or the 2nd Activity voluntarily obtain the information of memory space, can carry out mesh according to the memory space
Mark the acquisition of data.
The embodiment of the present invention, by monitor and judge in data transmission method the Activity in Android platform it
Between the size that carries out data transmission, related information corresponding to the transmission data more than predetermined threshold value or transmission data are stored in itself
, then can be according to designated memory space when the Activity for receiving transmission data need to obtain transmission data to designated memory space
In corresponding related information or transmission data obtain transmission data in itself, i.e., when between the Activity in Android platform
When carrying out big data transmission, due to by transmit data in itself or transmission data related information storage to the shared sky specified
Between, so that when Activity need to obtain transmission data, it can be obtained and appointed by way of the data sharing of such a communal space
The transmission data for size of anticipating, avoid because transmission data are excessive and the drawbacks of communication can not be transmitted, improve Android
The performance and efficiency carried out data transmission between Activity in platform.
Fig. 3 is the schematic flow sheet of another data transmission method in the embodiment of the present invention, right below in conjunction with accompanying drawing 3
Another data transmission method in the embodiment of the present invention describes in detail, as shown in figure 3, another in the embodiment of the present invention
Kind data transmission method may comprise steps of S301- steps S305.
Step S301:When monitor the first Activity in Android platform to the 2nd Activity carry out data biography
When defeated, the size of the transmission data is judged.
Specifically, the method and step S201 in the embodiment of reference chart 2 can be corresponded to, will not be repeated here.
Step S302:When the size for judging the transmission data exceedes predetermined threshold value, it is empty that triggering creates data storage
Between;By target data storage corresponding to the transmission data into the data space of the establishment.
Specifically, the method and step S202a in the embodiment of reference chart 2 can be corresponded to, will not be repeated here;Or the above
Step S302 can also correspond to the method and step S202b in the embodiment of reference chart 2, will not be repeated here.
Step S303:When receiving the instruction of the 2nd Activity acquisitions transmission data, according to the finger
Determine related information corresponding to the transmission data in memory space, search the actual deposit position of the transmission data.
Specifically, the target data includes transmitting the related informations of data, when receiving the in Android platform
During the instruction of the two Activity acquisition transmission data, the corresponding target data in designated memory space, which obtains, to be passed
Transmission of data is simultaneously sent to the second Activity.I.e. when the 2nd Activity need to obtain the transmission data, created according to triggering
Corresponding target data in data space or the memory space pre-set, obtain and search actually depositing for transmission data
Position is put, such as transmission data are searched according to routing information, address information or the index information of transmission data.
Step S304:According to the actual deposit position, search and obtain the transmission data.
Specifically, according to the address of the actual deposit position obtained in step S303 or routing information etc., search and obtain
Transmit data.For example, in Android platform when the first Activity carries out image data transmission to the 2nd Activity,
Then it is picture number by the target data of the image data by judging that the image data size can not be directly transmitted more than 1K
According to related information, such as routing information, address information or index information storage arrive designated memory space;Or by the picture
The target data of data is that the storage that image data stores the triggering data space created or pre-set in itself is empty
Between in, when the 2nd Activity need carry out image data acquisition when, then according to triggering create data space or
Target data in the memory space pre-set obtains to image data, according to routing information, address information or rope
Fuse breath etc. searches actual deposit position or the address of image data, that is, the deposit position of transmission data is searched, finally according to reality
Border deposit position is so as to finally obtain image data.It is understood that either be triggering create data space or
The memory space that person pre-sets, when the first Activity transmits data to the 2nd Activity, it is necessary to by memory space
Information notifies voluntarily to obtain the information of memory space to the 2nd Activity, or the 2nd Activity, can be according to this
Memory space carries out the acquisition of target data.
Step S305:The transmission data of the acquisition are sent to the 2nd Activity.
Specifically, it is sent to according to the transmission data obtained in step S304 and initiates the second of data acquisition request
Activity。
In specific application scenarios, Fig. 4 and Fig. 5 are a concrete applications of data transmission method in the embodiment of the present invention
Schematic diagram of a scenario, Fig. 4 be now with the method carried out data transmission between the Activity under the Intent mechanism in technology, when
When the size of transmission data exceedes certain predetermined threshold value, then it can not be transmitted, drawback be present;Fig. 5 is combined with the present invention
Data transmission method implementation, when monitor the Activity1 in Android platform to Activity2 carry out picture
During data transfer, by judging that the image data size can not be directly transmitted more than 1K, then by the target of the image data
Data are the related information of image data, such as specified database is arrived in routing information, address information or index information storage;Or
The target data of the image data is that image data stores specified database in itself by person, when Activity2 needs to carry out figure
During the acquisition of sheet data, then the target data in specified database obtains to image data, according to routing information,
Location information or index information etc. search actual deposit position or the address of image data, so as to finally obtain image data.Tool
The implementation process or step of body can carry out corresponding according to the difference of the Activity application scenarios in Android platform
Adjustment, the present invention do not enumerate.
The embodiment of the present invention, by monitor and judge in data transmission method the Activity in Android platform it
Between the size that carries out data transmission, related information corresponding to the transmission data more than predetermined threshold value or transmission data are stored in itself
, then can be according to designated memory space when the Activity for receiving transmission data need to obtain transmission data to designated memory space
In corresponding related information or transmission data obtain transmission data in itself, i.e., when between the Activity in Android platform
When carrying out big data transmission, due to by transmit data in itself or transmission data related information storage to the shared sky specified
Between, so that when Activity need to obtain transmission data, it can be obtained and appointed by way of the data sharing of such a communal space
The transmission data for size of anticipating, avoid because transmission data are excessive and the drawbacks of communication can not be transmitted, improve Android
The performance and efficiency carried out data transmission between Activity in platform.
It should be noted that the data transmission device in the embodiment of the present invention can be the intelligence with android system
Mobile phone, tablet personal computer, media player, intelligent television, Intelligent bracelet, Intelligent worn device, MP3 player (Moving
Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio aspect 3), MP4
(Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio aspect 3) is broadcast
Put device, personal digital assistant (Personal Digital Assistant, PDA) pocket computer on knee and desktop computer
Deng user equipment.
Fig. 6 is a kind of structural representation of data transmission device in the embodiment of the present invention, to perform shown in above-mentioned Fig. 1
A kind of flow of data transmission method in embodiment.
Below in conjunction with accompanying drawing 6, a kind of structure of data transmission device in the embodiment of the present invention is described in detail.
The device 10 may include:Detection module 101, memory module block 102 and acquisition module 103.
Detection module 101, monitor that the first Activity in Android platform is carried out to the 2nd Activity for working as
During data transfer, the size of the transmission data is judged.
Specifically, detection module 101 can perform all methods and flow in simultaneously Method Of Accomplishment step S101, herein not
Repeat again.
Memory module 102, for when judge it is described transmission data size exceed predetermined threshold value when, by the transmission number
Designated memory space is arrived according to the storage of corresponding target data, the target data includes related information or the institute of the transmission data
State transmission data in itself, the related information is the shortcut for obtaining the transmission data.
Specifically, memory module 102 can perform all methods and flow in simultaneously Method Of Accomplishment step S102, herein not
Repeat again.
Acquisition module 103, for when receiving the 2nd Activity and obtaining the instruction of the transmission data, according to
The corresponding target data in the designated memory space obtains the transmission Data Concurrent and delivers to described second
Activity。
Specifically, acquisition module 103 can perform all methods and flow in simultaneously Method Of Accomplishment step S103, herein not
Repeat again.
The embodiment of the present invention, by monitor and judge in data transmission method the Activity in Android platform it
Between the size that carries out data transmission, related information corresponding to the transmission data more than predetermined threshold value or transmission data are stored in itself
, then can be according to designated memory space when the Activity for receiving transmission data need to obtain transmission data to designated memory space
In corresponding related information or transmission data obtain transmission data in itself, i.e., when between the Activity in Android platform
When carrying out big data transmission, due to by transmit data in itself or transmission data related information storage to the shared sky specified
Between, so that when Activity need to obtain transmission data, it can be obtained and appointed by way of the data sharing of such a communal space
The transmission data for size of anticipating, avoid because transmission data are excessive and the drawbacks of communication can not be transmitted, improve Android
The performance and efficiency carried out data transmission between Activity in platform.
Fig. 7 is the structural representation of another data transmission device in the embodiment of the present invention, to perform above-mentioned Fig. 2 a
Or the flow of another data transmission method in Fig. 2 b illustrated embodiments.
Below in conjunction with accompanying drawing 7, the structure of another data transmission device in the embodiment of the present invention is situated between in detail
Continue.The device 20 may include:Detection module 201, memory module 202 and acquisition module 203.The memory module 20 may include:
First memory cell 2021 or the second memory cell 2022.
Detection module 201, monitor that the first Activity in Android platform is carried out to the 2nd Activity for working as
During data transfer, the size of the transmission data is judged.
Specifically, detection module 201 can perform all methods and flow in simultaneously Method Of Accomplishment step S201, herein not
Repeat again.
Memory module 202 may include:First memory cell 2021 or the second memory cell 2022.
First memory cell 2021, for when the size for judging the transmission data exceedes predetermined threshold value, triggering to be created
Build data space;By target data storage corresponding to the transmission data into the data space of the establishment;Or
Person
Second memory cell 2022, for when the size for judging the transmission data exceedes predetermined threshold value, obtaining pre-
The memory space first set;By target data storage corresponding to the transmission data into the memory space pre-set.
Unit 2021 or 2022 that memory module 202 wherein in device includes can perform and Method Of Accomplishment step
All methods and flow in S202a or S202b, will not be repeated here.
Acquisition module 203, for when receiving the 2nd Activity and obtaining the instruction of the transmission data, according to
The corresponding target data in the designated memory space obtains the transmission Data Concurrent and delivers to described second
Activity。
Specifically, acquisition module 203 can perform all methods and flow in simultaneously Method Of Accomplishment step S203, herein not
Repeat again.
The embodiment of the present invention, by monitor and judge in data transmission method the Activity in Android platform it
Between the size that carries out data transmission, related information corresponding to the transmission data more than predetermined threshold value or transmission data are stored in itself
, then can be according to designated memory space when the Activity for receiving transmission data need to obtain transmission data to designated memory space
In corresponding related information or transmission data obtain transmission data in itself, i.e., when between the Activity in Android platform
When carrying out big data transmission, due to by transmit data in itself or transmission data related information storage to the shared sky specified
Between, so that when Activity need to obtain transmission data, it can be obtained and appointed by way of the data sharing of such a communal space
The transmission data for size of anticipating, avoid because transmission data are excessive and the drawbacks of communication can not be transmitted, improve Android
The performance and efficiency carried out data transmission between Activity in platform.
Fig. 8 is the structural representation of another data transmission device in the embodiment of the present invention, to perform above-mentioned Fig. 3 institutes
Show the flow of another data transmission method in embodiment.
Below in conjunction with accompanying drawing 8, the structure of another data transmission device in the embodiment of the present invention is situated between in detail
Continue.The device 30 may include:Detection module 301, memory module 302 and acquisition module 303.The memory module 302 may include:
First memory cell 3021 or the second memory cell 3022;The acquisition module 303 may include:Searching unit 3031, obtain list
Member 3032 and transmitting element 3033.
Detection module 301, monitor that the first Activity in Android platform is carried out to the 2nd Activity for working as
During data transfer, the size of the transmission data is judged.
Specifically, detection module 301 can perform all methods and flow in simultaneously Method Of Accomplishment step S301, herein not
Repeat again.
Memory module 302 may include:First memory cell 3021 or the second memory cell 3022.
First memory cell 3021, for when the size for judging the transmission data exceedes predetermined threshold value, triggering to be created
Build data space;By target data storage corresponding to the transmission data into the data space of the establishment;Or
Person
Second memory cell 3022, for when the size for judging the transmission data exceedes predetermined threshold value, obtaining pre-
The memory space first set;By target data storage corresponding to the transmission data into the memory space pre-set.
Unit 2021 or 2022 that storage mould 302 wherein in device includes can perform and Method Of Accomplishment step S202a
Or all methods and flow in S202b, it will not be repeated here.
Acquisition module 303 may include:Searching unit 3031, acquiring unit 3032 and transmitting element 3033.
Searching unit 3031, for when receiving the 2nd Activity and obtaining the instruction of the transmission data, root
According to related information corresponding to the transmission data in the designated memory space, the actual storage position for transmitting data is searched
Put;
Acquiring unit 3032, for according to the actual deposit position, searching and obtaining the transmission data;
Transmitting element 3033, for the transmission data of the acquisition to be sent to the 2nd Activity.
Unit 3031 to 3033 that acquisition module 303 wherein in device includes can perform and Method Of Accomplishment step S303
All methods and flow into S305, will not be repeated here.
The embodiment of the present invention, by monitor and judge in data transmission method the Activity in Android platform it
Between the size that carries out data transmission, related information corresponding to the transmission data more than predetermined threshold value or transmission data are stored in itself
, then can be according to designated memory space when the Activity for receiving transmission data need to obtain transmission data to designated memory space
In corresponding related information or transmission data obtain transmission data in itself, i.e., when between the Activity in Android platform
When carrying out big data transmission, due to by transmit data in itself or transmission data related information storage to the shared sky specified
Between, so that when Activity need to obtain transmission data, it can be obtained and appointed by way of the data sharing of such a communal space
The transmission data for size of anticipating, avoid because transmission data are excessive and the drawbacks of communication can not be transmitted, improve Android
The performance and efficiency carried out data transmission between Activity in platform.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with
The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium
In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
The above disclosed power for being only a kind of preferred embodiment of the present invention, the present invention can not being limited with this certainly
Sharp scope, one of ordinary skill in the art will appreciate that realizing all or part of flow of above-described embodiment, and weighed according to the present invention
Profit requires made equivalent variations, still falls within and invents covered scope.
Claims (10)
- A kind of 1. data transmission method, applied to android system, it is characterised in that including:When monitoring that the first Activity in Android platform carries out data transmission to the 2nd Activity, described in judgement Transmit the size of data;When the size for judging the transmission data exceedes predetermined threshold value, target data corresponding to the transmission data is stored Notified to designated memory space, and by the information of the designated memory space to the 2nd Activity or described second Activity obtains the information of the designated memory space;The target data includes related information or the institute of the transmission data State transmission data in itself, the related information is the shortcut for obtaining the transmission data;When receiving the 2nd Activity and obtaining the instruction of the transmission data, indicate the 2nd Activity according to The corresponding target data in designated memory space described in the acquisition of information of the designated memory space, and according to the mesh Data are transmitted described in mark data acquisition.
- 2. the method as described in claim 1, it is characterised in that described to be preset when the size for judging the transmission data exceedes During threshold value, designated memory space is arrived into target data storage corresponding to the transmission data, including:When the size for judging the transmission data exceedes predetermined threshold value, triggering creates data space;By the transmission Target data storage is into the data space of the establishment corresponding to data;OrWhen the size for judging the transmission data exceedes predetermined threshold value, the memory space pre-set is obtained;By the biography Target data storage is into the memory space pre-set corresponding to transmission of data.
- 3. the method as described in claim 1, it is characterised in that the target data includes transmitting the related information of data;Target data corresponding to described in the designated memory space obtains the transmission data, including:Related information corresponding to the transmission data in the designated memory space, search the reality of the transmission data Deposit position;According to the actual deposit position, search and obtain the transmission data.
- 4. the method as described in claim 1, it is characterised in that the related information includes the path of the transmission data storage At least one related information in information, address information or index information.
- 5. the method as described in claim 1-4 any one, it is characterised in that the first Activity and second Activity belongs to same Android applications or belongs to different Android applications.
- A kind of 6. data transmission device, it is characterised in that including:Detection module, data biography is carried out to the 2nd Activity for working as the first Activity monitored in Android platform When defeated, the size of the transmission data is judged;Memory module, for when the size for judging the transmission data exceedes predetermined threshold value, the transmission data to be corresponded to Target data storage arrive designated memory space, and the information of the designated memory space is notified to the 2nd Activity Or the 2nd Activity obtains the information of the designated memory space;The target data includes the transmission data In itself, the related information is the shortcut for obtaining the transmission data for related information or the transmission data;Acquisition module, for when receiving the 2nd Activity and obtaining the instruction of the transmission data, instruction described the Number of targets corresponding to described in two Activity designated memory spaces according to the acquisition of information of the designated memory space According to, and the transmission data are obtained according to the target data.
- 7. device as claimed in claim 6, it is characterised in that the memory module, including:First memory cell, for when the size for judging the transmission data exceedes predetermined threshold value, triggering to create data and deposited Store up space;By target data storage corresponding to the transmission data into the data space of the establishment;OrSecond memory cell, for when the size for judging the transmission data exceedes predetermined threshold value, obtaining what is pre-set Memory space;By target data storage corresponding to the transmission data into the memory space pre-set.
- 8. device as claimed in claim 6, it is characterised in that the target data includes transmitting the related information of data;The acquisition module, including:Searching unit, for when receiving the 2nd Activity and obtaining the instruction of the transmission data, according to the finger Determine related information corresponding to the transmission data in memory space, search the actual deposit position of the transmission data;Acquiring unit, for according to the actual deposit position, searching and obtaining the transmission data;Transmitting element, for the transmission data of the acquisition to be sent to the 2nd Activity.
- 9. device as claimed in claim 6, it is characterised in that the related information includes the path of the transmission data storage At least one related information in information, address information or index information.
- 10. the device as described in claim 6-9 any one, it is characterised in that the first Activity and second Activity belongs to same Android applications or belongs to different Android applications.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510267104.3A CN104917884B (en) | 2015-05-22 | 2015-05-22 | A kind of data transmission method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510267104.3A CN104917884B (en) | 2015-05-22 | 2015-05-22 | A kind of data transmission method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104917884A CN104917884A (en) | 2015-09-16 |
CN104917884B true CN104917884B (en) | 2018-01-23 |
Family
ID=54086576
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510267104.3A Expired - Fee Related CN104917884B (en) | 2015-05-22 | 2015-05-22 | A kind of data transmission method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104917884B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11838363B2 (en) | 2018-11-05 | 2023-12-05 | Netapp, Inc. | Custom views of sensor data |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110268692A (en) * | 2018-01-19 | 2019-09-20 | 深圳市大疆创新科技有限公司 | A kind of data processing method, device, controller and movable fixture |
CN109062647B (en) * | 2018-07-20 | 2021-11-09 | 武汉斗鱼网络科技有限公司 | Data sharing method, device and equipment of active window and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103067465A (en) * | 2012-12-20 | 2013-04-24 | 广东一一五科技有限公司 | File sharing method and system |
CN104077265A (en) * | 2013-03-25 | 2014-10-01 | 通用电气航空***有限责任公司 | Method of hybrid message passing with shared memory |
CN104202309A (en) * | 2014-08-18 | 2014-12-10 | 深圳市江波龙电子有限公司 | Data transmission control method and apparatus |
-
2015
- 2015-05-22 CN CN201510267104.3A patent/CN104917884B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103067465A (en) * | 2012-12-20 | 2013-04-24 | 广东一一五科技有限公司 | File sharing method and system |
CN104077265A (en) * | 2013-03-25 | 2014-10-01 | 通用电气航空***有限责任公司 | Method of hybrid message passing with shared memory |
CN104202309A (en) * | 2014-08-18 | 2014-12-10 | 深圳市江波龙电子有限公司 | Data transmission control method and apparatus |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11838363B2 (en) | 2018-11-05 | 2023-12-05 | Netapp, Inc. | Custom views of sensor data |
Also Published As
Publication number | Publication date |
---|---|
CN104917884A (en) | 2015-09-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3531290B1 (en) | Data backup method, apparatus, electronic device, storage medium, and system | |
CN101710976B (en) | Security-protection management system and monitoring method | |
CN102023843B (en) | Function calling method and device as well as smart card | |
CN104917884B (en) | A kind of data transmission method and device | |
CN105210396A (en) | Method and apparatus for selecting information pushing terminal | |
CN106878975B (en) | A kind of method and device of terminal access cell | |
CN105553831A (en) | Message delivery method and system | |
CN106658111A (en) | Screen projection method and device | |
CN106201468A (en) | Screen capture processing method and device and electronic equipment | |
CN106484882A (en) | A kind of management method of database connection pool and device | |
CN104915855B (en) | The predictor method and device of order competition for orders rate | |
CN103312590A (en) | Method, device, receiving terminal, transmitting terminal and equipment for group communication | |
CN103701653B (en) | The processing method of a kind of interface hot plug configuration data and network configuration server | |
CN106776039A (en) | A kind of data processing method and device | |
CN101626497A (en) | Alarm linkage method and alarm linkage device | |
CN109992399A (en) | Method for managing resource, device, mobile terminal and computer readable storage medium | |
CN103702277A (en) | Data transmission method and electronic equipment | |
CN104917906A (en) | Information obtaining method, information recommending method, electronic equipment and network server | |
CN103634360B (en) | Sensor function shares application process, system and server, mobile terminal | |
CN107493312A (en) | A kind of service calling method and device | |
CN109309858B (en) | Display method, device, equipment and medium of mutually exclusive icon | |
CN111083763A (en) | Network control method, network control device, storage medium and electronic equipment | |
CN106102011A (en) | Method, device and the terminal that a kind of terminal positioning processes | |
CN115103053A (en) | Call establishment method, device, terminal, system and readable storage medium | |
CN114973524A (en) | Return processing method and device of shared equipment and computer equipment |
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 | ||
CP01 | Change in the name or title of a patent holder |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
CP01 | Change in the name or title of a patent holder | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180123 |
|
CF01 | Termination of patent right due to non-payment of annual fee |