[go: up one dir, main page]

CN105843881B - A kind of image processing url mapping method and device - Google Patents

A kind of image processing url mapping method and device Download PDF

Info

Publication number
CN105843881B
CN105843881B CN201610161488.5A CN201610161488A CN105843881B CN 105843881 B CN105843881 B CN 105843881B CN 201610161488 A CN201610161488 A CN 201610161488A CN 105843881 B CN105843881 B CN 105843881B
Authority
CN
China
Prior art keywords
url
mapping
space
access request
configuration file
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.)
Active
Application number
CN201610161488.5A
Other languages
Chinese (zh)
Other versions
CN105843881A (en
Inventor
刘菲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sohu New Media Information Technology Co Ltd
Original Assignee
Beijing Sohu New Media Information 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 Beijing Sohu New Media Information Technology Co Ltd filed Critical Beijing Sohu New Media Information Technology Co Ltd
Priority to CN201610161488.5A priority Critical patent/CN105843881B/en
Publication of CN105843881A publication Critical patent/CN105843881A/en
Application granted granted Critical
Publication of CN105843881B publication Critical patent/CN105843881B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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]

Landscapes

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

Abstract

The embodiment of the present invention discloses a kind of picture processing url mapping method and device, technical solution provided by the invention, it is that joined url mapping mechanism between the specified url access rule of the existing url access rule of user and cloud service platform, the url mapping mechanism relies primarily on configuration file and mapping script file to realize, adaptability mapping pointedly can be carried out automatically to Client-initiated url access request, to be suitble to the requirement of cloud service platform.The present invention can be avoided the omission of manual amendment's generation, greatly simplify business migration compared with manual amendment's mode of the prior art, and user can be helped to realize the rapid abutting joint of business.

Description

A kind of picture processing url mapping method and device
Technical field
The present invention relates to computer field more particularly to a kind of picture processing url mapping methods and device.
Background technique
As rhythm of life increasingly accelerates, the time of user increasingly fragmentation can directly stimulate the figure of user's vision Text combines reading model to be increasingly becoming fashion trend, and picture function has become the important component of numerous mobile applications.So And complicated network environment limits the speed that user uploads download pictures, reduce indirectly user using rate, have become For the research emphasis of developer.And the photo services function that cloud store-service is released, it can quickly and effectively solve the problems, such as this.
The photo services of cloud store-service are from developer's angle, and comprehensive exploitation person is in face of this kind of of picture and text processing The objective factors such as main business maintenance cost height provide guarantee high speed, powerful business function service and safe and stable Background service.
Therefore, more and more enterprises start only to be absorbed in own service, and background picture data are gradually moved to cloud Service platform.Picture based on url (uniform resource locator, uniform resource locator, also referred to as network address) Processing method is that cloud service provider provides common method when picture is stored in access service, and user can only mention according to cloud service For the file access rule that quotient specifies, map is operated by url according to actual needs, cloud service backstage is according in url Specified different parameters handle file, finally return to corresponding processing result.
It is each since each enterprise is owned by a set of unique picture processing rule corresponding with url, but under normal circumstances These specified rules of enterprise and the rule that cloud storage providers specify are not consistent, and therefore, enterprise is in order to use cloud service to put down Platform just must modify one by one access stencil by way of manual amendment url, by services migrating to cloud service platform, but it is this Manual amendment's mode, takes time and effort, and can also there are problems that omitting.
Therefore, the urgent technical problems to be solved of those skilled in the art are exactly a kind of method that how to provide at present, are reduced The labor workload of migration service avoids omitting, while reducing services migrating duration.
Summary of the invention
In order to solve in the prior art, the present invention provides a kind of picture processing url mapping method and device, without manually repairing Change url, realize migration service automatically, can be avoided omission, while reducing services migrating duration.
A kind of picture processing url mapping method is provided in first aspect present invention, which comprises
Receive url access request;The url access request includes: the source resource name and picture to be downloaded of picture to be downloaded The space identification in locating space;
The space identification is obtained from the url access request;The space refers to that cloud service platform defined is used for The container of storage file object;The space identification is used for unique identification space;
It is searched from configuration file according to the space identification and the corresponding relationship of the space correlation;The configuration file For record space and map script file between corresponding relationship, and, map the position of script file;
When searching the corresponding relationship with the space correlation, according to the position of mapping script file corresponding with the space It sets load and executes the url access request after mapping script file is mapped;The mapping script file is for will be described Url access request is mapped to the script file of the specified url format of the cloud service platform.
Optionally, according to the preset time cycle, periodically judge whether the configuration file loaded in system needs It is updated, if it is, reloading configuration file.
Optionally, it is judged by the following manner whether the configuration file needs to be updated:
Judge the configuration file stored in database the final updating time whether with the configuration file that has been loaded in system Final updating time consistency, if it is not, then show the configuration file loaded in system needs be updated.
Optionally, the mapping script file is the script file based on Groovy.
Optionally, the method also includes:
Model validation is carried out to the url access request after the mapping, after being verified, according to the url after the mapping The source resource that access request treats download pictures is handled, and returns to processing result.
Optionally, the url access request further include: resource processing rule;The resource processing rule is for describing The source resource for treating download pictures makees the rule of specific operation processing;The resource processing rule includes specific operation type and behaviour Make parameter.
Optionally, the specific operation type include: scaling, rotation, watermark or cutting a kind of operation or a variety of behaviour Make composite type.
Optionally, the method also includes:
Model validation is carried out to the url access request after the mapping, after being verified, according to the url after the mapping Access request handles rule according to the resource and treats the source resource progress specific operation processing of download pictures, and returns to processing As a result.
Second aspect of the present invention provides a kind of picture processing url mapping device, and described device includes:
Request reception unit, for receiving url access request;The url access request includes: the source money of picture to be downloaded The space identification in space locating for parent name and picture to be downloaded;
Acquiring unit, for obtaining the space identification from the url access request;The space refers to that cloud service is flat The container for storage file object that platform defines;The space identification is used for unique identification space;
Searching unit, for searching close corresponding with the space correlation from configuration file according to the space identification System;The configuration file is used to record space and maps the corresponding relationship between script file, and, map the position of script file It sets;
Map unit, for being reflected according to corresponding with the space when searching the corresponding relationship with the space correlation The position for penetrating script file loads and executes the url access request after mapping script file is mapped;The mapping script text Part is the script file for the url access request to be mapped to the specified url format of the cloud service platform.
Optionally, described device further include:
Loading unit is updated, the configuration text for periodically having loaded in judgement system according to the preset time cycle Whether part, which needs, is updated, if it is, reloading configuration file.
Optionally, the update loading unit judges whether the configuration file needs by more especially by following manner It is new:
Judge the configuration file stored in database the final updating time whether with the configuration file that has been loaded in system Final updating time consistency, if it is not, then show the configuration file loaded in system needs be updated.
Optionally, the mapping script file is the script file based on Groovy.
Optionally, described device further include:
Cloud processing unit, for carrying out model validation to the url access request after the mapping, after being verified, according to The source resource that url access request after the mapping treats download pictures is handled, and returns to processing result.
Optionally, the url access request further include: resource processing rule;The resource processing rule is for describing The source resource for treating download pictures makees the rule of specific operation processing;The resource processing rule includes specific operation type and behaviour Make parameter.
Optionally, the specific operation type include: scaling, rotation, watermark or cutting a kind of operation or a variety of behaviour Make composite type.
Optionally, described device further include:
Second cloud processing unit, for carrying out model validation to the url access request after the mapping, after being verified, According to the url access request after the mapping, it is specific that the regular source resource progress for treating download pictures is handled according to the resource Operation processing, and return to processing result.
Compared with the existing technology, the present invention has the advantages that
Technical solution provided by the invention, firstly, receiving url access request;The url access request includes: to be downloaded The space identification in space locating for the source resource name and picture to be downloaded of picture;The space is obtained from the url access request Mark;The space refers to the container for storage file object that cloud service platform defines;The space identification is for unique Identifier space;Then, configuration information corresponding with the space is searched from configuration file according to the space identification;It is described to match File is set for recording space and mapping the corresponding relationship between script file;Finally, when finding corresponding configuration information, It loads and executes the url access request after the corresponding mapping script file in the space is mapped;The mapping script file It is the script file for the url access request to be mapped to the url format that the cloud service platform is supported.The present invention provides Technical solution, be that joined between the specified url access rule of the existing url access rule of user and cloud service platform Url mapping mechanism, which relies primarily on configuration file and mapping script file is realized, can be pointedly right Client-initiated url access request carries out adaptability mapping automatically, to be suitble to the requirement of cloud service platform, can effectively prevent existing There is the issuable omission of manual amendment's mode in technology, this just greatly simplifies business migration, and user can be helped real The rapid abutting joint of existing business.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The some embodiments recorded in application, for those of ordinary skill in the art, without creative efforts, It can also be obtained according to these attached drawings other attached drawings.
Fig. 1 is the picture treatment process exemplary diagram based on url of the prior art;
Fig. 2 is the picture treatment process schematic diagram provided by the invention based on url;
Fig. 3 is the flow chart that a kind of picture provided by the invention handles url mapping method embodiment;
Fig. 4 is the structure chart that a kind of picture provided by the invention handles url mapping device embodiment.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only this Invention a part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art exist Every other embodiment obtained under the premise of creative work is not made, shall fall within the protection scope of the present invention.
The picture treatment process based on url of the prior art is as shown in Figure 1, cloud service platform receives Client-initiated url After access request, first url mode is verified, checks whether url access meets the specified url processing rule of cloud service platform Then;Legal request is sent to processing module again, by processing module according to the parameter pair set in specific access request Picture is handled and returns to processing result;Finally, processing result is returned to user by server-side by cloud service platform.
All it is the regulation by user according to cloud service platform url in the prior art, modifies manually to the url of oneself, To realize that the customized url rule of user is docked with the good of url access rule that cloud service platform is specified.And the present invention in order to The dynamic mapping for realizing url proposes and specifies corresponding configuration for different spaces, utilizes configuration file and conversion script file Realize the automatic mapping to url.
Referring to fig. 2, Fig. 2 is the picture treatment process schematic diagram provided by the invention based on url.As shown in Fig. 2, receiving To after Client-initiated url access request, the first verifying without url mode, but picture text is first obtained from access request Space identification where part;Then corresponding space configuration is searched from configuration file, if there is matching corresponding to the space It sets, then loads the conversion script file in the space, Client-initiated url access request is reflected using the conversion script file It penetrates, then, then url model validation is carried out to the url access request after mapping, it is flat to check whether url access meets cloud service The specified url of platform handles rule;Legal request is sent to processing module again, is asked by processing module according to specific access It asks the parameter of middle setting to handle picture and returns to processing result;Finally, processing result is passed through service by cloud service platform End returns to user.
The present invention mainly during existing picture handles rul, increases url dynamic mapping link, utilizes the link It realizes the conversion for the url rule that the customized url rule of user and cloud service platform are specified, pointedly user can be initiated Url access request carry out adaptability mapping automatically, be suitble to cloud service platform requirement, can effectively prevent in the prior art Manual amendment's mode issuable omission, this just greatly simplifies business migration, and user can be helped to realize business Rapid abutting joint.
Technical solution provided by the invention can efficiently convert url, be suitable for all and carried out based on url rule The service architecture of file access.
Technical solution provided by the invention is explained below by embodiment.
Embodiment of the method
It is a kind of flow chart of picture processing url mapping method embodiment provided by the invention referring to Fig. 3, Fig. 3;Such as Fig. 3 Shown, this method may comprise steps of 101-104:
Step 101: receiving url access request;The url access request include: picture to be downloaded source resource name and to The space identification in space locating for download pictures;
When realizing, if user only needs to access picture, the url access request initiated only includes: figure to be downloaded The space identification in space locating for the source resource name and picture to be downloaded of piece;If user needs to carry out particular procedure to picture, It can initiate the space identification and money that url access request includes: the source resource name of picture to be downloaded, space locating for picture to be downloaded Source processing rule;Resource processing rule is to make the rule that specific operation is handled for describing to treat the source resource of download pictures Then;The resource processing rule includes specific operation type and operating parameter.
Wherein, the specific operation type includes: a kind of operation or a variety of operations of scaling, rotation, watermark or cutting Composite type.
Multiple spaces can be established on cloud service platform, each user can possess one or more spaces, picture file Storage is in space.Space just refers to the container for storage file object that cloud service platform defines.Each space has one A unique identification, the unique identification are referred to as space identification, and space identification can be space name or space ID.
User is to when download pictures, initiate url access request according to customized url rule from cloud service platform. The customized url rule of user may be identical as the url rule of Cloud Server platform, it is also possible to not identical.In the present invention User is not necessarily to manual modification, only need to initiate request according to oneself defined url rule.
Step 102: obtaining the space identification from the url access request;The space refers to that cloud service platform is fixed The container for storage file object of justice;The space identification is used for unique identification space;
After cloud service platform receives url access request, the url access request is parsed, space identification is therefrom obtained.
Step 103: being searched from configuration file according to the space identification and the corresponding relationship of the space correlation;It is described Configuration file is used to record space and maps the corresponding relationship between script file, and, map the position of script file;
Cloud service platform searches the configuration with the spatial contrast after acquiring space identification from configuration file Information.
Configuration file is that pre-selection is established, and records space and maps the file of the corresponding relationship between script file.Generally In the case of, user it is customized rule once it is determined that, can seldom change later, and based on user it is customized rule and cloud The specified rule of service platform, established mapping script file generally would not also be changed, therefore, the content one of configuration file As will not change.But some exceptions in practical applications, may be also had, it is of course also possible to will appear business It changes, needs to increase or cancel the situation of some url rule.In view of these situations, it is necessary to update configuration in time File, so that cloud service platform can carry out business processing using newest configuration file at the first time.
Based on this, the invention also provides configuration file update mechanism, specific implementation is the base of method shown in Fig. 1 On plinth, also increase following steps:
According to the preset time cycle, periodically judge whether the configuration file loaded in system needs to be updated, If it is, reloading configuration file.
Specifically, can be judged by the following manner whether the configuration file needs to be updated:
Judge the configuration file stored in database the final updating time whether with the configuration file that has been loaded in system Final updating time consistency, if it is not, then show the configuration file loaded in system needs be updated.
When realizing, it can be provided with timer in the system of cloud service platform, using the timer according to week time Phase, such as at interval of the final updating time of the configuration file of detection in 5 seconds, determine the need for reloading configuration text with this Part.The corresponding relationship between having time between mapping script file is specified in configuration file, a space only corresponds to a conversion foot This document.When not needing to update, then maintain original configuration file constant.
The present invention uses this mode of configuration file, enables to configuration file can be in the feelings for not needing the service of restarting It is loaded under condition, can dynamically increase, corresponding configuration file and mapping script file is deleted or modified, and can guarantee to configure It comes into force immediately within a short period of time.
This loading method that updates enables the modification of mapping configuration to give birth to immediately in the case where not needing and restarting service Effect, increases the flexibility of cloud service platform service, when cloud service platform service user can be helped to carry out services migrating, letter Change transition process, reduces transit time and cost.
Wherein, mapping script file needs write in advance according to the actual demand that user-defined url rule is converted, and It is stored in specified allocation position, so that load uses.When realizing, need according to user demand, for each space configuration A set of mapping script file, which is used to the url of user being mapped as the available url of cloud service platform, and reaches To user's desired effect.
When realizing, mapping script file can be write using Groovy.Groovy is one kind for Java Virtual Machine Quick dynamic language, it is a kind of Object-Oriented Programming Language of maturation, not only can be used for Object-Oriented Programming, but also can use Make pure scripting language.Excessive code need not be write using this kind of language, while being had in closure and dynamic language again Other characteristics.Groovy is that (substitution refers to can carry out Java volume with Groovy in Java platform for a substitution language of JVM Journey), usage mode is substantially identical as the mode of Java code is used, which is particularly suitable for supporting with the dynamic language of Spring It is used together, when design has fully considered that Java is integrated, this is easy to the interoperability of Groovy and Java code.This method is filled Point be utilized Groovy language can with the characteristic of java code interactive operation, with Groovy reality on original Java service framework Existing url mapping block, the characteristic that Groovy can be made full use of quickly to handle as scripting language for character string and with Existing Java Web service is effectively implemented in combination with the quick load of configuration file.
When realizing, a space can configure a corresponding Groovy script file, and different spaces can configure Identical Groovy script file.
Step 104: when searching the corresponding relationship with the space correlation, according to mapping script corresponding with the space The position of file loads and executes the url access request after mapping script file is mapped;The mapping script file is to use In the script file that the url access request is mapped to the specified url format of the cloud service platform.
In view of when realizing, user needs to access to the picture in cloud, then completed in method provided by the invention After mapping processing, following steps can also be performed:
Model validation is carried out to the url access request after the mapping, after being verified, according to the url after the mapping The source resource that access request treats download pictures is handled, and returns to processing result.
When realizing, if the url access request received includes: the source resource name of picture to be downloaded, picture to be downloaded The space identification and resource in locating space handle rule;The resource processing rule is provided for describing to treat the source of download pictures Make the rule of specific operation processing in source;The resource processing rule includes specific operation type and operating parameter.It is then corresponding, also Following steps can be executed:
Model validation is carried out to the url access request after the mapping, after being verified, according to the url after the mapping Access request handles rule according to the resource and treats the source resource progress specific operation processing of download pictures, and returns to processing As a result.
Such as: for scaling type, the source resource for treating download pictures zooms in and out processing according to zooming parameter;Example again Such as, for rotation type, the source resource for treating download pictures carries out at rotation according to direction of rotation parameter and rotation angle parameter Reason etc..
In this way, saving server end figure just to can be realized quick, convenient, complete function cloud computing service for user Piece handles work, also saves service server resource, greatly improves development efficiency.
Certainly, executing step 103 also will appear, and not find in configuration file and the corresponding relationship of space correlation Such case, in this case, entire process flow are unaffected, according to process shown in FIG. 1, continue to execute tupe and test Card.
From above-described embodiment as can be seen that technical solution provided by the invention be in the existing url access rule of user and It joined url mapping mechanism between the specified url access rule of cloud service platform, which relies primarily on configuration text Part realizes that url mapping control is fine to space level by the present invention with mapping script file, can be pointedly right well Client-initiated url access request carries out adaptability mapping automatically, to be suitble to the requirement of cloud service platform, can effectively prevent existing There is the issuable omission of manual amendment's mode in technology, this just greatly simplifies business migration, and user can be helped real The rapid abutting joint of existing business.
Using technical solution provided by the invention, the flat of user's existing business mode and cloud service backstage can be fast implemented Sliding docking, to realize business migration.For a user, no matter what its customized url access rule is, user is not required to It to change to its customized url, initiate access according to its customized url access rule, the present invention passes through Mapping processing is carried out to url rule, so that the url access request after mapping meets the rule of cloud service platform, reduces user Use the transit time and cost of cloud service platform.
Url mapping method is handled based on a kind of picture that above embodiments provide, the embodiment of the invention also provides one kind Picture handles url mapping device, is described in detail its working principle with reference to the accompanying drawing.
Installation practice
Referring to fig. 4, Fig. 4 is a kind of structure chart of picture processing url mapping device provided by the invention, as shown in figure 4, should Device may include with lower unit:
Request reception unit 201, for receiving url access request;The url access request includes: picture to be downloaded The space identification in space locating for source resource name and picture to be downloaded;
Acquiring unit 202, for obtaining the space identification from the url access request;The space refers to that cloud takes The container for storage file object that business platform defines;The space identification is used for unique identification space;
Searching unit 203, it is corresponding with the space correlation for being searched from configuration file according to the space identification Relationship;The configuration file is used to record space and maps the corresponding relationship between script file, and, map script file Position;
Map unit 204, for when searching with the corresponding relationship of the space correlation, according to corresponding with the space The position of mapping script file loads and executes the url access request after mapping script file is mapped;The mapping script File is the script file for the url access request to be mapped to the specified url format of the cloud service platform.
Optionally, described device further include:
Loading unit is updated, the configuration text for periodically having loaded in judgement system according to the preset time cycle Whether part, which needs, is updated, if it is, reloading configuration file.
Optionally, the update loading unit judges whether the configuration file needs by more especially by following manner It is new:
Judge the configuration file stored in database the final updating time whether with the configuration file that has been loaded in system Final updating time consistency, if it is not, then show the configuration file loaded in system needs be updated.
Optionally, the mapping script file is the script file based on Groovy.
Optionally, described device further include:
First cloud processing unit, for carrying out model validation to the url access request after the mapping, after being verified, It is handled according to the source resource that the cloud processing operation carried in the url access request after the mapping treats download pictures, and Return to processing result.
Optionally, the url access request can also include: resource processing rule;The resource processing rule is to be used for The source resource that download pictures are treated in description makees the rule of specific operation processing;The resource processing rule includes specific operation type And operating parameter.
Optionally, the specific operation type include: scaling, rotation, watermark or cutting a kind of operation or a variety of behaviour Make composite type.
Optionally, described device can also include:
Second cloud processing unit, for carrying out model validation to the url access request after the mapping, after being verified, According to the url access request after the mapping, it is specific that the regular source resource progress for treating download pictures is handled according to the resource Operation processing, and return to processing result.
Technical solution provided by the invention is visited in the specified url of the existing url access rule of user and cloud service platform It asks and joined url mapping mechanism between rule, which relies primarily on configuration file and mapping script file is real It is existing, adaptability mapping pointedly can be carried out automatically to Client-initiated url access request, to be suitble to wanting for cloud service platform It asks, the issuable omission of manual amendment's mode in the prior art can be effectively prevent, this just greatly simplifies business and moves It moves, user can be helped to realize the rapid abutting joint of business.
It should be noted that those of ordinary skill in the art will appreciate that realizing the whole in above method embodiment or portion Split flow is relevant hardware can be instructed to complete by computer program, and the program can be stored in a computer In read/write memory medium, the program is when being executed, it may include such as the process of above-mentioned each method embodiment.Wherein, the storage Medium can be magnetic disk, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method Part explanation.The apparatus embodiments described above are merely exemplary, wherein described be used as separate part description Unit and module may or may not be physically separated.Furthermore it is also possible to select it according to the actual needs In some or all of unit and module achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying In the case where creative work, it can understand and implement.
The above is only a specific embodiment of the invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (16)

1. a kind of picture handles url mapping method, which is characterized in that be applied to cloud service platform, which comprises
Receive url access request;The url access request includes: locating for the source resource name and picture to be downloaded of picture to be downloaded The space identification in space;
The space identification is obtained from the url access request;The space refer to that cloud service platform defines for storing The container of file object;The space identification is used for unique identification space;
It is searched from configuration file according to the space identification and the corresponding relationship of the space correlation;The configuration file is used for It records space and maps the corresponding relationship between script file, and, map the position of script file;
When searching the corresponding relationship with the space correlation, added according to the position of mapping script file corresponding with the space It carries and executes the url access request after mapping script file is mapped;The mapping script file is for visiting the url Ask that request is mapped to the script file of the specified url format of the cloud service platform.
2. the method according to claim 1, wherein
According to the preset time cycle, periodically judge whether the configuration file loaded in system needs to be updated, if It is then to reload configuration file.
3. according to the method described in claim 2, it is characterized in that, being judged by the following manner whether the configuration file needs It is updated:
Judge the configuration file stored in database the final updating time whether with the configuration file that has been loaded in system most Renewal time is consistent afterwards, if it is not, then showing that the configuration file loaded in system needs are updated.
4. the method according to claim 1, wherein
The mapping script file is the script file based on Groovy.
5. the method according to claim 1, wherein the method also includes:
Model validation is carried out to the url access request after the mapping, after being verified, is accessed according to the url after the mapping The source resource that download pictures are treated in request is handled, and returns to processing result.
6. the method according to claim 1, wherein
The url access request further include: resource processing rule;The resource processing rule is for describing to treat download pictures Source resource make specific operation processing rule;The resource processing rule includes specific operation type and operating parameter.
7. according to the method described in claim 6, it is characterized in that, the specific operation type includes: scaling, rotation, watermark Or a kind of operation or a variety of operative combination types cut.
8. according to the method described in claim 6, it is characterized in that, the method also includes:
Model validation is carried out to the url access request after the mapping, after being verified, is accessed according to the url after the mapping Request handles rule according to the resource and treats the source resource progress specific operation processing of download pictures, and returns to processing result.
9. a kind of picture handles url mapping device, which is characterized in that be applied to cloud service platform, described device includes:
Request reception unit, for receiving url access request;The url access request includes: the source resource name of picture to be downloaded With the space identification in space locating for picture to be downloaded;
Acquiring unit, for obtaining the space identification from the url access request;The space refers to that cloud service platform is fixed The container for storage file object of justice;The space identification is used for unique identification space;
Searching unit, for being searched from configuration file according to the space identification and the corresponding relationship of the space correlation;Institute Configuration file is stated to be used to record space and map the corresponding relationship between script file, and, map the position of script file;
Map unit, for when searching with the corresponding relationship of the space correlation, according to mapping foot corresponding with the space The position of this document loads and executes the url access request after mapping script file is mapped;The mapping script file is For the url access request to be mapped to the script file of the specified url format of the cloud service platform.
10. device according to claim 9, which is characterized in that described device further include:
Loading unit is updated, for according to the preset time cycle, the configuration file periodically loaded in judgement system to be No needs are updated, if it is, reloading configuration file.
11. device according to claim 10, which is characterized in that the update loading unit, especially by following manner Judge whether the configuration file needs to be updated:
Judge the configuration file stored in database the final updating time whether with the configuration file that has been loaded in system most Renewal time is consistent afterwards, if it is not, then showing that the configuration file loaded in system needs are updated.
12. device according to claim 9, which is characterized in that
The mapping script file is the script file based on Groovy.
13. device according to claim 9, which is characterized in that described device further include:
First cloud processing unit, for carrying out model validation to the url access request after the mapping, after being verified, according to The source resource that url access request after the mapping treats download pictures is handled, and returns to processing result.
14. device according to claim 9, which is characterized in that
The url access request further include: resource processing rule;The resource processing rule is for describing to treat download pictures Source resource make specific operation processing rule;The resource processing rule includes specific operation type and operating parameter.
15. device according to claim 14, which is characterized in that the specific operation type includes: scaling, rotation, water Print or a kind of operation or a variety of operative combination types cut.
16. device according to claim 14, which is characterized in that described device further include:
Second cloud processing unit, for carrying out model validation to the url access request after the mapping, after being verified, according to Url access request after the mapping handles the source resource progress specific operation that rule treats download pictures according to the resource Processing, and return to processing result.
CN201610161488.5A 2016-03-21 2016-03-21 A kind of image processing url mapping method and device Active CN105843881B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610161488.5A CN105843881B (en) 2016-03-21 2016-03-21 A kind of image processing url mapping method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610161488.5A CN105843881B (en) 2016-03-21 2016-03-21 A kind of image processing url mapping method and device

Publications (2)

Publication Number Publication Date
CN105843881A CN105843881A (en) 2016-08-10
CN105843881B true CN105843881B (en) 2019-04-26

Family

ID=56587541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610161488.5A Active CN105843881B (en) 2016-03-21 2016-03-21 A kind of image processing url mapping method and device

Country Status (1)

Country Link
CN (1) CN105843881B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009439B (en) * 2016-11-28 2021-06-08 北京车和家信息技术有限责任公司 Resource request method, device and system
CN111382379B (en) * 2018-12-27 2022-12-13 福建天晴数码有限公司 Method and terminal for importing configuration data with pictures
CN114372217A (en) * 2021-12-29 2022-04-19 广州太平洋电脑信息咨询有限公司 Image real-time processing method, system and medium based on hybrid cloud

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102934104A (en) * 2010-06-08 2013-02-13 微软公司 Web site implementation by mapping expression evaluation
CN103390012A (en) * 2012-09-13 2013-11-13 爱乐活(北京)科技有限公司 Display picture generating method and device based on access
CN104794117A (en) * 2014-01-16 2015-07-22 腾讯科技(深圳)有限公司 Picture data migration method and device
CN104793946A (en) * 2015-04-27 2015-07-22 广州杰赛科技股份有限公司 Application deployment method and system based on cloud computing platform
CN104965877A (en) * 2015-06-12 2015-10-07 郑州悉知信息技术有限公司 Webpage picture acquisition method, picture cache server, coordination server and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102934104A (en) * 2010-06-08 2013-02-13 微软公司 Web site implementation by mapping expression evaluation
CN103390012A (en) * 2012-09-13 2013-11-13 爱乐活(北京)科技有限公司 Display picture generating method and device based on access
CN104794117A (en) * 2014-01-16 2015-07-22 腾讯科技(深圳)有限公司 Picture data migration method and device
CN104793946A (en) * 2015-04-27 2015-07-22 广州杰赛科技股份有限公司 Application deployment method and system based on cloud computing platform
CN104965877A (en) * 2015-06-12 2015-10-07 郑州悉知信息技术有限公司 Webpage picture acquisition method, picture cache server, coordination server and system

Also Published As

Publication number Publication date
CN105843881A (en) 2016-08-10

Similar Documents

Publication Publication Date Title
US11979452B1 (en) Demo recording utility
CN104793946B (en) Dispositions method and system are applied based on cloud computing platform
CN108984170B (en) H5 page multi-language rendering method and device
US10694353B2 (en) Updating web resources
US11741046B2 (en) Method and apparatus for creating system disk snapshot of virtual machine
US9026733B1 (en) Content-based caching using a content identifier at a point in time
US8438251B2 (en) Methods and systems for implementing a virtual storage network
CN100411341C (en) Parallel downloading method and terminal
CN103227812B (en) Smart machine is supported method for down loading and the device of breakpoint transmission
US20070261049A1 (en) Techniques to perform gradual upgrades
CN105493045A (en) Virtual computing instance migration
CN103984582A (en) Method and device for hot updating
JP2002196945A (en) Upgrading system and method of device driver
JP2003114806A (en) OS update method, security control method, and device for implementing the method
WO2020199543A1 (en) Method and apparatus applicable to release and upgrade of hybrid application, and intelligent device
CN105843881B (en) A kind of image processing url mapping method and device
CN111049889B (en) Static resource uploading method and device, integrated server and system
CN107608663A (en) A kind of development approach and device of Mobile solution plug-in unit and Mobile solution
CN111984280A (en) Container compatibility and upgrading method, device, equipment and storage medium
CN107295075B (en) A State Migration Method for Cross-Terminal Applications Based on Session Persistence
CN113268232B (en) Page skin generation method and device and computer readable storage medium
US10291743B2 (en) Configuring service endpoints in native client applications
US7668905B2 (en) Method, system and computer program for providing web pages based on client state
CN113791809B (en) Application exception handling method and device and computer readable storage medium
CN105302586A (en) Software upgrade processing method and device, terminal and server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant