Movatterモバイル変換


[0]ホーム

URL:


CN103763329A - Data transmission method and device - Google Patents

Data transmission method and device
Download PDF

Info

Publication number
CN103763329A
CN103763329ACN201410053962.3ACN201410053962ACN103763329ACN 103763329 ACN103763329 ACN 103763329ACN 201410053962 ACN201410053962 ACN 201410053962ACN 103763329 ACN103763329 ACN 103763329A
Authority
CN
China
Prior art keywords
file
network
request
module
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410053962.3A
Other languages
Chinese (zh)
Other versions
CN103763329B (en
Inventor
石彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing LtdfiledCriticalLenovo Beijing Ltd
Priority to CN201410053962.3ApriorityCriticalpatent/CN103763329B/en
Publication of CN103763329ApublicationCriticalpatent/CN103763329A/en
Application grantedgrantedCritical
Publication of CN103763329BpublicationCriticalpatent/CN103763329B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

The invention provides a data transmission method and device. When files in an electronic device are uploaded, a second file with small data volume is generated for a first file and is uploaded; when a network user requests the first file, the first file with large data volume is uploaded. By the adoption of the data transmission method, on the premise of not affecting the experience of the network user, network resources needed by the file transmission are saved, and at the same time, network expenses are saved for users uploading the files.

Description

A kind of method of transfer of data and device
Technical field
The invention belongs to field of data transmission, relate in particular to a kind of method and device of transfer of data.
Background technology
Along with the development of electronic technology, contacting of people and the Internet is further tight, user can be at any time by network by the mobile phone of oneself, PDA(Personal Digital Assistant, personal digital assistant), pad(palmtop PC) etc. the various file transfer in electronic equipment in network, share.
File in consumer electronic devices takies larger space, and as photo files is generally 1M, the document files of entire article can reach 1M, and video file is larger.
In the file that user uploads, some meetings obtain a large amount of online friends' concern, but what have can not be paid close attention in a large number, even unmanned concern.The unmanned file of paying close attention to is uploaded and not only can not be reached the object of sharing, and has also taken a large amount of network traffics, has caused network resources waste.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of method and device of transfer of data, save and upload required Internet resources.
A method for transfer of data, comprising:
Obtain the first file of storing in electronic equipment;
According to described first file generated the second file, and associated described the second file and described the first file; Described the second file data amount is less than the data volume of the first file;
Transmit described the second file to the webserver;
When receiving network request, according to described association, determine the first file, transmit described the first file to the described webserver, and replace described the second file; Described network request is the request that the first file is transmitted in the request of webserver transmission, on described network request indication network, has user to ask to browse the first file.
Above-mentioned method, preferred, described first file generated the second file of described foundation comprises:
Intercept the partial content of described the first file, generate the second file.
Above-mentioned method, preferred, described first file generated the second file of described foundation comprises:
Change the form of described the first file, generate the second file.
Above-mentioned method, preferred, described in obtain the first file of storing in electronic equipment after, according to before described first file generated the second file, also comprise:
Obtain current network information;
According to described current network information, judge that current network is not meet the network that default low rate require.
Above-mentioned method, preferred, also comprise:
According to current network information, judge that current network is, while meeting the network that default low rate require, to transmit described the first file to the webserver.
Above-mentioned method, preferred, the request user profile of carrying request the first file in described network request, determines the first file according to described association, transmits described the first file to before the described webserver, also comprises:
Resolve described network request, obtain asking the request user profile of the first file;
Resolve described request user profile, obtain described request user's authority, judge that described authority meets default authority requirement.
Above-mentioned method, preferred, also comprise:
Judge when described authority does not meet default authority requirement, ignore described network request.
Above-mentioned method, preferred, described in obtain the first file of storing in electronic equipment after, also comprise:
Judge that described the first file is image file;
Wherein, the form of described the first file of described change, obtains the second file, comprising:
The resolution that changes described image obtains the second file, and the image resolution ratio in described the second file is lower than the image resolution ratio in the first file.
Above-mentioned method, preferred, described in obtain the first file of storing in electronic equipment after, also comprise:
Judge that described the first file is image file;
Wherein, the form of described the first file of described change, obtains the second file, comprising:
The pixel depth that changes described image obtains the second file, and the image pixel degree of depth in described the second file is lower than the pixel depth in the first file.
A device for transfer of data, comprising:
The first acquisition module, the first file of storing for obtaining electronic equipment;
Generation module, for described first file generated the second file of foundation, described the second file data amount is less than the data volume of the first file;
Relating module, for described the second file of association and described the first file;
The first transport module, for transmitting described the second file to the webserver;
Receiver module, for receiving network request;
The second transport module, for when described receiver module receives network request, determines the first file according to described association, transmits described the first file to the described webserver, and replaces described the second file;
Wherein, described network request is the request that the first file is transmitted in the request of webserver transmission, on described network request indication network, has user to ask to browse the first file.
Above-mentioned device, preferred, described generation module comprises:
First module, for intercepting the partial content of described the first file, generates the second file.
Above-mentioned device, preferred, described generation module comprises:
Second unit, for changing the form of described the first file, generates the second file.
Above-mentioned device, preferred, also comprise:
The second acquisition module, for obtaining current network information;
The second judge module, for according to described current network information, judges that whether current network is to meet the network that default low rate require, and when not meeting, triggers described generation module.
Above-mentioned device, preferred, also comprise:
The 3rd transport module, for judging that according to current network information current network is, while meeting the network that default low rate require, to transmit described the first file to the webserver when described the second judge module.
Above-mentioned device, preferred, also comprise:
The first parsing module, for resolving described network request, obtains asking the request user profile of the first file;
The second parsing module, for resolving described request user profile, obtains described request user's authority;
The second judge module, for judging whether described authority meets default authority requirement, if met, triggers the second transport module.
Above-mentioned device, preferred, also comprise:
The 3rd judge module, for judging that described the first file is image file;
Wherein, described second unit comprises:
The first subelement, obtains the second file for changing the resolution of described image, and the image resolution ratio in described the second file is lower than the image resolution ratio in the first file.
Above-mentioned device, preferred, also comprise:
The 3rd judge module, for judging that described the first file is image file;
Wherein, described second unit comprises:
The second subelement, obtains the second file for changing the pixel depth of described image, and the image pixel degree of depth in described the second file is lower than the pixel depth in the first file.
Known via above-mentioned technical scheme, compared with prior art, the present invention openly provides a kind of method and device of transfer of data, when the file in electronic equipment is uploaded, for the second less file of the first file generated data volume, and upload the second file that this data volume is less, when having user to ask this first file in network, the first larger file of uploading data amount again, under the prerequisite of experience that does not affect the network user, save the required Internet resources of transfer files, simultaneously for the user who uploads saves network charges.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the flow chart of the embodiment of the method 1 of a kind of transfer of data of providing of the application;
Fig. 2 is the flow chart of the embodiment of the method 2 step S102 of a kind of transfer of data of providing of the application;
Fig. 3 is the flow chart of the embodiment of the method 3 step S102 of a kind of transfer of data of providing of the application;
Fig. 4 is the flow chart of the embodiment of the method 4 of a kind of transfer of data of providing of the application;
Fig. 5 is the flow chart of the embodiment of the method 5 of a kind of transfer of data of providing of the application;
Fig. 6 is the flow chart of the embodiment of the method 6 of a kind of transfer of data of providing of the application;
Fig. 7 is a flow chart of the embodiment of the method 6 step S102 of a kind of transfer of data of providing of the application;
Fig. 8 is another flow chart of the embodiment of the method 6 step S102 of a kind of transfer of data of providing of the application;
Fig. 9 is the structural representation of the device embodiment 1 of a kind of transfer of data of providing of the application;
Figure 10 is the structural representation of generation module in the device embodiment 2 of a kind of transfer of data of providing of the application;
Figure 11 is the structural representation of generation module in the device embodiment 3 of a kind of transfer of data of providing of the application;
Figure 12 is the structural representation of the device embodiment 4 of a kind of transfer of data of providing of the application;
Figure 13 is the structural representation of the device embodiment 5 of a kind of transfer of data of providing of the application;
Figure 14 is the structural representation of the device embodiment 6 of a kind of transfer of data of providing of the application.
Embodiment
For making object, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
For the independence of more specifically emphasizing to implement, this specification relates to number of modules or unit.For example, module or unit can be realized by hardware circuit, and this hardware circuit comprises special VLSI circuit or gate array, such as logic chip, transistor, or other assembly.Module or unit also can be realized in programmable computer hardware, such as field effect programmable gate array, programmable logic array, programmable logic device etc.
Module or unit also can be realized in the software performed by various forms of processors.Such as an executable code module can comprise computer instruction block one or more entities or logic, this block may be formed as, such as, object, program or function.But, not can not the needing physically to put together by operating part of identification module or unit, but can be formed by the different instruction that is stored in diverse location, when combining in logic, form module or unit and reach this module or the desired object in unit.
In fact, executable code module or unit can be a single instruction or multiple instruction, even can be distributed in the several different code section that is arranged in different programs, and across several memory devices.Similarly, operating data can and be shown in this module or unit by identification, and can be with any suitable form enforcement and in any suitable data structure form inner tissue.Operating data can assemble single data set, maybe can be distributed in the different position with different memory devices, and only in electronic signal mode, is present in a system or network at least in part.
" embodiment " or similar term that this specification is mentioned represent the characteristic relevant with embodiment, structure or feature, are included at least one embodiment of the present invention.Therefore term " in one embodiment " that, this specification occurs, " in an embodiment " and similar term may but inevitablely all point to identical embodiment.
Moreover, characteristic of the present invention, structure or feature can be by any way in conjunction with in one or more embodiments.Below explanation will provide many specific details, such as examples such as programming, software module, user's selection, network trading, data base querying, database structure, hardware module, hardware circuit, hardware chips, so that the understanding to the embodiment of the present invention to be provided.But those of ordinary skill in the related art will find out the present invention, even without utilizing wherein one or more specific detail, or utilize other method, assembly, material etc. also can implement.On the other hand, be the present invention that avoids confusion, known structure, material or operation are not described in detail.
The flow chart of the embodiment of the method 1 of a kind of transfer of data that the application as shown in Figure 1 provides, described method can be applicable to an electronic equipment, described electronic equipment can be the electronic equipments such as desktop computer, notebook, panel computer, mobile phone, intelligent television, intelligent watch, Wearable equipment, in described electronic equipment, there is multiple a large amount of data file, this electronic equipment can and the webserver between carry out the transmission of data file.
Step S101: obtain the first file of storing in electronic equipment;
Wherein, described the first file can comprise the file of predeterminated position in electronic equipment, also can comprise the file that carries sign to be uploaded, or is files whole in electronic equipment, and the scope of specifically obtaining of this file to be uploaded can be determined according to actual conditions.Obtaining action can directly be triggered by user's operation, also can be sent out by user's operation room contact, also can be the automatic triggering of electronic equipment take certain hour as the cycle, or the data-triggered of other electronic equipments that received by this electronic equipment, and other modes trigger.
It should be noted that, this file can be the file of arbitrary form, as audio file, video file, image file, document files or above-mentioned two or more in several the file that obtains of combination etc.
Step S102: according to described first file generated the second file, and associated described the second file and described the first file;
Wherein, described the second file data amount is less than the data volume of the first file;
Wherein, according to this first file generated the second file, the data volume of this second file is less than the data volume of the first file, that is to say, the content comprising in identical or this second file of content that this first file comprises with the second file is the various brief information that can show content in the first file such as summary info, summary, fragment and/or the catalogue of the first file, accordingly, store this first file different with the shared memory space of storage the second file.
Such as, when this first file and the second file are image, this first file is the image that resolution is higher, the second file is the image that resolution is lower, when this first file and the second file are text, the text that this first file is full content, the second file can be the chapter 1 (first paragraph) of Summary file or text etc., other forms of files classes seemingly, repeat in the present embodiment no longer one by one.
Wherein, the mode of this association second file and the first file comprises: between the first file and the second file, there is incidence relation, or, by specific identification information, identify the incidence relation of this second file and this first file.
Wherein, when there is incidence relation between the first file and the second file, store this incidence relation information.The brief information of the content comprising in the content that clearly this first file is identical with the second file including in this incidence relation information or this second file content during to be that summary info, summary, fragment and/or the catalogue etc. of the first file are various can show the first file, the shared data volume of the first file is greater than the shared data volume of this second file.
It should be noted that, in actual applications, can be that upload file generates before according to the time of this first file generated the second file, also can be while generating the first file and generate immediately, in the present embodiment, do not limit.
Step S103: transmit described the second file to the webserver;
Concrete, between electronic equipment and the webserver, there is network and be connected, when transmission the second file, can use this network to connect the second file to the webserver.
Certainly, because the data volume of this second file is less than the data volume of this first file, upload this second file to the webserver, the Internet resources that take are less than this first file.
It should be noted that, in actual applications, the network between this electronic equipment and the webserver can comprise: wired network, optical networking, wireless network etc., do not limit in the present embodiment.
Step S104: when receiving network request, determine the first file according to described association, transmit described the first file to the described webserver, and replace described the second file.
Wherein, described network request is the request that the first file is transmitted in the request of webserver transmission, on described network request indication network, has user to ask to browse the first file.
Wherein, upload this second file after the webserver, the user who accesses this webserver can browse the content of this second file.When user loses interest in to the content in this second file, this second file is not carried out to any operation, continue to keep the second file in this webserver, save Internet resources; When user is interested in the content in this second file, can ask to browse the full content that this second file is corresponding, i.e. the first file, the webserver receives user request while browsing full content corresponding to this second file, sends request the network request of transmission the first file to this electronic equipment.
Wherein, when receiving this network request, in this network request, contain the information relevant to this second file, in conjunction with this information, can determine the first associated file of this second file, obtain this first file, and upload this first file to the webserver so that this first file replace this second file, this user can browse the full content in the first file.Because the file of storing in the present webserver is the first file, when other users access this webserver, can directly browse this and have the first file of full content.
Certainly, in this network request, also portability has user's the information of this first file of request, when receiving this network request, this electronic equipment can be pointed out, so that the user of this electronic equipment can according to circumstances select whether to upload this first file, such as, the user of this request the first file is the common network user, can refuse this request, not upload this first file.
Or, at the webserver, the user who asks the first file to be added up, the quantity of this statistics of synchronized transmission while sending network request, so that whether the user of electronic equipment reference uploads the first file.
In the present embodiment, due to initial just the second less file of uploading data amount, while not having user to ask this first file, without the first larger file of uploading data amount, when having user to ask the first file, upload again this first file, like this, both guarantee the comprehensive of content data file in the webserver, saved again Internet resources.
Wherein, first file generated the second file in the method for a kind of transfer of data that the application provides, can adopt multiple different mode to realize.
With reference to figure 2, the flow chart of step S102 in the embodiment of the method 2 of a kind of transfer of data providing for the application, wherein, described step S102 can realize by following steps:
Step S201: intercept the partial content of described the first file, generate the second file;
Wherein, this first file can comprise the file of various ways, as audio file, video file, image file, document files or above-mentioned two or more in several the file that obtains of combination etc.
Wherein, when this first file is image file, a part that can intercept in this image obtains the second file, and the part of this intercepting can be for the head portrait of personage in image, have significant landscape etc.; When this first file is audio-video document, the fragment that can intercept in this audio-video document obtains the second file; When this first file is text, can intercepts the contents such as chapter 1, first paragraph or the summary of text file and obtain the second file; The file of other form also can adopt similar mode to intercept partial content, obtains the second file.
Certainly, in the present embodiment, only provide the mode of several intercepting partial contents, in concrete enforcement, also can adopt other modes to intercept, in the present embodiment, do not limited.
Step S202: associated described the second file and described the first file.
Wherein, associated mode can be set up the incidence relation of the first file and the second file, or in the first file and the second file, adds specific identification information and identify the incidence relation of the two.
Wherein, the incidence relation of setting up the first file and the second file is specifically as follows: in the parameter information of the second file, add the relevant information of the first file so that according to the parameter information of this second file, just can determine the first file of associated.
Wherein, in the first file and the second file, add specific identification information and identify the incidence relation of the two, when receiving after network request, can, according to the corresponding identification information in the information of the second file carrying in this network request, determine the first file that also contains this identification information in electronic equipment in each file of storing.
With reference to figure 3, the flow chart of step S102 in the embodiment of the method 3 of a kind of transfer of data providing for the application, wherein, described step S102 can also realize by following steps:
Step S301: change the form of described the first file, generate the second file;
Because the data volume of this first file is larger, can be the form compared with small data quantity by the change of format of this first file, after change form, obtaining file is the second file.
Such as, when this first file is text, can be txt form by the word change of format of this first file, the form of the second file obtaining is txt form; Or, when this first file is picture file or audio-video document, can be the form that definition is lower by the change of format of this first file, obtain the second file.
Step S302: associated described the second file and described the first file.
In interrelational form and the above embodiments 2, step S202 is similar, in the present embodiment, repeats no more.
Certainly in practical operation, in order to reduce user's network rate, also can judge whether directly the first larger data volume file to be uploaded to the webserver according to the situation of current network.
With reference to figure 4, the flow chart in the embodiment of the method 4 of a kind of transfer of data providing for the application, also comprises step S402-404 after its this embodiment step S101.
S402: obtain current network information;
After getting the first file of storing in electronic equipment, first judge the network condition of current electronic device application, and judge whether this first file to upload in the webserver according to this network condition.
Wherein, judge current network situation according to being the information of current network, first need to obtain electronic equipment current network information, according to this network information, just can judge which kind of network is this current network be specially.
S403: according to described current network information, judge whether current network is the network that meets default low rate requirement, if met, execution step S404; If do not met, execution step S405 is according to described first file generated the second file;
Wherein, according to this network information, can obtain the type of current network, and then can judge whether this network is the network of low rate requirement, and the type of this network can comprise: WLAN(Wireless LAN, WLAN (wireless local area network)) or cellular network etc.
Wherein, these default low rate require network, can according to service conditions, set for user, also by the production firm of electronic equipment, are set.This WLAN can be considered the network that meets low rate requirement, and this cellular network can be considered the network that does not meet low rate requirement.Concrete low rate require to set according to actual conditions, in the present embodiment, repeat no more.And cellular network is the network that does not meet low rate requirement, when the current network of electronic equipment is cellular network, in order to reduce user, use the rate of network, under this network condition, while getting the first file, execution step S405, according to the second less file of this first file generated data volume, make user upload the Internet resources that this second file takies few, and then make network rate less.
Step S404: transmit described the first file to the webserver.
When current network meets default low rate requirement, can directly upload this first file to the webserver, and needn't be according to this first file generated the second file, make the user of this first file of access web server request can directly from the webserver, obtain this first file, needn't send the first file in request from electronic equipment, while having accelerated customer access network, in the reaction time of the webserver, improved user's experience.
In practical operation, for the user who makes demand file in network can obtain the content in the first file as early as possible, and needn't wait for electronic equipment user's operant response, the authority of asking user in network can be set, according to authority setting, whether automatically upload the first file, in this network request, carry request user profile.
With reference to figure 5, the flow chart of the embodiment of the method 5 of a kind of transfer of data providing for the application, wherein, also comprises step S504-507 after step S103 in this embodiment.
Step S504: when receiving network request, resolve described network request, obtain asking the request user profile of the first file;
Wherein, in network request, carry request user profile, when receiving after this network request, resolve this network request, the request user profile that just can obtain asking this first file, this information can comprise: the various information that can show user identity such as user name, the affiliated kind of user.
Step S505: resolve described request user profile, obtain described request user's authority;
Wherein, continue to resolve this request user profile, the authority that can obtain according to the authority condition arranging this request user, the authority condition of this setting can be kind under user, as multiple in common visitor, good friend, VIP etc., this common visitor's authority is minimum, VIP's authority is the highest, the user's name that also can arrange, as user A is set there is highest weight limit, user B and user C have secondary authority, and all the other users have least privilege.
Understandable, the condition of this authority can be set according to actual conditions, not only limits above-mentioned two kinds in the present embodiment.
Step S506: judge whether described authority meets default authority requirement; When not meeting, execution step S507, when meeting, execution step S508 determines the first file according to described association, transmits described the first file to the described webserver, and replaces described the second file;
Wherein, according to this user of user's authority, judge whether to meet default authority requirement, if met, upload the first file, otherwise execution step S507, ignores this network request, does not process.
Wherein this step S508 is consistent with step S104 in embodiment 1, in the present embodiment, repeats no more.
Wherein, default authority require can be: the user of highest weight limit, or default Permission Levels, such as secondary, while asking higher than the user of the authority of secondary, perform step S508 and upload the first file.
Specifically, when this user is the user of highest weight limit, can directly judge that this user meets default authority requirement, according to incidence relation, determine the first file and the first file is uploaded in the webserver; When this user is secondary authority user, inquiry can be set and whether upload the first file, when obtaining after definite uploading, then upload the first file, certainly, this secondary authority user, while meeting default authority requirement, also can directly perform step S508.
Certainly, in the present embodiment, only provide two kinds of modes of setting highest weight limit, in concrete enforcement, also can adopt other authority set-up mode, in the present embodiment, do not limited.
Step S507: ignore described network request.
When this user's authority does not meet default authority requirement, ignore this user's network request, to reduce, upload the Internet resources that the first file takies, save network rate simultaneously.
When this first file is image file, also can to the first file, carries out corresponding processing according to the characteristic of this image file and obtain the second file.
With reference to figure 6, the flow chart of the embodiment of the method 6 of a kind of transfer of data providing for the application, wherein, also comprises step S602 after step S101 in this embodiment.
Step S602: judge that described the first file is image file;
Wherein, according to the parameter information of this first file, can judge that this first file is image file.
Certainly, in concrete enforcement, also can judge that its form is text, video file or audio file etc. according to the parameter information of this first file, in the present embodiment, only as an example of image file example, describe, other forms of file can adopt similar method to process, and obtains the second file.
When this first file is image file, with reference to figure 7, a flow chart of step S102 in the embodiment of the method 6 of a kind of transfer of data providing for the application, wherein, described step S102 can realize by following steps:
Step S701: the resolution that changes described image obtains the second file, the image resolution ratio in described the second file is lower than the image resolution ratio in the first file;
Wherein, when this first file is image file, change the resolution of this image, to obtain second file of resolution lower than this first file, this first file is identical with the picture material that the second file comprises, just due to the two resolution difference so that the two data volume difference, accordingly, transmitting the required Internet resources of this second file is less than and transmits the required Internet resources of this first file.
Step S702: associated described the second file and described the first file.
In interrelational form and the above embodiments 2, step S202 is similar, in the present embodiment, repeats no more.
With reference to figure 8, another flow chart of step S102 in the embodiment of the method 6 of a kind of transfer of data providing for the application, wherein, described step S102 can also realize by following steps:
Step S801: the pixel depth that changes described image obtains the second file, the image pixel degree of depth in described the second file is lower than the pixel depth in the first file;
Wherein, when this first file is image file, change the pixel depth of this image, to obtain second file of pixel depth lower than this first file, this first file is identical with the picture material that the second file comprises, just due to the two pixel depth difference so that the two data volume difference, accordingly, transmitting the required Internet resources of this second file is less than and transmits the required Internet resources of this first file.
Step S802: associated described the second file and described the first file.
In interrelational form and the above embodiments 2, step S202 is similar, in the present embodiment, repeats no more.
Certainly, the data volume of the first file is greater than resolution and the picture depth that resolution that the data volume of this second file can be also this first document image and picture depth are all greater than this second document image.
It should be noted that, in the present embodiment, just for resolution and the pixel depth of the first document image, change, obtain the second file that data volume is less, but be not limited to this two kinds of modes, in actual enforcement, also can adopt other modes to change the data volume of this first file, in the present embodiment, repeat no more.
Be understandable that, after the second file uploads on the webserver, can be kept at electronic equipment, also can delete this second file, only retain the sign that this second file is relevant so that follow-up while receiving network request, can determine the first file according to the relevant sign of this second file.
With reference to figure 9, the structural representation of the device embodiment 1 of a kind of transfer of data providing for the application, wherein, described device can be applicable to an electronic equipment, and this device comprises:
The first acquisition module 901, the first file of storing for obtaining electronic equipment;
Wherein, the first acquisition module 901 obtains the first file of storing in this electronic equipment, this the first file can comprise the file of predeterminated position in electronic equipment, also can comprise the file that carries sign to be uploaded, or be files whole in electronic equipment, the scope of specifically obtaining of this file to be uploaded can be determined according to actual conditions.Obtaining action can directly be triggered by user's operation, also can be sent out by user's operation room contact, also can be the automatic triggering of electronic equipment take certain hour as the cycle, or the data-triggered of other electronic equipments that received by this electronic equipment, and other modes trigger.
It should be noted that, this file can be the file of arbitrary form, as audio file, video file, image file, document files or above-mentioned two or more in several the file that obtains of combination etc.
Generation module 902, for described first file generated the second file of foundation, and associated described the second file and described the first file;
Wherein, described the second file data amount is less than the data volume of the first file;
Wherein, generation module 902 is according to this first file generated the second file, the data volume of this second file is less than the data volume of the first file, that is to say, the content comprising in identical or this second file of content that this first file comprises with the second file is the various brief information that can show content in the first file such as summary info, summary, fragment and/or the catalogue of the first file, accordingly, store this first file different with the shared memory space of storage the second file.
Such as, when this first file and the second file are image, this first file is the image that resolution is higher, the second file is the image that resolution is lower, when this first file and the second file are text, the text that this first file is full content, the second file can be the chapter 1 (or first paragraph) of Summary file or text etc., other forms of files classes seemingly, repeat in the present embodiment no longer one by one.
Wherein, the mode of associated the second file and the first file comprises: between the first file and the second file, there is incidence relation, or, by specific identification information, identify the incidence relation of this second file and this first file.
Wherein, when there is incidence relation between the first file and the second file, store this incidence relation information.The brief information of the content comprising in the content that clearly this first file is identical with the second file including in this incidence relation information or this second file content during to be that summary info, summary, fragment and/or the catalogue etc. of the first file are various can show the first file, the shared data volume of the first file is greater than the shared data volume of this second file.
It should be noted that, in actual applications, can be that upload file generates before according to the time of this first file generated the second file, also can be while generating the first file and generate immediately, in the present embodiment, do not limit.
The first transport module 903, for transmitting described the second file to the webserver;
Concrete, between electronic equipment and the webserver, there is network and be connected, when transmission the second file, can use this network to connect the second file to the webserver.
Certainly, because the data volume of this second file is less than the data volume of this first file, upload this second file to the webserver, the Internet resources that take are less than this first file.
It should be noted that, in actual applications, the network between this electronic equipment and the webserver can comprise: wired network, optical networking, wireless network etc., do not limit in the present embodiment.
Receiver module 904, for receiving network request;
The second transport module 905, for when described receiver module receives network request, determines the first file according to described association, transmits described the first file to the described webserver, and replaces described the second file;
Wherein, described network request is the request that the first file is transmitted in the request of webserver transmission, on described network request indication network, has user to ask to browse the first file.
Wherein, upload this second file after the webserver, the user who accesses this webserver can browse the content of this second file.When user loses interest in to the content in this second file, this second file is not carried out to any operation, continue to keep the second file in this webserver, save Internet resources; When user is interested in the content in this second file, can ask to browse the full content that this second file is corresponding, i.e. the first file, the webserver receives user request while browsing full content corresponding to this second file, sends request the network request of transmission the first file to this electronic equipment.
Wherein, when receiver module 904 receives this network request, in this network request, contain the information relevant to this second file, the second transport module 905 can be determined the first associated file of this second file in conjunction with this information, obtain this first file, and upload this first file to the webserver so that this first file replace this second file, this user can browse the full content in the first file.Because the file of storing in the present webserver is the first file, when other users access this webserver, can directly browse this and have the first file of full content.
Certainly, in this network request, also portability has user's the information of this first file of request, when receiving this network request, this electronic equipment can be pointed out, so that the user of this electronic equipment can according to circumstances select whether to upload this first file, such as, the user of this request the first file is the common network user, can refuse this request, not upload this first file.
Or, at the webserver, the user who asks the first file to be added up, the quantity of this statistics of synchronized transmission while sending network request, so that whether the user of electronic equipment reference uploads the first file.
Need to illustrate, this first transport module and the second transport module can be different structures, and in reality is implemented, in order to simplify the structure of electronic equipment, this first transport module and the second transport module also can be same structure, in the present embodiment, do not limit.
In the present embodiment, due to initial just the second less file of uploading data amount, while not having user to ask this first file, without the first larger file of uploading data amount, when having user to ask the first file, upload again this first file, like this, both guarantee the comprehensive of content data file in the webserver, saved again Internet resources.
Wherein, first file generated the second file in the device of a kind of transfer of data that the application provides, can adopt multiple different mode to realize.
With reference to Figure 10, the structural representation of generation module 902 in the device embodiment 2 of a kind of transfer of data providing for the application, wherein, described generation module 902 can comprise structure:
First module 1001, for intercepting the partial content of described the first file, generates the second file;
Wherein, this first file can comprise the file of various ways, as audio file, video file, image file, document files or above-mentioned two or more in several the file that obtains of combination etc.
Wherein, when this first file is image file, the part thatfirst module 1001 can intercept in this image obtains the second file, and the part of this intercepting can be for the head portrait of personage in image, have significant landscape etc.; When this first file is audio-video document, the fragment thatfirst module 1001 can intercept in this audio-video document obtains the second file; When this first file is text,first module 1001 can intercept the contents such as chapter 1, first paragraph or the summary of text file and obtain the second file; The file of other form also can adopt similar mode to intercept partial content, obtains the second file.
Certainly, in the present embodiment, only provide the mode of several intercepting partial contents, in concrete enforcement, also can adopt other modes to intercept, in the present embodiment, do not limited.
Associative cell 1002, for described the second file of association and described the first file.
Inassociative cell 1002 interrelational forms and above-mentioned embodiment of the method 2, step S202 is similar, in the present embodiment, repeats no more.
With reference to Figure 11, the structural representation of generation module 902 in the device embodiment 3 of a kind of transfer of data providing for the application, wherein, described generation module 902 can comprise structure:
Second unit 1101, for changing the form of described the first file, generates the second file;
Because the data volume of this first file is larger, second unit 1101 can be the form compared with small data quantity by the change of format of this first file, and after change form, obtaining file is the second file.
Such as, when this first file is text, second unit 1101 can be txt form by the word change of format of this first file, the form of the second file obtaining is txt form; Or when this first file is picture file or audio-video document, second unit 1101 can be the form that definition is lower by the change of format of this first file, obtains the second file.
Associative cell 1102, for described the second file of association and described the first file.
In associative cell 1102 interrelational forms and above-mentioned embodiment of the method 2, step S202 is similar, in the present embodiment, repeats no more.
Certainly in practical operation, in order to reduce user's network rate, also can judge whether directly the first larger data volume file to be uploaded to the webserver according to the situation of current network.
With reference to Figure 12, the structural representation of the device embodiment 4 of a kind of transfer of data providing for the application, also comprises in structure shown in described Fig. 9:
Thesecond acquisition module 1202, for obtaining current network information;
After the first file of storing in thefirst acquisition module 1201 gets electronic equipment, first judge the network condition of current electronic device application, and judge whether this first file to upload in the webserver according to this network condition.
Wherein, judge current network situation according to being the information of current network, first need thesecond acquisition module 1202 to obtain electronic equipment current network information, according to this network information, just can judge which kind of network is this current network be specially.
Thefirst judge module 1203, for according to described current network information, judges that whether current network is to meet the network that default low rate require, and when meeting, triggers the3rd transport module 1204; When not meeting, triggergeneration module 1205;
Wherein, thefirst judge module 1203 can obtain the type of current network according to this network information, and then can judge whether this network is the network of low rate requirement, and the type of this network can comprise: WLAN or cellular network etc.
Wherein, these default low rate require network, can according to service conditions, set for user, also by the production firm of electronic equipment, are set.This WLAN can be considered the network that meets low rate requirement, and this cellular network can be considered the network that does not meet low rate requirement.Concrete low rate require to set according to actual conditions, in the present embodiment, repeat no more.And cellular network is the network that does not meet low rate requirement, when the current network of electronic equipment is cellular network, in order to reduce user, use the rate of network, under this network condition, while getting the first file,trigger generation module 1205, according to the second less file of this first file generated data volume, make user upload the Internet resources that this second file takies few, and then make network rate less.
The3rd transport module 1204, for judging that according to current network information current network is, while meeting the network that default low rate require, to transmit described the first file to the webserver when described the first judge module.
When current network meets default low rate requirement, the3rd transport module 1204 can directly be uploaded this first file to the webserver, and needn't be according to this first file generated the second file, make the user of this first file of access web server request can directly from the webserver, obtain this first file, needn't send the first file in request from electronic equipment, while having accelerated customer access network, in the reaction time of the webserver, improved user's experience.
Need to illustrate, the 3rd transport module and the first transport module, the second transport module can be different structures, in reality is implemented, in order to simplify the structure of electronic equipment, the 3rd transport module and the firstth transport module, the second transport module also can be same structure, in the present embodiment, do not limit.
In practical operation, for the user who makes demand file in network can obtain the content in the first file as early as possible, and needn't wait for electronic equipment user's operant response, the authority of asking user in network can be set, according to authority setting, whether automatically upload the first file, in this network request, carry request user profile.
With reference to Figure 13, the structural representation of the device embodiment 5 of a kind of transfer of data providing for the application, also comprises in structure shown in described Fig. 9:
The first parsing module 1305, the network request receiving for resolving described receiver module 1304, obtains asking the request user profile of the first file;
Wherein, in network request, carry request user profile, when receiving after this network request, the first parsing module 1305 is resolved this network request, the request user profile that just can obtain asking this first file, this information can comprise: the various information that can show user identity such as user name, the affiliated kind of user.
The second parsing module 1306, for resolving described request user profile, obtains described request user's authority;
Wherein, the second parsing module 1306 continues to resolve this request user profile, the authority that can obtain according to the authority condition arranging this request user, the authority condition of this setting can be kind under user, as multiple in common visitor, good friend, VIP etc., this common visitor's authority is minimum, VIP's authority is the highest, the user's name that also can arrange, as user A is set there is highest weight limit, user B and user C have secondary authority, and all the other users have least privilege.
Understandable, the condition of this authority can be set according to actual conditions, not only limits above-mentioned two kinds in the present embodiment.
The second judge module 1307, for judging whether described authority meets default authority requirement, if met, triggers the second transport module 1308, otherwise, ignore this network request.
Wherein, the second judge module 1307 judges according to user's authority whether this user meets default authority requirement, if met, trigger the second transport module 1308 and upload the first file, otherwise, ignore this network request, do not process, to reduce, upload the Internet resources that the first file takies, save network rate simultaneously.
Wherein this triggering second transport module 1308 is consistent with the second transport module 905 in embodiment 1, in the present embodiment, repeats no more.
Wherein, default authority require can be: the user of highest weight limit, or default Permission Levels, such as secondary, while asking higher than the user of the authority of secondary, trigger the second transport module 1308 and upload the first file.
Specifically, when this user is the user of highest weight limit, can directly judge that this user meets default authority requirement, according to incidence relation, determine the first file and the first file is uploaded in the webserver; When this user is secondary authority user, inquiry can be set and whether uploads the first file, when obtaining after definite uploading, upload again the first file, certainly, this secondary authority user, while meeting default authority requirement, also can directly trigger the second transport module 1308.
Certainly, in the present embodiment, only provide two kinds of modes of setting highest weight limit, in concrete enforcement, also can adopt other authority set-up mode, in the present embodiment, do not limited.
When this first file is image file, also can to the first file, carries out corresponding processing according to the characteristic of this image file and obtain the second file.
With reference to Figure 14, the structural representation of the device embodiment 6 of a kind of transfer of data providing for the application, also comprises in the structure of embodiment 2:
The3rd judge module 1402, for judging that described the first file is image file;
Wherein, the3rd judge module 1402 can judge that according to the parameter information of this first file this first file is image file.
Certainly, in concrete enforcement, the3rd judge module 1402 also can judge that its form is text, video file or audio file etc. according to the parameter information of this first file, in the present embodiment, only as an example of image file example, describe, other forms of file can adopt similar method to process, and obtains the second file.
When the 3rd judge module is judged this first file as image file, the second unit ofgeneration module 1403 comprises: the first subelement and/or the second subelement;
The first subelement, obtains the second file for changing the resolution of described image, and the image resolution ratio in described the second file is lower than the image resolution ratio in the first file;
Wherein, when this first file is image file, the first subelement changes the resolution of this image, to obtain second file of resolution lower than this first file, this first file is identical with the picture material that the second file comprises, just due to the two resolution difference so that the two data volume difference, accordingly, transmitting the required Internet resources of this second file is less than and transmits the required Internet resources of this first file.
The second subelement, obtains the second file for changing the pixel depth of described image, and the image pixel degree of depth in described the second file is lower than the pixel depth in the first file.
Wherein, when this first file is image file, the second subelement changes the pixel depth of this image, to obtain second file of pixel depth lower than this first file, this first file is identical with the picture material that the second file comprises, just due to the two pixel depth difference so that the two data volume difference, accordingly, transmitting the required Internet resources of this second file is less than and transmits the required Internet resources of this first file.
It should be noted that, in the present embodiment, just for resolution and the pixel depth of the first document image, change, obtain the second file that data volume is less, but be not limited to this two kinds of modes, in actual enforcement, also can adopt other modes to change the data volume of this first file, in the present embodiment, repeat no more.
Be understandable that, after the second file uploads on the webserver, can be kept at electronic equipment, also can delete this second file, only retain the sign that this second file is relevant so that follow-up while receiving network request, can determine the first file according to the relevant sign of this second file.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (17)

CN201410053962.3A2014-02-182014-02-18A kind of method and device of data transmissionActiveCN103763329B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201410053962.3ACN103763329B (en)2014-02-182014-02-18A kind of method and device of data transmission

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201410053962.3ACN103763329B (en)2014-02-182014-02-18A kind of method and device of data transmission

Publications (2)

Publication NumberPublication Date
CN103763329Atrue CN103763329A (en)2014-04-30
CN103763329B CN103763329B (en)2016-12-28

Family

ID=50530489

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201410053962.3AActiveCN103763329B (en)2014-02-182014-02-18A kind of method and device of data transmission

Country Status (1)

CountryLink
CN (1)CN103763329B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2017202175A1 (en)*2016-05-272017-11-30北京金山安全软件有限公司Method and device for video compression and electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2017202175A1 (en)*2016-05-272017-11-30北京金山安全软件有限公司Method and device for video compression and electronic device

Also Published As

Publication numberPublication date
CN103763329B (en)2016-12-28

Similar Documents

PublicationPublication DateTitle
US20160100035A1 (en)Personal handheld web server and storage device
JP6945211B2 (en) Communication support devices, methods, and computer programs
CN104539977A (en)Live broadcast previewing method and device
US20130080560A1 (en)System and Method for Sharing Digital Data on a Presenter Device to a Plurality of Participant Devices
CN104991911A (en)File sharing method and system
JP6580132B2 (en) Method and apparatus for providing information associated with media content
US20140310741A1 (en)System for sharing data via cloud server and method thereof
CN103491179A (en)Multi-screen interaction method and system based on Web
US10257556B2 (en)Streaming media authorization based on call signs
US20220400365A1 (en)Ad hoc file and link sharing for nearby mobile devices
US20160164970A1 (en)Application Synchronization Method, Application Server and Terminal
US20140179346A1 (en)Portable communication device
CN103780695A (en)Data sharing system and method
CN103744575A (en)Method and equipment for providing input auxiliary areas of input applications
CN104104653A (en)Page information synchronization method, device and system
CN105072496A (en)Video comment display method, related equipment and system
KR102492793B1 (en)System for providing virtual desktop service and method for the same
CN104869132A (en)Media resource sharing system, method and server set based on Internet
RU2628569C2 (en)Method and device for distributing content for viewing with multiple screens
CN103873490A (en)Slideshow playing control method and client
KR20180127051A (en)Synchronization service system and method for document of meeting
ChungA smartphone watch for mobile surveillance service
CN103763329A (en)Data transmission method and device
CN104349202A (en)Video acquisition method and device thereof
US9270763B2 (en)Method and apparatus for sharing electronic content

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp