CN110110103A - Acquisition methods, device, computer equipment and the storage medium of media resource - Google Patents

Acquisition methods, device, computer equipment and the storage medium of media resource Download PDF

Info

Publication number
CN110110103A
CN110110103A CN201910311883.0A CN201910311883A CN110110103A CN 110110103 A CN110110103 A CN 110110103A CN 201910311883 A CN201910311883 A CN 201910311883A CN 110110103 A CN110110103 A CN 110110103A
Authority
CN
China
Prior art keywords
media resource
parameter
acquisition
format
resource
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
Application number
CN201910311883.0A
Other languages
Chinese (zh)
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910311883.0A priority Critical patent/CN110110103A/en
Publication of CN110110103A publication Critical patent/CN110110103A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/44Browsing; Visualisation therefor
    • G06F16/444Spatial browsing, e.g. 2D maps, 3D or virtual spaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

This application involves mobile terminals to research and develop optimisation technique field, in particular to a kind of acquisition methods of media resource, device, computer equipment and storage medium.The described method includes: receiving media resource acquisition instruction by application program, the media resource acquisition instruction is used to obtain media resource parameter from the Webpage of the application program;Medium type is extracted from the media resource parameter;Search and show that acquisition modes selection menu corresponding with the medium type, the acquisition modes selection menu are used for for user's selected target acquisition modes;If detecting the instruction for selected target acquisition modes, calls local resource corresponding with the Target Acquisition mode to obtain tool and obtain media resource.The method for using acquisition media resource when APP can be optimized using this method.

Description

Acquisition methods, device, computer equipment and the storage medium of media resource
Technical field
This application involves field of computer technology, more particularly to the acquisition methods, device, computer of a kind of media resource Equipment and storage medium.
Background technique
With the fast development of internet and mobile client technology, people are obtained by mobile client, propagated, exchanged The demand of information is being increasing.For example, information displaying and and user interaction can be carried out in APP by displayed web page.
When user uses various APP on mobile terminals, be frequently encountered need to call camera carry out shooting or from The demand of the media resources such as local uploading pictures, video.Currently, being typically all to use video label by the H5 page in APP The media resource that mobile terminal is local or obtains by mobile terminal is obtained to realize, but the stability of video label Time that is poor and being applied to mobile terminal is later, therefore, very poor to the compatibility of various terminals system version, and runs speed Degree influences user experience dependent on network speed.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide it is a kind of to obtained when using APP the method for media resource into Acquisition methods, device, computer equipment and the storage medium of the media resource of row optimization.
A kind of acquisition methods of media resource, which comprises
Media resource acquisition instruction is received by application program, the media resource acquisition instruction is used to apply journey from described Media resource parameter is obtained in the Webpage of sequence;
Media resource parameter is obtained from the Webpage according to the media resource acquisition instruction;
Medium type is extracted from the media resource parameter;
Search and show that acquisition modes selection menu corresponding with the medium type, the acquisition modes selection menu are used In for user's selected target acquisition modes;
Menu is selected to obtain the media resource acquisition modes chosen by the acquisition modes;
If detecting the instruction for selected target acquisition modes, local corresponding with the Target Acquisition mode is called Resource acquisition tool obtains media resource.
Media resource parameter is obtained from the Webpage of the application program in one of the embodiments, comprising:
Resource requirement parameters are obtained from the corresponding page-tag of the Webpage;
Obtain local operating system version number;
Parameter overriding is carried out to the resource requirement parameters according to the operating system version number;
Media resource parameter is obtained from the parameter after overriding.
The acquisition modes of resource requirement parameters in one of the embodiments, comprising:
Initial demand parameter is read from the corresponding page-tag of the Webpage;
Obtain parameter preset format corresponding with the operating system version number;
Data format processing is carried out to the initial demand parameter according to the parameter preset format and generates resource requirement ginseng Number.
Method in one of the embodiments, further include:
Format needs parameter is extracted from the media resource parameter;
File format verification is carried out according to media resource of the format needs parameter to acquisition;
When file format verification passes through, the media resource is uploaded to the corresponding server of the application program.
File is carried out according to media resource of the format needs parameter to acquisition described in one of the embodiments, After format check, further includes:
When file format verifies failure, file format tune is carried out to the media resource according to the format needs parameter It is whole, and
Media resource after Format adjusting is uploaded to the corresponding server of the application program.
File format tune is carried out to the media resource according to the format needs parameter in one of the embodiments, It is whole, comprising:
When the medium type is picture, default image cropping window is obtained;
Image cropping interface is generated according to media resource and the default image cropping window;
It is obtained by the image cropping interface and cuts out media resource adjusted.
File format tune is carried out to the media resource according to the format needs parameter in one of the embodiments, It is whole, comprising:
When the medium type is picture, default image cropping window is obtained;
Image cropping interface is generated according to media resource and the default image cropping window;
It is obtained by the image cropping interface and cuts out media resource adjusted.
File format tune is carried out to the media resource according to the format needs parameter in one of the embodiments, It is whole, comprising:
When the medium type is video, the video editing interface of display limitation video editing duration;
It is obtained by the video editing interface and edits media resource adjusted.
A kind of acquisition device of media resource, described device include:
Command reception module, for receiving media resource acquisition instruction by application program, the media resource acquisition refers to It enables for obtaining media resource parameter from the Webpage of the application program;
Parameter acquisition module, for obtaining media resource from the Webpage according to the media resource acquisition instruction Parameter;
Type-collection module, for extracting medium type from the media resource parameter;
Menu display module, it is described for searching and showing acquisition modes selection menu corresponding with the medium type Acquisition modes select menu to be used for for user's selected target acquisition modes;
Mode obtains module, for selecting menu to obtain the media resource acquisition modes chosen by the acquisition modes;
Operation calls module, if being called and the target for detecting the instruction for selected target acquisition modes The corresponding local resource of acquisition modes obtains tool and obtains media resource.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing The step of device realizes the above 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 above method is realized when row.
Acquisition methods, device, computer equipment and the storage medium of above-mentioned media resource, receive when by Webpage When the acquisition instruction of media resource, the relevant parameter for the corresponding media resource for including in the page is passed to terminal by Webpage It is local, the acquisition modes that user wants the media resource of selection are further obtained by terminal local, and in the matchmaker for getting selection After body resource acquisition mode, call the corresponding resource acquisition operation of terminal local to realize the acquisition of media resource, thus by matchmaker The acquisition work of body resource is transferred to terminal local to be handled by Webpage completely, more so as to support and be compatible with Operating system, and compared to the realization in such a way that Webpage script obtains media resource, obtained by terminal local program Mode is more stable.
Detailed description of the invention
Fig. 1 is the application scenario diagram of the acquisition methods of media resource in one embodiment;
Fig. 2 is the flow diagram of the acquisition methods of media resource in one embodiment;
Fig. 3 is the flow diagram of parameters acquiring procedure in one embodiment;
Fig. 4 is the structural block diagram of the acquisition device of media resource in one embodiment;
Fig. 5 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.
The acquisition methods of media resource provided by the present application can be applied in application environment as shown in Figure 1.Wherein, Terminal 102 is communicated with application server 104 by network by network.Terminal 102 receives media money by application program Source acquisition instruction, the media resource acquisition instruction are used to obtain media resource ginseng from the Webpage of the application program Number;Media resource parameter is obtained from Webpage according to media resource acquisition instruction;Media are extracted from media resource parameter Type;It searches acquisition modes selection menu corresponding with medium type and shows;Menu acquisition is selected to choose by acquisition modes Media resource acquisition modes;If detecting the instruction for selected target acquisition modes, call and Target Acquisition mode pair The local resource answered obtains tool and obtains media resource.The media resource that terminal 102 will acquire is uploaded to application serve 104。
Wherein, terminal 102 can be, but not limited to be various personal computers, laptop, smart phone, tablet computer With portable wearable device, application server 104 can use the service of the either multiple server compositions of independent server Device cluster is realized.
In one embodiment, as shown in Fig. 2, providing a kind of acquisition methods of media resource, it is applied in this way Be illustrated for terminal 102 in Fig. 1, method the following steps are included:
Step 210, media resource acquisition instruction is received by application program, the media resource acquisition instruction is used for from institute State acquisition media resource parameter in the Webpage of application program.
In the present embodiment, the Webpage of application program refers to the H5 page, can provide medium type on the H5 page Menu is selected, user can choose the type for the media resource for needing to upload or shoot, and the type of media resource may include figure The types such as piece, video generate media resource after user selects the medium type option in medium type selection menu and determines Acquisition instruction.Terminal receives media resource acquisition instruction by application program, and the media resource acquisition instruction is used for from described Media resource parameter is obtained in the Webpage of application program.
Terminal obtains media resource parameter according to media resource acquisition instruction from Webpage, when receiving media resource After acquisition instruction, the media resource parameter for including in the page is passed to terminal local Native by the Webpage of application program. Media resource parameter may include the parameters such as the file format demand of the medium type of user's selection, media resource.
Step 220, medium type is extracted from media resource parameter.
Terminal extracts medium type from the media resource parameter of acquisition, and medium type includes, but is not limited to picture Type, video type etc..
Step 230, it searches and shows acquisition modes selection menu corresponding with medium type, acquisition modes select menu to use In for user's selected target acquisition modes.
Corresponding acquisition modes are provided with to different medium types in terminal local Native and select menu, acquisition side List the corresponding media resource of each medium type in formula selection menu can acquisition modes.For example, when medium type is picture When type, corresponding acquisition modes may include that pop-up camera takes pictures or selects picture etc. from local photograph album;Work as medium type When for video type, corresponding acquisition modes may include the shooting of pop-up camera or selection etc. from local video.Terminal is searched Acquisition modes corresponding with medium type select menu, and will acquire mode and menu is selected to be shown.
Step 240, it if detecting the instruction for selected target acquisition modes, calls corresponding with Target Acquisition mode Local resource obtains tool and obtains media resource.
User selects the acquisition modes of display to select the acquisition modes option provided in menu, when terminal detects that user selects In a certain acquisition modes option when, terminal obtains the corresponding media resource acquisition modes of option of selection.
After terminal gets the media resource acquisition modes of user's selection, call corresponding with media resource acquisition modes Operation interface, user is correspondingly operated by operation interface so that terminal obtains media resource.Terminal gets media money Behind source, media resource can be sent to the corresponding server of application program.
For example, when medium type be picture, the media resource acquisition modes that user select for from local photograph album selection picture When, terminal breathes out the picture selection interface of local photograph album, is selected as user picture shown in interface, when terminal detects To user select picture when, obtain the picture of selection.For another example, when medium type is picture, the media resource of user's selection is obtained Taking mode is when taking pictures, and terminal pops up the shooting interface of local camera, and user can be shot by shooting interface, terminal Obtain the photo of user's shooting.
In the present embodiment, when receiving the acquisition instruction of media resource by Webpage, Webpage is by the page In include the relevant parameter of corresponding media resource pass to terminal local, user is further obtained by terminal local and wants choosing The acquisition modes for the media resource selected, and after getting the media resource acquisition modes of selection, call terminal local corresponding Resource acquisition operation to realize the acquisition of media resource, thus by the acquisition work of media resource completely by Webpage transfer to Terminal local is handled, so as to support and be compatible with more operating systems, and compared to the acquisition modes of webpage, by end Hold the implementation obtained more stable.
In one embodiment, as shown in figure 3, obtaining the parameter of media resource parameter from the Webpage of application program Obtaining step may include:
Step 222, resource requirement parameters are obtained from the corresponding page-tag of the Webpage.
After receiving media resource acquisition instruction, Webpage extracts resource requirement ginseng from the label of the page Number, and the resource requirement parameters extracted are passed into terminal local Native, local Native receives Webpage transmitting Resource requirement parameters.
Specifically, the H5 page obtains accept from the input label of the page and receives information, and receives information from accept In extract resource requirement parameters.For example, it can be accept=" image/*, image/ that the accept got, which receives information, Px500X600, image/sz2m ", wherein the medium type that " image/* " indicates that user selects in instruction is picture, " image/px500X600 " indicates that the Pixel Dimensions of picture are 500X600, and " image/sz2m " indicates that the maximum file of picture is big Small is 2M.The H5 page receives the demand parameter that every media resource file is extracted in information from accept, it is possible to further Demand parameter is handled according to preset data format, by treated, resource requirement parameters pass to terminal local Native。
In another embodiment, the accept got from input label directly can be received information by the H5 page Terminal local Native is passed to, information is received to accept by terminal local Native and carries out Parameter analysis of electrochemical and processing.
Step 224, local operating system version number is obtained.
Operating system version number is the version number of the currently used operating system of terminal, and the operating system that terminal uses can be with Including but not limited to Android system, IOS system etc..Terminal obtains the version number of local operating system.
Step 226, parameter overriding is carried out to resource requirement parameters according to operating system version number.
Overwrite method corresponding with operating system version number is searched, according to the overwrite method found to resource requirement parameters It is override.After parameter overrides, resource requirement parameters complete the transfer from Webpage to terminal local Native.
Specifically, by taking Android system as an example, for 5.0 or less version of Android, terminal can be called in webview The openFileChooser method of WebChromeClient carries out parameter overriding;It can be with for Android 5.0 and the above version The FileChooserParams method of WebChromeClient is called to carry out parameter overriding, what each operating system version called Method name is identical, but has differences between the design parameter override.
Step 228, media resource parameter is obtained from the parameter after overriding.
Terminal extracts media resource parameter from the parameter of overriding.Specifically, terminal is square from openFileChooser () The parameter in accetpType, i.e. acquisition media resource parameter are extracted in method.
In one embodiment, the acquisition modes of resource requirement parameters may include: by Webpage from page-tag Middle reading initial demand parameter;Obtain parameter preset format corresponding with operating system version number;According to parameter preset format pair Initial demand parameter carries out data format processing and generates resource requirement parameters.
The H5 page obtains accept from the input label of the page and receives information, and receives in information and read from accept Initial demand parameter out, initial demand parameter are the relevant parameter for the media resource that user needs to obtain, and can specifically include matchmaker The relevant parameters such as body type, the file format demand of media resource.
Since the terminal of different operation version is when local Native carries out parameter overriding, the parameter format for needing to obtain is not Together, as 5.0 or less version of Android receives the parameter of H5 page transmitting, received parameter by openFileChooser method Format is character string, at this point, it is character that the H5 page need to will only receive the initial demand parameter decomposition read in information from accept String format can meet demand, and Android 5.0 and the above version can call FileChooserParams method to receive H5 pages The parameter of face transmitting, received is acceptTypes array, and parameter format is character array, and therefore, the H5 page needs to read Initial demand Parameter Switch be character array form.
In addition, terminal in advance also sets the parametric form of each parameter, such as need to add media in each parameter The marker character of type, marker character can add the predeterminated position in parameter character, such as character beginning, character ending;When pre- If parameter format be array form when, terminal can also in advance determine each putting in order for media resource parameter.Terminal Parametric form can also be set in advance using other methods according to actual needs, be not restricted to above-mentioned rule.For example, When medium type is picture, all media resource parameter needs are started with image/, when medium type is video, are owned Media resource parameter needs started with video/.
Webpage obtains the operating system version number of local terminal, and it is corresponding pre- to search current operation system version number Setting parameter format, Webpage carry out data format processing, place to initial demand parameter according to the parameter preset format found The resource requirement parameters for meeting data format requirement are generated after reason, then the resource requirement parameters of generation are passed into terminal local. For example, character string decomposition can be carried out to initial demand parameter, to each character string addition medium type label after decomposition, by word Symbol string is integrated into the operation such as character array.
In the present embodiment, Webpage is by the initial demand parameter that will obtain from page-tag, according to each operation The parameter format requirement of version, passes to terminal local after initial demand parameter is carried out Data Format Transform, so as to full again The format needs of each terminal operation version of foot have preferably compatibility.
In one embodiment, the acquisition methods of media resource can also include: to extract format from media resource parameter Demand parameter;File format verification is carried out according to media resource of the format needs parameter to acquisition;When file format verification passes through When, media resource is uploaded to the corresponding server of application program.
In the present embodiment, format needs parameter is related to the format needs of the media resource of the required acquisition of application Parameter, such as the resource of picture type may include the Pixel Dimensions of picture, photo resolution, picture file size parameter, The resource of video type may include the parameters such as video length, video file size.The parameter value of format needs parameter is general For the boundary value of required format needs.Format needs parameter is in advance in application development according to demand to Webpage Information is defined and is arranged.
Terminal local extracts format needs parameter from the media resource parameter of acquisition after getting media resource And the parameter value of each format needs parameter, according to the particular content of the format needs parameter extracted to the media resource of acquisition Pixel Dimensions comprising picture, photo resolution parameter in progress file format extraction, such as format needs parameter, then terminal is examined The Pixel Dimensions size and resolution sizes of transmitting file in survey.Terminal is by each File Format Data extracted and corresponding parameter Value is compared, and judges whether File Format Data meets format needs.Meet format need when terminal determines file format It asks, when file format verification passes through, the media resource that terminal will acquire is uploaded to the corresponding server of application program.
For example, the format needs parameter extracted from media resource parameter of terminal be image/px500X600 and Image/sz2m, image/px500X600 indicate that the size of the picture of application requirement is 500 pixel X600 pixels, Image/sz2m indicates the file size of the picture of application requirement no more than 2M, when the size of the media resource of acquisition is 500 pixel X600 pixels, when file size is less than or equal to 2M, then file format verification passes through, and otherwise, file format verification is lost It loses.
In one embodiment, file format is carried out according to media resource of the format needs parameter to acquisition described After verification, further includes: when file format verifies failure, carry out file format tune to media resource according to format needs parameter It is whole;And the media resource after Format adjusting is uploaded to the corresponding server of application program.
In the present embodiment, terminal can carry out file format to media resource using method described in above-described embodiment Verification, details are not described herein for specific verification step.When terminal verifies failure to file format, terminal is according to verification failure The design parameter value of format needs parameter carries out file format adjustment to media resource, until media resource adjusted Until file format meets format needs, the media resource that format needs are met after adjustment is uploaded to application program and corresponded to by terminal Server.
In one embodiment, it may include: to work as media that format needs parameter, which carries out file format adjustment to media resource, When type is picture, default image cropping window is obtained;Image cropping is generated according to media resource and default image cropping window Interface;It is obtained by image cropping interface and cuts out media resource adjusted.
The present embodiment is the media resource of picture type, and the Pixel Dimensions size or picture file size to picture carry out lattice Formula limits, and file format verifies unacceptable situation.When format check of the terminal to the picture of acquisition fails, terminal is obtained Default image cropping window, presetting image cropping window is preset editor's window that uploading pictures are carried out with image cropping Mouthful, the size of window and the dimension of picture size of requirement are consistent, and terminal is shown according to the picture that will acquire, and will Default image cropping window is stacked on picture, generates image cropping interface.User can be by image cropping interface to aobvious The picture shown is zoomed in and out to be moved with orientation, when user's operation is completed and confirms that terminal will cut out window on last interface after cutting out The picture shown in mouthful is extracted as media resource adjusted.
In one embodiment, if the acquisition modes of picture that terminal obtains are shot by camera, with After family has shot picture, directly the incoming default image cropping window of the picture of shooting is adaptively adjusted, is not necessarily to user It manually adjusts.
In another embodiment, when file size verification of the terminal to picture is obstructed out-of-date, format is can be generated in terminal Miscue, the picture file for informing that user uploads is excessive, undesirable, and prompts user's uploading pictures again.Terminal Compressing file processing can be carried out to undesirable picture automatically.
In one embodiment, carrying out file format adjustment to media resource according to format needs parameter may include: to work as When medium type is video, the video editing interface of display limitation video editing duration;It is obtained and is edited by video editing interface Media resource adjusted.
The present embodiment is the media resource of video type, and the duration or video file size to video carry out format restriction, And file format verifies unacceptable situation.When format check of the terminal to the video of acquisition fails, terminal shows that video is compiled Editing interface, display can overregulate the video time axis of video length in video editing interface, and define the maximum editor of video Duration.The video that terminal will acquire plays out on video editing interface, and user can be by adjusting video time axis to view Frequency such as is chosen, is sheared at the edit operations, so that the edited video of user is no more than maximum editor's duration.When user has edited At and confirm after, terminal by the edited video extraction of user be media resource adjusted.
In one embodiment, if the acquisition modes of video that terminal obtains are shot by camera, with When family is shot, timer is automatically turned on, the timing length of timer is ascended the throne the duration set in format needs parameter, when arriving When up to timing length, then camera shooting is automatically stopped.
In another embodiment, when file size verification of the terminal to video is obstructed out-of-date, format is can be generated in terminal Miscue, the video file for informing that user uploads is excessive, undesirable, and prompts user's uploaded videos again.Terminal Compressing file processing can be carried out to undesirable video automatically.
It should be understood that although each step in the flow chart of Fig. 2-3 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-3 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 4, providing a kind of acquisition device of media resource, comprising: command reception mould Block 410, type-collection module 420, menu display module 430 and operation calls module 440, in which:
Command reception module 410, for receiving media resource acquisition instruction, the matchmaker by the Webpage of application program Body resource acquisition instruction from the Webpage of the application program for obtaining media resource parameter.
Type-collection module 420, for extracting medium type from media resource parameter.
Acquisition modes selection menu corresponding with the medium type is searched and shown to menu display module 430, described to obtain Mode is taken to select menu for for user's selected target acquisition modes.
Operation calls module 440, if being called and the mesh for detecting the instruction for selected target acquisition modes It marks the corresponding local resource of acquisition modes and obtains tool acquisition media resource.
In one embodiment, command reception module 410 may include:
Parameter receiving unit, for obtaining resource requirement parameters from the corresponding page-tag of Webpage.
Version number's acquiring unit, for obtaining local operating system version number.
Parameter overrides unit, for carrying out parameter overriding to resource requirement parameters according to operating system version number.
Parameter extraction unit, for obtaining media resource parameter from the parameter after overriding.
In one embodiment, the acquisition device of media resource can also include:
Parameter read module, for reading initial demand parameter from the corresponding page-tag of Webpage.
Format obtains module, for obtaining parameter preset format corresponding with operating system version number.
Format analysis processing module generates money for carrying out data format processing to initial demand parameter according to parameter preset format Source demand parameter.
In one embodiment, the acquisition device of media resource can also include:
Format parameter extraction module, for extracting format needs parameter from media resource parameter.
Format check module, for carrying out file format verification according to media resource of the format needs parameter to acquisition.
First uploading module, for it is corresponding that media resource to be uploaded to application program when file format verification passes through Server.
In one embodiment, the acquisition device of media resource can also include:
Format adjusting module, for being carried out to media resource according to format needs parameter when file format verifies failure File format adjustment.
Second uploading module, for the media resource after Format adjusting to be uploaded to the corresponding server of application program.
In one embodiment, Format adjusting module may include:
Window obtains module, when for medium type being picture, obtains default image cropping window.
Interface generation module, for generating image cropping interface according to media resource and default image cropping window.
Adjustment module is cut out, cuts out media resource adjusted for obtaining by image cropping interface.
In one embodiment, Format adjusting module may include:
Display module is edited, for when medium type is video, display to limit video editing circle of video editing duration Face.
Editor's adjustment module, edits media resource adjusted for obtaining by video editing interface.
In one embodiment, a kind of computer equipment is provided, which can be terminal, internal structure Figure can be as shown in Figure 5.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 implementation method of the acquisition of media resource.The display screen of the computer equipment can be liquid crystal display or electronics Ink display screen, the input unit of the computer equipment can be the touch layer covered on display screen, are also possible to computer and set Key, trace ball or the Trackpad being arranged on standby shell, can also be external keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Fig. 5, 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 media resource acquisition by application program Instruction, the media resource acquisition instruction are used to obtain media resource parameter from the Webpage of the application program;From institute It states in media resource parameter and extracts medium type;Search and show acquisition modes selection menu corresponding with the medium type, The acquisition modes selection menu is used for for user's selected target acquisition modes;If detecting for selected target acquisition modes Instruction then calls local resource corresponding with the Target Acquisition mode to obtain tool and obtains media resource.In one embodiment In, processor realizes the step of media resource parameter is obtained from the Webpage of the application program when executing computer program When be also used to: obtain resource requirement parameters from the corresponding page-tag of Webpage;Obtain local operating system version number; Parameter overriding is carried out to resource requirement parameters according to operating system version number;Media resource ginseng is obtained from the parameter after overriding Number.
In one embodiment, it is gone back when realizing the step of the acquisition of resource requirement parameters when processor executes computer program For: initial demand parameter is read from the corresponding page-tag of Webpage;It obtains corresponding with operating system version number pre- Setting parameter format;Data format processing is carried out to initial demand parameter according to parameter preset format and generates resource requirement parameters.
In one embodiment, it is also performed the steps of from media resource parameter when processor executes computer program Extract format needs parameter;File format verification is carried out according to media resource of the format needs parameter to acquisition;Work as file format When verification passes through, media resource is uploaded to the corresponding server of application program.
In one embodiment, it also performs the steps of when processor executes computer program according to format needs parameter File format adjustment is carried out to media resource;And the media resource after Format adjusting is uploaded to the corresponding service of application program Device.
In one embodiment, processor execute computer program when realize according to format needs parameter to media resource into It is also used to when the step of style of writing part Format adjusting: when medium type is picture, obtaining default image cropping window;According to media Resource and default image cropping window generate image cropping interface;It is obtained by image cropping interface and cuts out media money adjusted Source.
In one embodiment, processor execute computer program when realize according to format needs parameter to media resource into Be also used to when the step of style of writing part Format adjusting: when medium type is video, the video of display limitation video editing duration is compiled Editing interface;It is obtained by video editing interface and edits media resource adjusted.
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 media resource acquisition instruction, the media money by application program Source acquisition instruction is used to obtain media resource parameter from the Webpage of the application program;From the media resource parameter Extract medium type;Search and show acquisition modes selection menu corresponding with the medium type, the acquisition modes selection Menu is used for for user's selected target acquisition modes;If detecting the instruction for selected target acquisition modes, calling and institute It states the corresponding local resource of Target Acquisition mode and obtains tool acquisition media resource.
In one embodiment, it is realized from the Webpage of the application program when computer program is executed by processor It is also used to when obtaining the step of media resource parameter: obtaining resource requirement parameters from the corresponding page-tag of Webpage;It obtains Take local operating system version number;Parameter overriding is carried out to resource requirement parameters according to operating system version number;After overriding Parameter in obtain media resource parameter.
In one embodiment, computer program is realized when being executed by processor according to media resource acquisition instruction from webpage It is also used to when obtaining the step of media resource parameter in the page: receiving the resource obtained in the slave page-tag of Webpage transmitting Demand parameter;Obtain local operating system version number;Parameter is carried out to resource requirement parameters according to operating system version number to cover It writes;Media resource parameter is obtained from the parameter after overriding.
In one embodiment, when realizing the step of acquisition of resource requirement parameters when computer program is executed by processor It is also used to: initial demand parameter is read from page-tag by Webpage;It obtains corresponding with operating system version number pre- Setting parameter format;Data format processing is carried out to initial demand parameter according to parameter preset format and generates resource requirement parameters.
In one embodiment, it is also performed the steps of when computer program is executed by processor from media resource parameter Middle extraction format needs parameter;File format verification is carried out according to media resource of the format needs parameter to acquisition;Work as tray When formula verification passes through, media resource is uploaded to the corresponding server of application program.
In one embodiment, it is also performed the steps of when computer program is executed by processor when file format verifies When failure, file format adjustment is carried out to media resource according to format needs parameter;And it will be on the media resource after Format adjusting Reach the corresponding server of application program.
In one embodiment, it realizes according to format needs parameter when computer program is executed by processor to media resource Be also used to when the step of file format adjustment: when medium type is picture, obtaining default image cropping window;According to matchmaker Body resource and default image cropping window generate image cropping interface;It is obtained by image cropping interface and cuts out media adjusted Resource.
In one embodiment, it realizes according to format needs parameter when computer program is executed by processor to media resource Be also used to when the step of file format adjustment: when medium type is video, the video of display limitation video editing duration Editing interface;It is obtained by video editing interface and edits media resource adjusted.
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 acquisition methods of media resource, which comprises
Media resource acquisition instruction is received by application program, the media resource acquisition instruction is used for from the application program Media resource parameter is obtained in Webpage;
Medium type is extracted from the media resource parameter;
Search and show acquisition modes selection menu corresponding with the medium type, the acquisition modes selection menu is for supplying User's selected target acquisition modes;
If detecting the instruction for selected target acquisition modes, local resource corresponding with the Target Acquisition mode is called Acquisition tool obtains media resource.
2. the method according to claim 1, wherein described obtain matchmaker from the Webpage of the application program Body resource parameters, comprising:
Resource requirement parameters are obtained from the corresponding page-tag of the Webpage;
Obtain local operating system version number;
Parameter overriding is carried out to the resource requirement parameters according to the operating system version number;
Media resource parameter is obtained from the parameter after overriding.
3. according to the method described in claim 2, it is characterized in that, the acquisition modes of the resource requirement parameters, comprising:
Initial demand parameter is read from the corresponding page-tag of the Webpage;
Obtain parameter preset format corresponding with the operating system version number;
Data format processing is carried out to the initial demand parameter according to the parameter preset format and generates resource requirement parameters.
4. the method according to claim 1, wherein the method also includes:
Format needs parameter is extracted from the media resource parameter;
File format verification is carried out according to media resource of the format needs parameter to acquisition;
When file format verification passes through, the media resource is uploaded to the corresponding server of the application program.
5. according to the method described in claim 4, it is characterized in that, it is described according to the format needs parameter to acquisition Media resource carries out after file format verification, further includes:
When file format verifies failure, file format adjustment is carried out to the media resource according to the format needs parameter, And the media resource after Format adjusting is uploaded to the corresponding server of the application program.
6. according to the method described in claim 5, it is characterized in that, described provide the media according to the format needs parameter Source carries out file format adjustment, comprising:
When the medium type is picture, default image cropping window is obtained;
Image cropping interface is generated according to media resource and the default image cropping window;
It is obtained by the image cropping interface and cuts out media resource adjusted.
7. according to the method described in claim 5, it is characterized in that, described provide the media according to the format needs parameter Source carries out file format adjustment, comprising:
When the medium type is video, the video editing interface of display limitation video editing duration;
It is obtained by the video editing interface and edits media resource adjusted.
8. a kind of acquisition device of media resource, which is characterized in that described device includes:
Command reception module, for receiving media resource acquisition instruction by application program, the media resource acquisition instruction is used Media resource parameter is obtained in the Webpage from the application program;
Type-collection module, for extracting medium type from the media resource parameter;
Menu display module, for searching and showing acquisition modes selection menu corresponding with the medium type, the acquisition Mode selects menu for for user's selected target acquisition modes;
Operation calls module, if being called and the Target Acquisition for detecting the instruction for selected target acquisition modes The corresponding local resource of mode obtains tool and obtains media resource.
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 7 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 7 is realized when being executed by processor.
CN201910311883.0A 2019-04-18 2019-04-18 Acquisition methods, device, computer equipment and the storage medium of media resource Pending CN110110103A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910311883.0A CN110110103A (en) 2019-04-18 2019-04-18 Acquisition methods, device, computer equipment and the storage medium of media resource

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910311883.0A CN110110103A (en) 2019-04-18 2019-04-18 Acquisition methods, device, computer equipment and the storage medium of media resource

Publications (1)

Publication Number Publication Date
CN110110103A true CN110110103A (en) 2019-08-09

Family

ID=67485723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910311883.0A Pending CN110110103A (en) 2019-04-18 2019-04-18 Acquisition methods, device, computer equipment and the storage medium of media resource

Country Status (1)

Country Link
CN (1) CN110110103A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110852259A (en) * 2019-11-08 2020-02-28 深圳前海微众银行股份有限公司 Living body identification method, living body identification system, living body identification apparatus, living body identification device, and computer-readable storage medium
CN111953739A (en) * 2020-07-20 2020-11-17 厦门美柚股份有限公司 Resource downloading method, device and medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103871434A (en) * 2012-12-17 2014-06-18 腾讯科技(深圳)有限公司 Multimedia playing method, equipment and system
US9454531B1 (en) * 2012-04-03 2016-09-27 Google Inc. Media content presentation by categorizing and formatting media types
CN106257944A (en) * 2016-08-05 2016-12-28 广州极飞电子科技有限公司 Multimedia data processing method based on unmanned plane and system
CN107085612A (en) * 2017-05-15 2017-08-22 腾讯科技(深圳)有限公司 media content display method, device and storage medium
CN107609012A (en) * 2017-07-31 2018-01-19 珠海市魅族科技有限公司 Multimedia file treating method and apparatus, computer installation, readable storage medium storing program for executing
US20180184155A1 (en) * 2016-12-22 2018-06-28 Guangzhou Ucweb Computer Technology Co., Ltd Method, device, and computing apparatus for acquiring broadcasting content
CN108600816A (en) * 2018-05-17 2018-09-28 上海七牛信息技术有限公司 A kind of detecting method of media, device and media play system
CN108763416A (en) * 2018-05-23 2018-11-06 广州视源电子科技股份有限公司 Multimedia file methods of exhibiting, device, computer equipment and storage medium
CN109032738A (en) * 2018-07-17 2018-12-18 腾讯科技(深圳)有限公司 Control method for playing multimedia, device, terminal and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9454531B1 (en) * 2012-04-03 2016-09-27 Google Inc. Media content presentation by categorizing and formatting media types
CN103871434A (en) * 2012-12-17 2014-06-18 腾讯科技(深圳)有限公司 Multimedia playing method, equipment and system
CN106257944A (en) * 2016-08-05 2016-12-28 广州极飞电子科技有限公司 Multimedia data processing method based on unmanned plane and system
US20180184155A1 (en) * 2016-12-22 2018-06-28 Guangzhou Ucweb Computer Technology Co., Ltd Method, device, and computing apparatus for acquiring broadcasting content
CN107085612A (en) * 2017-05-15 2017-08-22 腾讯科技(深圳)有限公司 media content display method, device and storage medium
CN107609012A (en) * 2017-07-31 2018-01-19 珠海市魅族科技有限公司 Multimedia file treating method and apparatus, computer installation, readable storage medium storing program for executing
CN108600816A (en) * 2018-05-17 2018-09-28 上海七牛信息技术有限公司 A kind of detecting method of media, device and media play system
CN108763416A (en) * 2018-05-23 2018-11-06 广州视源电子科技股份有限公司 Multimedia file methods of exhibiting, device, computer equipment and storage medium
CN109032738A (en) * 2018-07-17 2018-12-18 腾讯科技(深圳)有限公司 Control method for playing multimedia, device, terminal and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
梁存良;刘峰;李萨;: "网络课程中部署视频媒体的技术研究", 中国教育信息化, no. 01, pages 73 - 75 *
雷钢;: "基于流的视频资源的获取", 现代电子技术, no. 04, pages 112 - 115 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110852259A (en) * 2019-11-08 2020-02-28 深圳前海微众银行股份有限公司 Living body identification method, living body identification system, living body identification apparatus, living body identification device, and computer-readable storage medium
CN111953739A (en) * 2020-07-20 2020-11-17 厦门美柚股份有限公司 Resource downloading method, device and medium
CN111953739B (en) * 2020-07-20 2023-10-03 厦门美柚股份有限公司 Resource downloading method, device and medium

Similar Documents

Publication Publication Date Title
RU2622874C1 (en) Method, device and server of recognizing confidential photograph
CN112929745B (en) Video data processing method, device, computer readable storage medium and equipment
CN111190558B (en) Screen projection control method and device, computer readable storage medium and computer equipment
US11962932B2 (en) Video generation based on predetermined background
US11589091B2 (en) Video information processing method, computer equipment and storage medium
CN100543728C (en) Use the browser file upload
US8856067B2 (en) Method for storing media captured using a portable electronic device
KR20140143725A (en) Image correlation method and electronic device therof
CN109492206A (en) PPT presentation file method for recording, device, computer equipment and storage medium
CN111277761B (en) Video shooting method, device and system, electronic equipment and storage medium
CN110830716B (en) Image generation method and device, computer equipment and storage medium
CN109597908A (en) Photo searching method, device, equipment and storage medium based on recognition of face
CN105005599A (en) Photograph sharing method and mobile terminal
CN110110103A (en) Acquisition methods, device, computer equipment and the storage medium of media resource
CN104333699A (en) Synthetic method and device of user-defined photographing area
CN103699621A (en) Method for recording graphic and text information on materials recorded by mobile device
KR20150042678A (en) Mehtod and apparatus for manufacturing electronic album
JP2009246822A (en) Method for editing image and device therefor
CN114430460A (en) Shooting method and device and electronic equipment
CN102981898B (en) Information processor and control method thereof
CN110047115B (en) Star image shooting method and device, computer equipment and storage medium
CN114500844A (en) Shooting method and device and electronic equipment
CN114584704A (en) Shooting method and device and electronic equipment
CN113835598A (en) Information acquisition method and device and electronic equipment
CN109150967B (en) Photo album creating method and device and electronic equipment

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190809