CN109710337A - Picture upload method, device, computer equipment and storage medium - Google Patents
Picture upload method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN109710337A CN109710337A CN201811545346.4A CN201811545346A CN109710337A CN 109710337 A CN109710337 A CN 109710337A CN 201811545346 A CN201811545346 A CN 201811545346A CN 109710337 A CN109710337 A CN 109710337A
- Authority
- CN
- China
- Prior art keywords
- uploaded
- picture
- application program
- server
- primary function
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 33
- 230000006870 function Effects 0.000 claims description 103
- 238000004590 computer program Methods 0.000 claims description 26
- 238000012827 research and development Methods 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000012546 transfer Methods 0.000 description 6
- 238000011161 development Methods 0.000 description 3
- 230000018109 developmental process Effects 0.000 description 3
- 230000008676 import Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000000670 limiting effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000002829 reductive effect Effects 0.000 description 2
- 230000000717 retained effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000033772 system development Effects 0.000 description 1
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
This application involves research and development management domain, especially research and development frame, specially a kind of picture upload method, device, computer equipment and storage mediums.The described method includes: receiving application program access instruction, and corresponding application program is started according to the application program access instruction;The primary function access request of system is received by the application program, the primary function access request of system carries access parameter;Unified interface is called, and the primary function of system corresponding with the access parameter is obtained by the interface;It executes the primary function of the system and obtains picture to be uploaded;The picture to be uploaded is uploaded to server.Efficiency can be improved using this method.
Description
Technical field
This application involves research and development administrative skill fields, more particularly to a kind of picture upload method, device, computer equipment
And storage medium.
Background technique
With the development of computer technology, there is H5 technology, the display mode of traditional H5 page is former based on system
What raw hybird frame carried out, interaction capabilities are poor.
However, needing the code new according to the system development of current device when user passes through H5 page uploading picture
It realizes that picture uploads, efficiency is caused to reduce.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of picture upload method that can be improved transfer efficiency,
Device, computer equipment and storage medium.
A kind of picture upload method, which comprises
Application program access instruction is received, and corresponding application program is started according to the application program access instruction;
The primary function access request of system is received by the application program, the primary function access request of system carries
There is access parameter;
Unified interface is called, and the primary function of system corresponding with the access parameter is obtained by the interface;
It executes the primary function of the system and obtains picture to be uploaded;
The picture to be uploaded is uploaded to server.
It is described in one of the embodiments, that the picture to be uploaded is uploaded to server, comprising:
Calculate the size of the picture to be uploaded;
Whether the size for judging the picture to be uploaded is more than preset value;
It, will be on the picture to be uploaded by the first container kernel when the size of the picture to be uploaded is more than preset value
Reach the server;
When the size of the picture to be uploaded is less than preset value, by second container kernel by the picture to be uploaded
It is uploaded to the server.
It is described in one of the embodiments, to execute after the primary function of system obtains picture to be uploaded, further includes:
The picture to be uploaded is stored into disk;
It is described that the picture to be uploaded is uploaded to server, comprising:
The picture to be uploaded being stored in the disk is uploaded to the server.
It is described in one of the embodiments, that the picture to be uploaded is uploaded to server, comprising:
The picture to be uploaded being stored in the disk is obtained, and the thumbnail of the picture to be uploaded is calculated;
The thumbnail is imported in memory, and the thumbnail being directed into the memory is uploaded to server;
Delete the thumbnail of storage in the memory.
It is described in one of the embodiments, that corresponding application program, packet are started according to the application program access instruction
It includes:
Corresponding with application program access instruction application code is downloaded from server, and by the application program
Code is stored into disk;
Obtain the more new version of application code and working as mounted application program being stored in the disk
Preceding version;
Judge whether the current version is lower than the more new version;
When the current version is lower than the more new version, then according to the application code being stored in the disk
Update the current version;
Start corresponding application program according to the updated current version.
A kind of picture upload device, described device include:
First receiving module starts for receiving application program access instruction, and according to the application program access instruction
Corresponding application program;
Second receiving module, for receiving the primary function access request of system by the application program, the system is former
Raw function access request carries access parameter;
Code obtaining module, for calling unified interface, and it is corresponding with the access parameter by interface acquisition
The primary function of system;
Picture obtains module, obtains picture to be uploaded for executing the primary function of the system;
Uploading module, for the picture to be uploaded to be uploaded to server.
The uploading module includes: in one of the embodiments,
Computing unit, for calculating the size of the picture to be uploaded;
Judging unit, for judging whether the size of the picture to be uploaded is more than preset value;
Uploading unit, for when the size of the picture to be uploaded is more than preset value, by the first container kernel by institute
It states picture to be uploaded and is uploaded to the server, when the size of the picture to be uploaded is less than preset value, hold by second
The picture to be uploaded is uploaded to the server by device kernel.
Described device in one of the embodiments, further include:
Memory module, for after executing the primary function of system and obtaining picture to be uploaded, by the figure to be uploaded
Piece is stored into disk;
The uploading module is also used to the picture to be uploaded being stored in the disk being uploaded to the server.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing
The step of device realizes any of the above-described the method when executing the computer program.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
The step of method described in any of the above embodiments is realized when row.
Above-mentioned picture upload method, device, computer equipment and storage medium, it is only necessary to just by a set of unified interface
The available primary function of system corresponding with access parameter, does not need to write code respectively according to the system of terminal, and pass through
Unified interface and access parameter can get the corresponding primary function of system, not need primary for each system
Function writes corresponding interface, in this way when calling, is directly called by unified interface, improves effect
Rate.
Detailed description of the invention
Fig. 1 is the application scenario diagram of picture upload method in one embodiment;
Fig. 2 is the flow diagram of picture upload method in one embodiment;
Fig. 3 is the schematic diagram of the picture upload frame in one embodiment;
Fig. 4 is the flow chart of the method that picture upload is carried out by the h5 page in one embodiment;
Fig. 5 is the structural block diagram that picture uploads device in one embodiment;
Fig. 6 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Picture upload method provided by the present application can be applied in application environment as shown in Figure 1.Wherein, terminal 102
It is communicated by network with server 104.Specifically, terminal receives the application program access instruction of user's input first, from
And terminal can start corresponding application program according to the application program access instruction, so that user can be directed to the application program
It is operated, such as by the application program to the primary function access request of terminal input system, so that terminal 102 can basis
The primary function access request of the system calls unified interface, and primary by interface acquisition system corresponding with access parameter
Function obtains picture to be uploaded by the primary function of the system, and picture to be uploaded is uploaded in server 104.Wherein, eventually
End 102 can be, but not limited to be various personal computers, laptop, smart phone, tablet computer and portable wearable
Equipment, server 104 can be realized with the server cluster of the either multiple server compositions of independent server.
In one embodiment, as shown in Fig. 2, providing a kind of picture upload method, it is applied in Fig. 1 in this way
It is illustrated for terminal, comprising the following steps:
S202: application program access instruction is received, and corresponding application program is started according to application program access instruction.
Specifically, various application programs are installed, user can be marked with by clicking corresponding application program image in terminal
Application program access instruction is inputted to terminal, so that terminal can apply journey according to application program access instruction starting is corresponding
Sequence.
For example, terminal can receive application program access instruction, and get the corresponding point of application program access instruction
Position is hit, corresponding application program is got according to the click location, finally starts the application program.
S204: the primary function access request of system is received by application program, the primary function access request of system carries
Access parameter.
Specifically, primary function refers to the function of institute's band in the system of terminal, such as camera function.Check album function,
Check address book function, the geographical location gps obtains function, buys possible function, face identification functions, telecommunications functions etc..
Terminal can call the corresponding primary function of system, such as camera icon by the corresponding interface in application program
Deng user can click the camera icon, so that terminal can receive the primary function access request of system.And optionally,
The primary function access request of system can carry access parameter, and access parameter can be for uniquely characterizing the primary function of system
Camera parameter can be set in the mark of energy, such as camera function, and photograph album parameter etc. may be arranged in album function.
S206: unified interface is called, and the primary function of system corresponding with access parameter is obtained by interface.
Specifically, unified interface is the caller of the primary function of all systems, and wherein terminal can call system first
One interface, then will access parameter be input in the corresponding interface routine of the interface, thus terminal can by the interface with
And access parameter obtains the primary function of system, such as obtains the code etc. of the primary function of system, so that terminal executes system original
The corresponding primary function of system can be thus achieved in the code of raw function.Only need a set of code corresponding to call in this way
Original function code does not need to write code respectively according to device systems, and passes through unified interface and access parameter
To get corresponding primary function code, do not need to write corresponding interface for each primary function code, in this way
When calling, directly it is called by unified interface, improves efficiency.
S208: the primary function of execution system obtains picture to be uploaded.
Specifically, after terminal gets system primary function, the primary function of system can be executed to obtain figure to be uploaded
Piece.For example, the primary function of the system can be executed after terminal is deployed into the primary function of system, such as call corresponding camera function
Can, it takes pictures to obtain picture to be uploaded etc..
S210: picture to be uploaded is uploaded to server.
Specifically, picture to be uploaded can be uploaded to service after calling primary function to obtain picture to be uploaded by terminal
Device, so primary function of calling system do not need to integrate those primary functions in the application, can development efficiency be mentioned
Height, and only need to write unified interface does not need to write unified interface for the primary function of each system, can also be with
Improve efficiency of research and development.
Above-mentioned picture upload method, it is only necessary to which system corresponding with parameter is accessed can be obtained by a set of unified interface
It unites primary function, does not need to write code respectively according to the system of terminal, and pass through unified interface and access parameter
To get the corresponding primary function of system, do not need to write corresponding interface for the primary function of each system, in this way
When calling, directly it is called by unified interface, improves efficiency, above-mentioned picture upload method passes through
Cordova interactive frame solves the compatibility issue of IOS and Android, and extension function is proposed on the basis of cordova,
It devises unified interface and carrys out the primary function of calling system, new plug-in unit can be avoided the occurrence of in this way, progress plug-in unit is all gone to open
Hair.
Specifically, shown in Figure 3, Fig. 3 is the schematic diagram of the picture upload frame in one embodiment, by figure to be uploaded
Piece is uploaded to server, comprising: calculates the size of picture to be uploaded;Whether the size for judging picture to be uploaded is more than preset value;
When the size of picture to be uploaded is more than preset value, picture to be uploaded is uploaded to by server by the first container kernel;When to
When the size of uploading pictures is less than preset value, picture to be uploaded is uploaded to by server by second container kernel.
Specifically, as shown in figure 3, terminal is after receiving application program access instruction, then corresponding application program is opened,
Such as terminal carries out Version Control from server download application code, and according to the application code, thus in version
Corresponding application program can be opened after control.After the system that receives primary function access instruction, then according to cordova interaction
The primary function of basic function calling system of frame, and in the present embodiment, in order to improve development efficiency, in cordova interaction
On frame research and development extension function, that is, develop unified interface, then by the interface come the primary function of calling system to get
Picture to be uploaded does not need to develop corresponding interface for the primary function of each system in this way, improves efficiency of research and development.
And after getting picture to be uploaded, it can according to need to select to hold by the first container kernel or second
Picture to be uploaded is uploaded to server by device kernel, since the first container content can guarantee upper transfer efficiency, second container
Content is the accuracy that can guarantee to upload.Therefore terminal can calculate the size of picture to be uploaded, and judge figure to be uploaded
Whether the size of piece is more than preset value, when the preset value is exceeded, then uploads and needs a large amount of time, therefore when in order to reduce upload
Between, picture to be uploaded can be uploaded to server by the first container content by transfer efficiency in guarantee, terminal.When picture to be uploaded
Size when being less than preset value, then uplink time will not too long, therefore can be by second container kernel by picture to be uploaded
It is uploaded to server, guarantees the accuracy uploaded.Wherein the first container kernel is wkwebview, and second container kernel is
Webview can guarantee the upper transfer efficiency of picture to be uploaded in this way.
In above-described embodiment, in order to guarantee upper transfer efficiency, it can be determined according to the size of picture to be uploaded for uploading
The container kernel of picture to be uploaded, so as to take into account efficiency and accuracy.
Executed after the primary function of system obtains picture to be uploaded in one of the embodiments, can also include: by
Uploading pictures are stored into disk;The picture to be uploaded is uploaded to server, may include: by be stored in disk to
Uploading pictures are uploaded to the server.
Picture to be uploaded is uploaded to server in one of the embodiments, may include: that acquisition is stored in disk
Picture to be uploaded, and the thumbnail of picture to be uploaded is calculated;Thumbnail is imported in memory, and will be directed into memory
Thumbnail be uploaded to server;Delete the thumbnail being stored in memory.
Specifically, terminal, can in order to reduce EMS memory occupation situation after the primary function of calling system obtains picture to be uploaded
Obtained picture to be uploaded to be saved in the disk of terminal, and in the memory of nonterminal, can discharge using journey in this way
The memory of sequence, it is excessive not will lead to application program committed memory, so as to cause application crash etc., and can be will be to be uploaded
When picture is uploaded to server, directly the picture to be uploaded being stored in disk is uploaded in server, such as to be uploaded
When the size of picture is less than preset value, picture to be uploaded directly can be uploaded to by server by second container kernel, protected
The correctness of picture to be uploaded is demonstrate,proved.
And acquired picture to be uploaded is after being saved in disk by terminal, upload button, terminal need when the user clicks
When the picture to be uploaded is uploaded to server, the thumbnail of picture to be uploaded can be first calculated in terminal, in this way
The size that thumbnail is taken up space can be far smaller than the size of the original image of picture to be uploaded, which is imported into memory by terminal
In, to can show those thumbnails in the corresponding position of application program, user can view those thumbnails, in this way
The consumption of memory can be reduced, and the thumbnail being directed into memory can be uploaded to server, the data volume of conduction by terminal
It reduces, can also be improved efficiency of transmission, and the occupied space in order to guarantee memory, can be deleted after thumbnail uploads successfully
The thumbnail of storage in the content, is so again discharged the space of memory.And be stored in the picture in disk can be still
It is old to be retained in disk, raw information can be retained in this way, or can also delete from disk.
In above-described embodiment, when uploading local picture to be uploaded, such as the picture to be uploaded of shooting then exists in disk, then
The h5 thumbnail with uploading pictures in disk can be calculated, so as in web page, i.e., h5 thumbnail is put in memory
It is shown in application program, and after the completion of upload, deletes the thumbnail in memory.In addition, the uploading pictures of shooting are
There are in disk rather than in memory, application crash can not be will lead to releasing memory.
Corresponding application program is started according to application program access instruction in one of the embodiments, may include: from
Server downloads application code corresponding with application program access instruction, and application code is stored into disk;
Obtain the more new version for the application code being stored in disk and the current version of mounted application program;Judgement is worked as
Whether preceding version is lower than more new version;When current version is lower than more new version, then according to the application program being stored in disk
Code update current version;Start corresponding application program according to updated current version.
Specifically, in conjunction with figure 3 above, terminal after receiving application program access instruction, visit according to the application program by terminal
It asks that instruction downloads corresponding application code from server, and the application code is stored in disk, rather than deposit
Storage in memory, so as in reducing from occupancy carry out Version Control and after the download is complete, that is, obtain and be stored in magnetic
The more new version of application code in disk and the current version of mounted application program;Judge whether current version is low
In more new version;When current version is lower than more new version, then updated according to the application code being stored in disk current
Version can directly open corresponding updated current version, improve application program in this way in application program launching
Treatment effeciency.
In above-described embodiment, increases cache policy and application code (is downloaded to terminal in advance by preloading
Disk) the webpage loading efficiency of application program is got a promotion, i.e., when needing to call the function, then directly from disk
It is called, such cache policy and preloading are so that webpage loading efficiency is promoted.
Referring to fig. 4, Fig. 4 is the flow chart of the method that picture upload is carried out by the h5 page in one embodiment, at this
In embodiment, terminal receives application program access instruction first, and is downloaded currently according to application program access instruction from server
The institute of version is functional, is buffered in disk, then carries out Version Control, and according to the current version downloaded after Version Control
This basic function opens corresponding application program, then may be employed other operations of program, in this way due to current version
Originally institute is functional to be all buffered in disk, therefore corresponding function code can be directly read from disk, so as to
The treatment effeciency of application program is improved, and can also be preloaded after function is downloaded to disk, so as to further
Improve the treatment effeciency of application program.
Secondly, terminal can receive the primary function access request of system by application program, and according to the primary function
Access request gets corresponding interface, is obtained according to the access parameter that the interface and the primary function access request of system carry
Get the primary function of system, picture to be uploaded can be got thereby executing the primary function code, for example, call camera into
Row is taken pictures, or inquiry photograph album selects corresponding picture etc., and picture to be uploaded obtained is stored in the magnetic of terminal
In disk, the occupied space of memory is reduced.
Third then judges the size of picture to be uploaded after getting picture to be uploaded, if it exceeds preset value, then for
Upper transfer efficiency, is uploaded by the first container kernel, if being less than preset value, efficiency and accuracy in order to balance,
Then uploaded by second container kernel.
4th, by the first container kernel upload picture to be uploaded when, can calculate first stored in disk to upper
The h5 thumbnail of blit piece, and the h5 thumbnail is shown on the corresponding webpage of application program of terminal, the contracting being calculated
Sketch map is deposited in memory, and the thumbnail in memory is uploaded to server, the efficiency etc. of upload can be improved in this way, in completion
It is transmitted through journey.
In above-described embodiment, it is only necessary to it is former that system corresponding with parameter is accessed can be obtained by a set of unified interface
Raw function, does not need to write code respectively according to the system of terminal, and can be obtained by unified interface and access parameter
The corresponding primary function of system is got, does not need to write corresponding interface for the primary function of each system, adjust in this way
With when, be directly called by unified interface, improve efficiency.
It should be understood that although each step in the flow chart of Fig. 2-4 is successively shown according to the instruction of arrow,
These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps
Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-4
Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps
Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively
It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately
It executes.
In one embodiment, as shown in figure 5, providing a kind of picture upload device, comprising: the first receiving module 100,
Second receiving module 200, Code obtaining module 300, picture obtain module 400 and uploading module 500, in which:
First receiving module 100, for receiving application program access instruction, and according to the starting pair of application program access instruction
The application program answered.
Second receiving module 200, for receiving the primary function access request of system, the primary function of system by application program
Access request carries access parameter.
Code obtaining module 300 obtains system corresponding with access parameter for calling unified interface, and by interface
Primary function.
Picture obtains module 400, obtains picture to be uploaded for executing the primary function of system.
Uploading module 500, for picture to be uploaded to be uploaded to server.
Above-mentioned uploading module 500 may include: in one of the embodiments,
First computing unit, for calculating the size of picture to be uploaded.
First judging unit, for judging whether the size of picture to be uploaded is more than preset value.
Uploading unit, for when the size of picture to be uploaded be more than preset value when, will be to be uploaded by the first container kernel
Picture is uploaded to server, when the size of picture to be uploaded is less than preset value, by second container kernel by figure to be uploaded
Piece is uploaded to server;.
Above-mentioned picture, which uploads device, in one of the embodiments, to include:
Memory module, for after the primary function of execution system obtains picture to be uploaded, by picture to be uploaded store to
In disk;
Uploading module 500 is also used to the picture to be uploaded being stored in the disk being uploaded to the server.
Uploading module 500 may include: in one of the embodiments,
For obtaining the picture to be uploaded being stored in disk, and picture to be uploaded is calculated in second computing unit
Thumbnail.
The thumbnail being directed into memory for importing thumbnail in memory, and is uploaded to server by import unit.
Unit is deleted, for deleting the thumbnail being stored in memory.
The first receiving module 100 may include: in one of the embodiments,
Download unit for downloading application code corresponding with application program access instruction from server, and will answer
It is stored with program code into disk.
Version acquiring unit, for obtaining the more new version of the application code being stored in disk and mounted
The current version of application program.
Second judgment unit, for judging whether current version is lower than more new version.
Updating unit, for when current version is lower than more new version, then basis to be stored in the application program generation in disk
Code updates current version.
Start unit, for starting corresponding application program according to updated current version.
The specific of device is uploaded about picture and limits the restriction that may refer to above for picture upload method, herein not
It repeats again.The modules that above-mentioned picture uploads in device can be realized fully or partially through software, hardware and combinations thereof.On
Stating each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also store in a software form
In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be terminal, internal structure
Figure can be as shown in Figure 6.The computer equipment includes processor, the memory, network interface, display connected by system bus
Screen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer equipment is deposited
Reservoir includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and computer journey
Sequence.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating
The network interface of machine equipment is used to communicate with external terminal by network connection.When the computer program is executed by processor with
Realize a kind of picture upload method.The display screen of the computer equipment can be liquid crystal display or electric ink display screen,
The input unit of the computer equipment can be the touch layer covered on display screen, be also possible to be arranged on computer equipment shell
Key, trace ball or Trackpad, can also be external keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Fig. 6, only part relevant to application scheme is tied
The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment
It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, which is stored with
Computer program, which performs the steps of when executing computer program receives application program access instruction, and according to answering
Start corresponding application program with routine access instruction;The primary function access request of system is received by application program, system is former
Raw function access request carries access parameter;Unified interface is called, and system corresponding with access parameter is obtained by interface
It unites primary function;The primary function of execution system obtains picture to be uploaded;Picture to be uploaded is uploaded to server.
In one embodiment, that is realized when processor execution computer program is uploaded to service for picture to be uploaded
Device may include: the size for calculating picture to be uploaded;Whether the size for judging picture to be uploaded is more than preset value;When to be uploaded
When the size of picture is more than preset value, picture to be uploaded is uploaded to by server by the first container kernel, when picture to be uploaded
Size when being less than preset value, picture to be uploaded is uploaded to by server by second container kernel.
In one embodiment, processor executes the primary function of execution system of being realized when computer program and obtains to upper
It can also include: to store picture to be uploaded into disk after blit piece;It is realized when processor execution computer program
The picture to be uploaded is uploaded to server, may include: that the picture to be uploaded being stored in disk is uploaded to the clothes
Business device.
In one embodiment, that is realized when processor execution computer program is uploaded to service for picture to be uploaded
Device may include: the picture to be uploaded for obtaining and being stored in disk, and the thumbnail of picture to be uploaded be calculated;By breviary
Figure imports in memory, and the thumbnail being directed into memory is uploaded to server;Delete the thumbnail being stored in memory.
In one embodiment, that is realized when processor execution computer program starts according to application program access instruction
Corresponding application program may include: application code corresponding with application program access instruction from server downloading, and will
Application code is stored into disk;Obtain the more new version of application code being stored in disk and mounted
The current version of application program;Judge whether current version is lower than more new version;When current version is lower than more new version, then root
Current version is updated according to the application code being stored in disk;Journey is applied according to the starting of updated current version is corresponding
Sequence.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
Machine program performs the steps of when being executed by processor receives application program access instruction, and according to application program access instruction
Start corresponding application program;The primary function access request of system, the primary function access request of system are received by application program
Carry access parameter;Unified interface is called, and the primary function of system corresponding with access parameter is obtained by interface;It executes
The primary function of system obtains picture to be uploaded;Picture to be uploaded is uploaded to server.
In one embodiment, that is realized when computer program is executed by processor is uploaded to service for picture to be uploaded
Device may include: the size for calculating picture to be uploaded;Whether the size for judging picture to be uploaded is more than preset value;When to be uploaded
When the size of picture is more than preset value, picture to be uploaded is uploaded to by server by the first container kernel, when picture to be uploaded
Size when being less than preset value, picture to be uploaded is uploaded to by server by second container kernel.
In one embodiment, the primary function of execution system of being realized when computer program is executed by processor obtain to
It can also include: to store picture to be uploaded into disk after uploading pictures;When computer program is executed by processor;Institute
That realizes is uploaded to server for the picture to be uploaded, may include: to be uploaded to the picture to be uploaded being stored in disk
The server.
In one embodiment, that is realized when computer program is executed by processor is uploaded to service for picture to be uploaded
Device may include: the picture to be uploaded for obtaining and being stored in disk, and the thumbnail of picture to be uploaded be calculated;By breviary
Figure imports in memory, and the thumbnail being directed into memory is uploaded to server;Delete the thumbnail being stored in memory.
In one embodiment, that is realized when computer program is executed by processor opens according to application program access instruction
Corresponding application program is moved, may include: application code corresponding with application program access instruction from server downloading, and
Application code is stored into disk;It obtains the more new version for the application code being stored in disk and has installed
Application program current version;Judge whether current version is lower than more new version;When current version is lower than more new version, then
Current version is updated according to the application code being stored in disk;Start corresponding application according to updated current version
Program.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.
Claims (10)
1. a kind of picture upload method, which comprises
Application program access instruction is received, and corresponding application program is started according to the application program access instruction;
The primary function access request of system is received by the application program, the primary function access request of system carries visit
Ask parameter;
Unified interface is called, and the primary function of system corresponding with the access parameter is obtained by the interface;
It executes the primary function of the system and obtains picture to be uploaded;
The picture to be uploaded is uploaded to server.
2. being wrapped the method according to claim 1, wherein described be uploaded to server for the picture to be uploaded
It includes:
Calculate the size of the picture to be uploaded;
Whether the size for judging the picture to be uploaded is more than preset value;
When the size of the picture to be uploaded is more than preset value, the picture to be uploaded is uploaded to by the first container kernel
The server;
When the size of the picture to be uploaded is less than preset value, the picture to be uploaded is uploaded by second container kernel
To the server.
3. the method according to claim 1, wherein the execution primary function of system obtains figure to be uploaded
After piece, further includes:
The picture to be uploaded is stored into disk;
It is described that the picture to be uploaded is uploaded to server, comprising:
The picture to be uploaded being stored in the disk is uploaded to the server.
4. according to the method described in claim 3, it is characterized in that, described be uploaded to server for the picture to be uploaded, packet
It includes:
The picture to be uploaded being stored in the disk is obtained, and the thumbnail of the picture to be uploaded is calculated;
The thumbnail is imported in memory, and the thumbnail being directed into the memory is uploaded to server;
Delete the thumbnail of storage in the memory.
5. the method according to claim 1, which is characterized in that described to be accessed according to the application program
Instruction starts corresponding application program, comprising:
Corresponding with application program access instruction application code is downloaded from server, and by the application code
It stores into disk;
Obtain the more new version for the application code being stored in the disk and the current version of mounted application program
This;
Judge whether the current version is lower than the more new version;
When the current version is lower than the more new version, then updated according to the application code being stored in the disk
The current version;
Start corresponding application program according to the updated current version.
6. a kind of picture uploads device, which is characterized in that described device includes:
First receiving module for receiving application program access instruction, and starts according to the application program access instruction and corresponds to
Application program;
Second receiving module, for receiving the primary function access request of system, the primary function of system by the application program
Energy access request carries access parameter;
Code obtaining module obtains system corresponding with the access parameter for calling unified interface, and by the interface
It unites primary function;
Picture obtains module, obtains picture to be uploaded for executing the primary function of the system;
Uploading module, for the picture to be uploaded to be uploaded to server.
7. device according to claim 6, which is characterized in that the uploading module includes:
Computing unit, for calculating the size of the picture to be uploaded;
Judging unit, for judging whether the size of the picture to be uploaded is more than preset value;
Uploading unit, for when the size of the picture to be uploaded is more than preset value, by the first container kernel will it is described to
Uploading pictures are uploaded to the server, when the size of the picture to be uploaded is less than preset value, by second container
The picture to be uploaded is uploaded to the server by core.
8. device according to claim 6, which is characterized in that described device further include:
Memory module, for after executing the primary function of system and obtaining picture to be uploaded, the picture to be uploaded to be deposited
Storage is into disk;
The uploading module is also used to the picture to be uploaded being stored in the disk being uploaded to the server.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists
In the step of processor realizes any one of claims 1 to 5 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of method described in any one of claims 1 to 5 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811545346.4A CN109710337A (en) | 2018-12-17 | 2018-12-17 | Picture upload method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811545346.4A CN109710337A (en) | 2018-12-17 | 2018-12-17 | Picture upload method, device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109710337A true CN109710337A (en) | 2019-05-03 |
Family
ID=66256628
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811545346.4A Pending CN109710337A (en) | 2018-12-17 | 2018-12-17 | Picture upload method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109710337A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111698296A (en) * | 2020-05-27 | 2020-09-22 | 中国平安财产保险股份有限公司 | Method and device for uploading photos, computer equipment and storage medium |
CN112732457A (en) * | 2020-12-30 | 2021-04-30 | 上海瑞家信息技术有限公司 | Image transmission method, image transmission device, electronic equipment and computer readable medium |
CN114116048A (en) * | 2021-11-10 | 2022-03-01 | 北京乐驾科技有限公司 | Method and device for realizing lightweight of mobile equipment application program |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104079654A (en) * | 2014-07-04 | 2014-10-01 | 北京奇虎科技有限公司 | Application program picture posting method, client and electronic device |
CN105868224A (en) * | 2015-11-11 | 2016-08-17 | 乐视体育文化产业发展(北京)有限公司 | Picture processing method, equipment and system |
-
2018
- 2018-12-17 CN CN201811545346.4A patent/CN109710337A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104079654A (en) * | 2014-07-04 | 2014-10-01 | 北京奇虎科技有限公司 | Application program picture posting method, client and electronic device |
CN105868224A (en) * | 2015-11-11 | 2016-08-17 | 乐视体育文化产业发展(北京)有限公司 | Picture processing method, equipment and system |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111698296A (en) * | 2020-05-27 | 2020-09-22 | 中国平安财产保险股份有限公司 | Method and device for uploading photos, computer equipment and storage medium |
CN111698296B (en) * | 2020-05-27 | 2024-04-12 | 中国平安财产保险股份有限公司 | Method, device, computer equipment and storage medium for uploading photo |
CN112732457A (en) * | 2020-12-30 | 2021-04-30 | 上海瑞家信息技术有限公司 | Image transmission method, image transmission device, electronic equipment and computer readable medium |
CN112732457B (en) * | 2020-12-30 | 2024-01-19 | 上海瑞家信息技术有限公司 | Image transmission method, image transmission device, electronic equipment and computer readable medium |
CN114116048A (en) * | 2021-11-10 | 2022-03-01 | 北京乐驾科技有限公司 | Method and device for realizing lightweight of mobile equipment application program |
CN114116048B (en) * | 2021-11-10 | 2023-12-01 | 北京乐驾科技有限公司 | Method and device for realizing light weight of mobile device application program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103914205B (en) | A kind of file thumbnail methods of exhibiting of intelligent terminal and device | |
US20170134689A1 (en) | Photographing processing method and system based on mobile terminal | |
CN109710337A (en) | Picture upload method, device, computer equipment and storage medium | |
CN109408750A (en) | Page display method, device, computer equipment and storage medium | |
US10599336B2 (en) | Method of displaying content and electronic device adapted to the same | |
CN111191167A (en) | Page resource updating method and device, computer equipment and storage medium | |
US10375149B2 (en) | Application registration and interaction | |
CN110069264A (en) | Construct method, apparatus, computer equipment and the storage medium of resource packet | |
CN107656729A (en) | Updating device, method and the computer-readable recording medium of List View | |
CN105871695A (en) | Emoji sending method and device | |
CN103716346A (en) | Management method and device of application on android handset client | |
CN110489138A (en) | A kind of application update method, device and storage medium | |
US10430177B2 (en) | Method for updating a package | |
CN102404242A (en) | User information updating device, electric equipment and user information updating method | |
CN108512948A (en) | Address book updating method, device, computer equipment and storage medium | |
CN104424224A (en) | File index storage method and device | |
CN105868279B (en) | A kind of application recommended method and server | |
JP5643449B1 (en) | Server and method for displaying display screen on terminal device | |
CN109710278A (en) | Method and device for unloading application program and terminal equipment | |
CN114637946A (en) | Resource data processing method and device and electronic equipment | |
CN113050936A (en) | Front-end data processing method and device based on integrated development environment | |
CN105243123A (en) | Method and apparatus for generating difference file of offline map file and updating offline map file | |
KR101699159B1 (en) | Communication apparatus, virtual file system module comprised in the communication apparatus, control method thereof, and recording medium for recording program for executing the control method, application saved in the recording medium for executing the control method being combined with hardware | |
CN109461074A (en) | Transaction method for configuring route, device, computer equipment and storage medium | |
CN113641449B (en) | Mirror image downloading control method and device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |