Term " first ", " second ", " the 3rd " in description and claims of this specification and the accompanying drawing and "Four " etc. be to be used to distinguish different objects, rather than for describing particular order.In addition, term " comprising " and " having " and itAny deformation, it is intended that cover non-exclusive include.Such as contain the process of series of steps or unit, method, beThe step of system, product or equipment are not limited to list or unit, but alternatively also including the step of not listing or listMember, or alternatively also include for the intrinsic other steps of these processes, method, product or equipment or unit.
Referenced herein " embodiment " is it is meant that the special characteristic, structure or the characteristic that describe can wrap in conjunction with the embodimentsIn at least one embodiment of the present invention.Each position in the description occur the phrase might not each mean it is identicalEmbodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly andImplicitly understand, embodiment described herein can be combined with other embodiments.
" multiple " refer to two or more."and/or", the incidence relation of affiliated partner is described, represent there may beThree kinds of relations, for example, A and/or B, can be represented:Individualism A, while A and B be present, these three situations of individualism B.WordIt is a kind of relation of "or" that symbol "/", which typicallys represent forward-backward correlation object,.
Embodiments herein is described below in conjunction with the accompanying drawings.
Fig. 1 is referred to, Fig. 1 is a kind of schematic flow sheet of picture upload method provided in an embodiment of the present invention.This methodApplied to terminal, the terminal can be personal computer PC, palm PC, personal digital assistant PDA, tablet personal computer, intelligenceMobile phone etc. has the terminal of storage and processing function.As shown in figure 1, methods described comprises the following steps.
S101, the picture upload request for receiving user.
When user is in using terminal, especially when some information inputs are handled, upper blit can be requiredPiece;Or when user wishes to share on the internet the picture of oneself, there is the request that picture uploads in the case of these.UserPicture upload request can be submitted by way of click or touch-control or input literal order, can also be accused by way of voiceKnow terminal picture upload request.
S102, the current interface addition input control based on the request.
After the picture upload request for receiving user, terminal adds input control in current interface, to facilitate user to inputThe information relevant with picture.
Optionally, the current interface addition input control based on the request, is specifically included:
HTML html page is added in the current interface;
In the input control of the html page add file file types.
Wherein it is possible to writing the page by any Web language such as php, java etc. adds code.These pages add codeCan be that terminal manufacturer is configured when dispatching from the factory or user is voluntarily set.After being provided with, terminal is receivingTo user picture upload request when, these code commands can be performed automatically and be converted into HTML HTML pageFace.After adding the page, in the input control of html page addition file types, it is convenient for user input operations.
S103, the change event for monitoring the input control.When listening to change event, step S104 is performed;OtherwiseTerminate.
Wherein it is possible to pass through one change change thing for monitoring the input control of javascript programming languagesPart, to obtain the input operation of user.The change events can be set by terminal manufacturer when terminal is dispatched from the factory, can also be byUser is voluntarily set.After setting, terminal automatic start change events after the picture upload request of user is received are enteredRow is monitored.Specifically, when listening to click of the user to input control or touch control operation, then it is assumed that user is inputted,And using the click or touch control operation as change event.It is of course also possible to design speech input interface, when listening to user'sDuring phonetic order, it is also assumed that user is inputted, and using the phonetic order as change event.
S104, when listening to the change event of the input control, assign pending preview picture based on preset rulesPicture tag attribute.
Wherein, when listening to the change event of input control, then illustrate that user is ready for input operation.Now, existUser click on or the touch-control input control after, the operation interface of a file can be shown in current interface.It may be referred to Fig. 2'sThe user interface schematic diagram of picture upload method.Now, user can select at least one according to oneself hobby or purposeIndividual pending picture.When receiving user's confirmation pending picture of selection, terminal can assign pending figure according to preset rulesPiece preview picture tag attributes.
Optionally, it is described when listening to the change event of the input control, assign pending figure based on preset rulesPiece preview picture tag attributes, it is specially:
When listening to the change event of the input control, selection of the user to pending picture is received;
The destination object uniform resource position mark URL in preset function storehouse is called to create function generation preview picture label categoryProperty information;
Assign the preview picture label attribute information to the pending picture.
Wherein, after the click of user or touch control operation is listened to, selection of the user to pending picture is received.Now,Javascript functions-target is called in preset function storehouse that is, the change event handling functions storehouse of monitoring input controlObject uniform resource position mark URL creates function createObjectURL, an address information is generated, as preview picture markSign attribute information and assign pending picture.
S105, the display pending picture are for user's preview.
, now can pending picture confession displayed on the terminals after pending preview picture picture tag attribute is assignedUser's preview.Refer to Fig. 3 preview picture schematic diagram.
Optionally, the display pending picture specifically includes for user's preview:
Obtain the display parameters of the current interface;
According to the display parameters the pending picture is shown according to preset rules.
Wherein, the display parameters of current interface include display screen size, the content law of character graphics displaying of current interface.It is specific andSpeech, content law of character graphics displaying show the ratio for accounting for display screen, display location etc. including content.Join when getting display screen sizeAfter number, content show the information such as accounting and display location, the terminal adjusts pending dimension of picture size and shown according to contentShow the display location of the pending picture of position adjustment, for user's more easily preview picture.Specifically, for example display screen is worked asCurtain is 9.7 inches of sizes, and content shows that the ratio for accounting for display screen is 50%, then the size dimension for adjusting pending picture does not surpassCross 4.85 inches of sizes.And then the display location shown according to content, pending picture is included in blank space.By upperMode is stated, can reasonably adjust the preview graph size of pending picture, while also avoids blocking the useful information of current interface,Consumer's Experience is lifted while facilitating user's identification current interface information.
S106, the processing pending picture simultaneously are completed to upload.
After showing that pending picture supplies user's preview, you can pending picture is handled and completes to upload.
Optionally, handle the pending picture and complete to upload, specifically include:
Obtain the pending picture binary data;
The binary data of pending picture described in asynchronous process simultaneously is completed to upload.
Wherein it is possible to obtain the two of the pending picture by using the files attributes of JavaScript file objectsBinary data.
Wherein it is possible to the web development technologies ajax function asynchronous process for creating interaction network page and applying for passing through jqueryThe binary data of the pending picture simultaneously is completed to upload.
As can be seen that in the scheme of the embodiment of the present invention, after the picture upload request of user is received, asked based on describedThe current interface addition input control asked, monitors the change event of the input control, when listening to the input control moreWhen changing event, pending preview picture picture tag attribute is assigned based on preset rules, show the pending picture forFamily preview, handle the pending picture and complete to upload.By the above-mentioned means, transfer efficiency on picture can be improved, avoidPicture, which uploads, to be caused page jump and then influences the problem of user reads current page information, improves Consumer's Experience.
Fig. 4 is refer to, Fig. 4 is a kind of structural representation of terminal provided in an embodiment of the present invention.As shown in figure 4, the endEnd includes:
Receiving unit 401, for receiving the picture upload request of user.
When user is in using terminal, especially when some information inputs are handled, upper blit can be requiredPiece;Or when user wishes to share on the internet the picture of oneself, there is the request that picture uploads in the case of these.UserPicture upload request can be submitted by way of click or touch-control or input literal order, can also be accused by way of voiceKnow terminal picture upload request.
Control adding device 402, input control is added for the current interface based on the request.
After the picture upload request for receiving user, terminal adds input control in current interface, to facilitate user to inputThe information relevant with picture.
Optionally, control adding device 402 is specifically used for:
HTML html page is added in the current interface;
In the input control of the html page add file file types.
Wherein it is possible to writing the page by any Web language such as php, java etc. adds code.These pages add codeCan be that terminal manufacturer is configured when dispatching from the factory or user is voluntarily set.After being provided with, terminal is receivingTo user picture upload request when, these code commands can be performed automatically and be converted into HTML HTML pageFace.After adding the page, in the input control of html page addition file types, it is convenient for user input operations.
Monitoring unit 403, for monitoring the change event of the input control.
Wherein it is possible to pass through one change change thing for monitoring the input control of javascript programming languagesPart, to obtain the input operation of user.The change events can be set by terminal manufacturer when terminal is dispatched from the factory, can also be byUser is voluntarily set.After setting, terminal automatic start change events after the picture upload request of user is received are enteredRow is monitored.Specifically, when listening to click of the user to input control or touch control operation, then it is assumed that user is inputted,And using the click or touch control operation as change event.It is of course also possible to design speech input interface, when listening to user'sDuring phonetic order, it is also assumed that user is inputted, and using the phonetic order as change event.
Attribute given unit 404, for when listening to the change event of the input control, being assigned based on preset rulesPending preview picture picture tag attribute.
Wherein, when listening to the change event of input control, then illustrate that user is ready for input operation.Now, existUser click on or the touch-control input control after, the operation interface of a file can be shown in current interface.It may be referred to Fig. 2'sThe user interface schematic diagram of picture upload method.Now, user can select at least one according to oneself hobby or purposeIndividual pending picture.When receiving user's confirmation pending picture of selection, terminal can assign pending figure according to preset rulesPiece preview picture tag attributes.
Optionally, the attribute given unit 404 is specifically used for:
When listening to the change event of the input control, selection of the user to pending picture is received;
The destination object uniform resource position mark URL in preset function storehouse is called to create function generation preview picture label categoryProperty information;
Assign the preview picture label attribute information to the pending picture.
Wherein, after the click of user or touch control operation is listened to, selection of the user to pending picture is received.Now,Javascript functions-target is called in preset function storehouse that is, the change event handling functions storehouse of monitoring input controlObject uniform resource position mark URL creates function createObjectURL, an address information is generated, as preview picture markSign attribute information and assign pending picture.
Display unit 405, for showing the pending picture for user's preview.
, now can pending picture confession displayed on the terminals after pending preview picture picture tag attribute is assignedUser's preview.Refer to Fig. 3 preview picture schematic diagram.
Optionally, the display unit 405 is specifically used for:
Obtain the display parameters of the current interface;
According to the display parameters the pending picture is shown according to preset rules.
Wherein, the display parameters of current interface include display screen size, the content law of character graphics displaying of current interface.It is specific andSpeech, content law of character graphics displaying show the ratio for accounting for display screen, display location etc. including content.Join when getting display screen sizeAfter number, content show the information such as accounting and display location, the display unit 405 adjusts pending dimension of picture size and basisContent display location adjusts the display location of pending picture, for user's more easily preview picture.Specifically, for example, whenDisplay screen is 9.7 inches of sizes, and content shows that the ratio for accounting for display screen is 50%, then adjusts the size chi of pending pictureIt is very little to be no more than 4.85 inches of sizes.And then the display location shown according to content, pending picture is included in blank space.By the above-mentioned means, the preview graph size of pending picture can be adjusted reasonably, while also avoid blocking having for current interfaceWith information, Consumer's Experience is lifted while facilitating user's identification current interface information.
Processing unit 406, for handling the pending picture and completing to upload.
After showing that pending picture supplies user's preview, you can pending picture is handled and completes to upload.
Optionally, the processing unit 406 is specifically used for:
Obtain the pending picture binary data;
The binary data of pending picture described in asynchronous process simultaneously is completed to upload.
Wherein it is possible to obtain the two of the pending picture by using the files attributes of JavaScript file objectsBinary data.
Wherein it is possible to the web development technologies ajax function asynchronous process for creating interaction network page and applying for passing through jqueryThe binary data of the pending picture simultaneously is completed to upload.
In the terminal described by Fig. 4, after the picture upload request of user is received, the current interface based on the requestInput control is added, the change event of the input control is monitored, when listening to the change event of the input control, is based onPreset rules assign pending preview picture picture tag attribute, show that the pending picture for user's preview, handles instituteState pending picture and complete to upload.By the above-mentioned means, transfer efficiency on picture can be improved, avoiding picture and uploading causes pageFace redirects and then influences the problem of user reads current page information, improves Consumer's Experience.
Fig. 5 is referred to, Fig. 5 is the structural representation of another terminal provided in an embodiment of the present invention.As shown in figure 5, shouldTerminal 50 includes processor 501, memory 502, input/output unit 503 and bus 504, wherein processor 501, memory502 and input/output unit 503 can be of coupled connections by bus or other modes, Fig. 5 by by bus 504 connect exemplified by.
Wherein, processor 501 can be Digital Signal Processing (English:Digital Signal Processing, DSP)Chip.In the specific implementation, processor 501 may include:Management/communication module (administration module/Communication module, AM/CM) (being used for the center that speech channel exchange and information exchange), for completing call treatment, letterMake module, converting code rete and the submultiplex module of processing, RRM, the management of Radio Link and circuit maintenance functionModules such as (transcoder submultiplexer, TCSM) (being used to complete multiplexing and demultiplexing and code conversion function).Specific letterBreath refers to mobile communication relevant knowledge.
Memory 502 is used to store the program code that picture uploads in the present embodiment, in the specific implementation, memory 502 canWith using read-only storage (English:Read-Only Memory, ROM) or random access memory (RAM) (English:RandomAccess Memory, RAM), the program code uploaded available for picture in storage the present embodiment.
Input/output unit 503 is used to receive the instructing of user, the various signalings by being wirelessly transferred, and output processorThe result of processing.In practice, input/output unit can be touch-screen, the equipment such as display screen or keyboard, mouse.
Bus 504 can be industry standard architecture (English:Industry Standard Architecture,ISA) bus, external equipment interconnection (English:Peripheral Component Interconnect, PCI) bus, extension markQuasi- architecture (English:Extended Industry Standard Architecture, EISA) bus, integrated circuit be totalLine (English:Inter Integrated Circuit, IIC) etc..
In the present embodiment, the control input output device 503 of processor 501 performs following steps:On the picture for receiving userPass request.
Processor 501 is additionally operable to call the executable program code stored in memory 502, performs following operation:
Current interface addition input control based on the request;
Monitor the change event of the input control;
When listening to the change event of the input control, pending preview picture picture mark is assigned based on preset rulesSign attribute.
Processor 501 is additionally operable to control input output device 503 and shows the pending picture for user's preview.
Processor 501 is additionally operable to call the executable program code stored in memory 502, also performs following stepSuddenly:Handle the pending picture and complete to upload.
Optionally, processor 501 performs the current interface addition input control based on the request, concrete modeFor:
HTML html page is added in the current interface;
In the input control of the html page add file file types.
Optionally, processor 501 performs the change event for monitoring the input control, and concrete mode is:
Click or touch control operation of the monitoring users to the input control, and using the click or touch control operation as changeEvent.
Optionally, processor 501 performs described when listening to the change event of the input control, based on preset rulesPending preview picture picture tag attribute is assigned, concrete mode is:
When listening to the change event of the input control, selection of the user to pending picture is received;
The destination object uniform resource position mark URL in preset function storehouse is called to create function generation preview picture label categoryProperty information;
Assign the preview picture label attribute information to the pending picture.
Optionally, processor 501 performs the display pending picture so that user's preview, concrete mode are:
Obtain the display parameters of the current interface;
According to the display parameters the pending picture is shown according to preset rules.
Optionally, processor 501 performs the processing pending picture and completes to upload, and concrete mode is:
Obtain the pending picture binary data;
The binary data of pending picture described in asynchronous process simultaneously is completed to upload.
In the terminal described by Fig. 5, after the picture upload request of user is received, the current interface based on the requestInput control is added, the change event of the input control is monitored, when listening to the change event of the input control, is based onPreset rules assign pending preview picture picture tag attribute, show that the pending picture for user's preview, handles instituteState pending picture and complete to upload.By the above-mentioned means, transfer efficiency on picture can be improved, avoiding picture and uploading causes pageFace redirects and then influences the problem of user reads current page information, improves Consumer's Experience.
The embodiment of the present invention also provides a kind of computer-readable storage medium, wherein, the computer-readable storage medium can be stored with journeySequence, the program include the part or all of step of any image acquiring method described in the above method embodiment when performingSuddenly.
It should be noted that for foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series ofCombination of actions, but those skilled in the art should know, the present invention is not limited by described sequence of movement becauseAccording to the present invention, some steps can use other orders or carry out simultaneously.Secondly, those skilled in the art should also knowKnow, embodiment described in this description belongs to preferred embodiment, and involved action and module are not necessarily of the inventionIt is necessary.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion being described in detail in some embodimentPoint, it may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed device, can be by another wayRealize.For example, device embodiment described above is only schematical, such as the division of the unit, it is only one kindDivision of logic function, can there is an other dividing mode when actually realizing, such as multiple units or component can combine or canTo be integrated into another system, or some features can be ignored, or not perform.Another, shown or discussed is mutualCoupling direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING or communication connection of device or unit,Can be electrical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unitThe part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multipleOn NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can alsoThat unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated listMember can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or useWhen, it can be stored in a computer-readable access to memory.Based on such understanding, technical scheme substantially orPerson say the part to be contributed to prior art or the technical scheme all or part can in the form of software product bodyReveal and, the computer software product is stored in a memory, including some instructions are causing a computer equipment(can be personal computer, server or network equipment etc.) performs all or part of each embodiment methods described of the present inventionStep.And foregoing memory includes:USB flash disk, read-only storage (ROM, Read-Only Memory), random access memory(RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. are various can be with the medium of store program codes.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is canTo instruct the hardware of correlation to complete by program, the program can be stored in a computer-readable memory, memoryIt can include:Flash disk, read-only storage (English:Read-Only Memory, referred to as:ROM), random access device (English:Random Access Memory, referred to as:RAM), disk or CD etc..
The embodiment of the present invention is described in detail above, specific case used herein to the principle of the present invention andEmbodiment is set forth, and the explanation of above example is only intended to help the method and its core concept for understanding the present invention;Meanwhile for those of ordinary skill in the art, according to the thought of the present invention, can in specific embodiments and applicationsThere is change part, to sum up above-mentioned, this specification content should not be construed as limiting the invention.