CN108241495A - The method and device of the URL of the resource file of document storage system update down-stream system - Google Patents

The method and device of the URL of the resource file of document storage system update down-stream system Download PDF

Info

Publication number
CN108241495A
CN108241495A CN201611209136.9A CN201611209136A CN108241495A CN 108241495 A CN108241495 A CN 108241495A CN 201611209136 A CN201611209136 A CN 201611209136A CN 108241495 A CN108241495 A CN 108241495A
Authority
CN
China
Prior art keywords
url
resource file
stream system
token
stream
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201611209136.9A
Other languages
Chinese (zh)
Other versions
CN108241495B (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 Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke 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 Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201611209136.9A priority Critical patent/CN108241495B/en
Publication of CN108241495A publication Critical patent/CN108241495A/en
Application granted granted Critical
Publication of CN108241495B publication Critical patent/CN108241495B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention provides a kind of method and device of the URL of the resource file of document storage system update down-stream system, the down-stream system is registered in initialization to the registration center of this document storage system, registration content includes the mark and token of the down-stream system, and this method includes:Request of the down-stream system to resource file is received, which includes the URL of the resource file;Judge whether the URL is the current URL for calling the resource file, if so, returning to the resource file to the down-stream system;If the URL is not the current URL for calling the resource file, the token of the down-stream system is then obtained from the registration center, if obtain the token, the URL query interfaces of this document storage system are then called using the token, and the current URL is determined according to scheduled transformational relation, the URL which records is updated to the current URL.The present invention can effectively increase hit rate of the down-stream system to document storage system resource transfer on the basis of ensureing to carry out data cleansing to down-stream system.

Description

The method and device of the URL of the resource file of document storage system update down-stream system
Technical field
The present invention relates to computer network and computer software fields, and in particular to a kind of document storage system updates downstream The method and device of the URL of the resource file of system.
Background technology
With the development of Large-Scale Interconnected rack construction system, document storage system receives everybody favor.In project development In, unified rely on of work usually is downloaded into the upload of file and arrives common document storage system, and down-stream system only need to be in local Store the URL addresses of target resource file.Although this mode reduces exploitation of the developer to file storage operations, And development efficiency is improved, but the degree of coupling between having aggravated system may that is, when document storage system changes Its down-stream system of partial dependency is influenced whether, the problems such as so as to cause data inconsistent.
In view of the above-mentioned problems, two kinds of technical solutions exist in the prior art:
1st, based on manual type
When the URL addresses of resource file in document storage system change, manual notifications' down-stream system carries out data Cleaning.
2nd, the mode based on distribution subscription
Down-stream system is registered first to document storage system, is sent out when there is the file resource URL in document storage system When changing more, the URL used in registered all down-stream systems is automatically updated.This mode improves the timely of data update Property.
However, the above-mentioned prior art still has following technical problem:
1st, due to manual type inefficiency, it is understood that there may be the situation of omission causes dirty data.
2nd, the mode based on distribution subscription, when being changed there are one URL, while to all registered down-stream systems Send update request, still, high concurrent can be caused as URL or excessive down-stream system, so as to aggravate document storage system and The burden of down-stream system.
3rd, cleaning data that can not be selective are (even if some dirty datas that will not be used, which are not updated, there will not be shadow Ring), cause unnecessary expense.
Invention content
In view of this, the purpose of the present invention is to provide a kind of resource files of document storage system update down-stream system The method and device of URL, to solve the above-mentioned problems in the prior art.
Technical program of the present invention lies in provide a kind of URL's of the resource file of document storage system update down-stream system Method, wherein, the down-stream system is registered in initialization to the registration center of the document storage system, and registration content includes The mark and token of the down-stream system, the method includes:
Receive request of the down-stream system to resource file, the URL for asking to include the resource file;
Judge whether the URL is the current URL for calling the resource file, if so, being returned to the down-stream system The resource file;
If the URL is not the current URL for calling the resource file, the downstream is obtained from the registration center If obtaining the token, the URL query interfaces of the document storage system are called using the token for the token of system, and And the current URL is determined according to scheduled transformational relation, the URL that the down-stream system records is updated to described current URL。
Optionally, the registration content is stored in registration table, and the mark of the down-stream system includes the down-stream system Domain name, the token of the down-stream system is the character string that is obtained after the mark encryption.
Optionally, determine that the current URL includes determining according to the default mapping relations according to scheduled transformational relation The corresponding current URL of URL received.
Optionally, determine that the current URL includes the new and old URL according to the resource file according to scheduled transformational relation Mapping table determine the current URL of the resource file.
Optionally, the current URL for determining the resource file according to the mapping table is further included:Utilize load balancing Device simultaneously searches the mapping table with reference to fragment query strategy and balancing performance strategy, to determine the resource text The current URL of part.
The device of the URL of the calling resource file of down-stream system is updated the present invention also provides a kind of document storage system, In, the down-stream system initialization when to the document storage system registration center register, registration content include it is described under The mark and token of trip system, described device include:
Request receiving module, for receiving request of the down-stream system to resource file, the request includes the money The URL of source file;
Address judgment module, for judging whether the URL is the current URL that calls the resource file, if so, to The down-stream system returns to the resource file;
Address update module, if not being the current URL for calling the resource file for the URL, from the note Volume center obtains the token of the down-stream system, if obtaining the token, the file storage system is called using the token The URL query interfaces of system, and the current URL is determined according to scheduled transformational relation, the institute that the down-stream system is recorded It states URL and is updated to the current URL.
Optionally, the registration content is stored in registration table, and the mark of the down-stream system includes the down-stream system Domain name, the token of the down-stream system is the character string that is obtained after the mark encryption.
Optionally, described address update module is additionally operable to:Determine that received URL is corresponded to according to the default mapping relations Current URL.
Optionally, described address update module is additionally operable to:It is true according to the mapping table of the new and old URL of the resource file The current URL of the fixed resource file.
Optionally, described address update module is additionally operable to:Using load equalizer and combine fragment query strategy and property Energy balance policy searches the mapping table, to determine the current URL of the resource file.
The method and device of the URL of the resource file of down-stream system is updated by document storage system provided by the invention, It can effectively increase down-stream system on the basis of ensureing to carry out data cleansing to the dirty data in down-stream system and file deposited The hit rate of storage system resource transfer.Meanwhile the present invention effectively reduces the newer instantaneities of URL, avoid to URL update and The high concurrent problem of generation.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present invention, for For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings Attached drawing.In the accompanying drawings:
Fig. 1 is the side for the URL that the document storage system of one embodiment of the invention updates the calling resource file of down-stream system The flow diagram of method;
Fig. 2 is the dress for the URL that the document storage system of one embodiment of the invention updates the calling resource file of down-stream system The structure diagram put.
Specific embodiment
Purpose, technical scheme and advantage to make the embodiment of the present invention are more clearly understood, below in conjunction with the accompanying drawings to this hair Bright embodiment is described in further details.Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but simultaneously It is not as a limitation of the invention.
Art technology technical staff knows, embodiments of the present invention can be implemented as a kind of system, device, equipment, Method or computer program product.Therefore, the present invention can be with specific implementation is as follows, i.e.,:It is complete hardware, complete soft The form that part (including firmware, resident software, microcode etc.) or hardware and software combine.
Herein, it is to be understood that in involved term:
Down-stream system:The interface of system call file storage system, resource file is uploaded, this and document storage system System there are dependence is down-stream system.
Data cleansing:When master data is changed, there are still the place for using legacy data, this legacy datas to be known as system Dirty data, the process that dirty data is updated to valid data are known as data cleansing.
Illustrative methods
Below with reference to Fig. 1 to the calling resource of the document storage system update down-stream system of exemplary embodiment of the invention The method of the URL of file is introduced.
As shown in Figure 1, the document storage system for an embodiment of the present invention updates the calling resource file of down-stream system URL method flow chart, this method can include:
Step S101:Request of the down-stream system to resource file is received, the request includes the resource file URL;
Step S102:Judge whether the URL is the current URL for calling the resource file, if so, to the downstream System returns to the resource file;
Step S103:If the URL is not the current URL for calling the resource file, obtained from the registration center The token of the down-stream system is taken, if obtaining the token, the URL for calling the document storage system using the token is looked into Interface is ask, and the current URL is determined according to scheduled transformational relation, the URL that the down-stream system is recorded updates For the current URL.
Optionally, the registration content is stored in registration table, and the mark of the down-stream system includes the down-stream system Domain name, the token of the down-stream system is the character string that is obtained after the mark encryption.
Optionally, determine that the current URL includes determining according to the default mapping relations according to scheduled transformational relation The corresponding current URL of URL received.
Optionally, determine that the current URL includes the new and old URL according to the resource file according to scheduled transformational relation Mapping table determine the current URL of the resource file.
Optionally, the current URL for determining the resource file according to the mapping table is further included:Utilize load balancing Device simultaneously searches the mapping table with reference to fragment query strategy and balancing performance strategy, to determine the resource text The current URL of part.
Embodiment
The present invention is specifically described with reference to a specific embodiment, however, it should be noted that the specific implementation Example merely to preferably description the present invention, do not constitute improper limitations of the present invention.
First, down-stream system needs to be registered in the registration center of document storage system upstream in initialization. The token that registration content includes the mark of the down-stream system and stored in the down-stream system.This document storage system can be The down-stream system opens the query interface of the URL of the resource file in a change down-stream system, and this document storage system only has The down-stream system for holding this token is allowed to go that the interface of this document storage system is called to inquire the money in the down-stream system The URL of source file corresponds to the resource file URL in this document storage system, and design here mainly considers a safety problem, Prevent the safety problem caused by document storage system carries out malice calling.
In an embodiment of the present invention, registration content is stored in registration table, and the mark of the down-stream system includes being somebody's turn to do The domain name of down-stream system, the token of the down-stream system are the character string obtained after the mark is encrypted.
When the down-stream system is needed using any resource file, need to be stored in this document using local URL request The corresponding resource file of storage system.This document storage system can receive request of the down-stream system to the resource file, wherein The request includes the URL of the resource file.Then, judge whether the URL is the current URL for calling the resource file, if so, The resource file is returned to the down-stream system.In addition, in an embodiment of the present invention, which can also be judged according to the URL Whether file has new version, if there is the resource file of new version, then the resource file of new version is back to the downstream System.
If however, the URL is not the current URL for calling the resource file, which obtains from the registration center The token of the down-stream system is taken, after the token is obtained, the URL query interfaces of document storage system are called using the token, And the current URL is determined according to scheduled transformational relation.
In an embodiment of the present invention, determine that the current URL is included according to the default mapping according to scheduled transformational relation Relationship determines the corresponding current URL of received URL.
Specifically, if there are corresponding mapping relations by the new and old URL of the resource file, then can be reflected according to this The relationship of penetrating determines the current URL of the resource file.
For example, resource file (for example, picture file) is stored in server A originally, and the IP address of server A For A ', then the resource file is A/abc.jpg in the URL of the down-stream system.
If current server A breaks down, need whole resource files in server A being transferred in server B, In, the IP address of server B is B ', then needs the old URL of the down-stream system being updated to B '/abc.jpg with regard to that can call this The resource file in document storage system.
In other words, for all old URL, all there are this rules that A ' is converted into B ', then only need to establish this and reflect A ' the partial replacements of old URL can be B ' by the relationship of penetrating.
In addition, presetting mapping relations for this, also there are a kind of following situations, that is, true according to scheduled transformational relation The fixed current URL includes the current URL that the resource file is determined according to the mapping table of the new and old URL of the resource file.
In an embodiment of the present invention, in order to improve the search efficiency to mapping table, the present invention is also equal using load Weighing apparatus simultaneously searches the mapping table with reference to fragment query strategy and balancing performance strategy, to determine the resource text The current URL of part.
Specifically, fragment is carried out to the mapping table first, it is different then to search service correspondence by different URL Fragment is searched.Since the fragment to the mapping table is non-uniform, and it is to perform parallel that each URL, which searches service, , therefore the load equalizer takes balancing performance strategy, not only each current performance for searching service of record, and can will be big Fragment distributes to the good service of current performance, and small fragment is distributed to the poor service of current performance.When finding new URL When, other service stoppings is notified to search, and return to this new URL.
Finally, which can be updated to current URL according to the determining current URL by the URL locally preserved, and And the down-stream system can just get corresponding resource file using new URL request document storage system.
Fig. 2 is the dress for the URL that the document storage system of one embodiment of the invention updates the calling resource file of down-stream system The structure diagram put, wherein, the down-stream system is registered in initialization to the registration center of the document storage system, note Volume content includes the mark and token of the down-stream system, and described device includes:
Request receiving module 21, for receiving request of the down-stream system to resource file, the request includes described The URL of resource file;
Address judgment module 22, for judging whether the URL is the current URL that calls the resource file, if so, The resource file is returned to the down-stream system;
Address update module 23, if for the URL not being the current URL for calling the resource file, from described Registration center obtains the token of the down-stream system, if obtaining the token, the file is called to store using the token The URL query interfaces of system, and the current URL is determined according to scheduled transformational relation, the down-stream system is recorded The URL is updated to the current URL.
Optionally, the registration content is stored in registration table, and the mark of the down-stream system includes the down-stream system Domain name, the token of the down-stream system is the character string that is obtained after the mark encryption.
Optionally, described address update module 23 is additionally operable to:Received URL pairs is determined according to the default mapping relations The current URL answered.
Optionally, described address update module 23 is additionally operable to:According to the mapping table of the new and old URL of the resource file Determine the current URL of the resource file.
Optionally, described address update module 23 is additionally operable to:Using load equalizer and combine fragment query strategy and Balancing performance strategy searches the mapping table, to determine the current URL of the resource file.
Due to document storage system provided by the invention update down-stream system calling resource file URL device be on The corresponding device of method is stated, therefore details are not described herein.
The method and device of the URL of the resource file of down-stream system is updated by document storage system provided by the invention, It can effectively increase down-stream system on the basis of ensureing to carry out data cleansing to the dirty data in down-stream system and file deposited The hit rate of storage system resource transfer.Meanwhile the present invention effectively reduces the newer instantaneities of URL, avoid to URL update and The high concurrent problem of generation.
In addition, although the operation of the method for the present invention is described with particular order in the accompanying drawings, this do not require that or Imply that the operation having to carry out shown in whole could realize desired result.Additionally or alternatively, it is convenient to omit certain steps, Multiple steps are merged into a step execution and/or a step is decomposed into execution of multiple steps.
Particular embodiments described above has carried out the purpose of the present invention, technical solution and advantageous effect further in detail Describe in detail it is bright, it should be understood that the above is only a specific embodiment of the present invention, the guarantor being not intended to limit the present invention Range is protected, all within the spirits and principles of the present invention, any modification, equivalent substitution, improvement and etc. done should be included in this Within the protection domain of invention.

Claims (10)

1. a kind of method of the URL of the resource file of document storage system update down-stream system, wherein, the down-stream system is first It is registered during beginningization to the registration center of the document storage system, registration content includes the mark and token of the down-stream system, It is characterized in that, the method includes:
Receive request of the down-stream system to resource file, the URL for asking to include the resource file;
Judge whether the URL is the current URL for calling the resource file, if so, to described in down-stream system return Resource file;
If the URL is not the current URL for calling the resource file, the down-stream system is obtained from the registration center Token, if obtaining the token, the URL query interfaces of the document storage system, and root are called using the token The current URL is determined according to scheduled transformational relation, and the URL that the down-stream system records is updated to the current URL.
2. according to the method described in claim 1, it is characterized in that, the registration content is stored in registration table, the downstream The mark of system includes the domain name of the down-stream system, and the token of the down-stream system identifies the character obtained after encryption to be described String.
3. according to the method described in claim 1, it is characterized in that, the current URL packets are determined according to scheduled transformational relation It includes and determines the corresponding current URL of received URL according to the default mapping relations.
4. according to the method described in claim 1, it is characterized in that, the current URL packets are determined according to scheduled transformational relation Include the current URL that the resource file is determined according to the mapping table of the new and old URL of the resource file.
5. according to the method described in claim 4, it is characterized in that, the resource file is determined according to the mapping table Current URL is further included:
The mapping table is searched using load equalizer and with reference to fragment query strategy and balancing performance strategy, To determine the current URL of the resource file.
6. a kind of device of the URL of the resource file of document storage system update down-stream system, wherein, the down-stream system is first It is registered during beginningization to the registration center of the document storage system, registration content includes the mark and token of the down-stream system, It is characterized in that, described device includes:
Request receiving module, for receiving request of the down-stream system to resource file, the request includes the resource text The URL of part;
Address judgment module, for judging whether the URL is the current URL that calls the resource file, if so, to described Down-stream system returns to the resource file;
Address update module, if not being the current URL for calling the resource file for the URL, from the registration The heart obtains the token of the down-stream system, if obtaining the token, the document storage system is called using the token URL query interfaces, and the current URL is determined according to scheduled transformational relation, the URL that the down-stream system is recorded It is updated to the current URL.
7. device according to claim 6, which is characterized in that the registration content is stored in registration table, the downstream The mark of system includes the domain name of the down-stream system, and the token of the down-stream system identifies the character obtained after encryption to be described String.
8. device according to claim 6, which is characterized in that described address update module is additionally operable to:
The corresponding current URL of received URL are determined according to the default mapping relations.
9. device according to claim 6, which is characterized in that described address update module is additionally operable to:
The current URL of the resource file is determined according to the mapping table of the new and old URL of the resource file.
10. device according to claim 9, which is characterized in that described address update module is additionally operable to:
The mapping table is searched using load equalizer and with reference to fragment query strategy and balancing performance strategy, To determine the current URL of the resource file.
CN201611209136.9A 2016-12-23 2016-12-23 Method and device for updating URL of resource file of downstream system by file storage system Active CN108241495B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611209136.9A CN108241495B (en) 2016-12-23 2016-12-23 Method and device for updating URL of resource file of downstream system by file storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611209136.9A CN108241495B (en) 2016-12-23 2016-12-23 Method and device for updating URL of resource file of downstream system by file storage system

Publications (2)

Publication Number Publication Date
CN108241495A true CN108241495A (en) 2018-07-03
CN108241495B CN108241495B (en) 2021-05-25

Family

ID=62704348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611209136.9A Active CN108241495B (en) 2016-12-23 2016-12-23 Method and device for updating URL of resource file of downstream system by file storage system

Country Status (1)

Country Link
CN (1) CN108241495B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139279A (en) * 2011-12-05 2013-06-05 阿里巴巴集团控股有限公司 File access method and system
US20140085650A1 (en) * 2012-09-25 2014-03-27 Xerox Corporation Methods, systems and processor-readable media for automatically detecting device movement in a managed service environment
CN103810265A (en) * 2014-01-27 2014-05-21 南京邮电大学 Database optimization method based on WiMAX local routing
CN103853942A (en) * 2012-12-04 2014-06-11 中山大学深圳研究院 Domain-based application program function
CN106060129A (en) * 2016-05-25 2016-10-26 北京小米移动软件有限公司 Information processing method and device.

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139279A (en) * 2011-12-05 2013-06-05 阿里巴巴集团控股有限公司 File access method and system
US20140085650A1 (en) * 2012-09-25 2014-03-27 Xerox Corporation Methods, systems and processor-readable media for automatically detecting device movement in a managed service environment
CN103853942A (en) * 2012-12-04 2014-06-11 中山大学深圳研究院 Domain-based application program function
CN103810265A (en) * 2014-01-27 2014-05-21 南京邮电大学 Database optimization method based on WiMAX local routing
CN106060129A (en) * 2016-05-25 2016-10-26 北京小米移动软件有限公司 Information processing method and device.

Also Published As

Publication number Publication date
CN108241495B (en) 2021-05-25

Similar Documents

Publication Publication Date Title
US10715485B2 (en) Managing dynamic IP address assignments
US8271468B1 (en) Cross-region data access in partitioned framework
US10235384B2 (en) Servicing database operations using a messaging server
US20140122572A1 (en) Enterprise service bus routing system
WO2015131741A1 (en) Service policy control method and system
CN102739720A (en) Distributed cache server system and application method thereof, cache clients and cache server terminals
US9830333B1 (en) Deterministic data replication with conflict resolution
US8150870B1 (en) Scalable partitioning in a multilayered data service framework
CN101924785A (en) Data uploading and downloading methods and system
CN103095758B (en) A kind of method processing file data in distributed file system and this system
CN104346345B (en) The storage method and device of data
CN105843867A (en) Metadata model-based search method and search device based on metadata model
CN108173952A (en) A kind of data access method and device of content distributing network CDN
CN106528844A (en) Data request method and apparatus, and data storage system
CN109525678A (en) Block chain network system and corresponding node device find method
CN109343983A (en) Information interacting method, device, equipment and storage medium between functional module
WO2022021853A1 (en) Iscsi multipath management system and method, device, and storage medium
US8316045B1 (en) Database linking system
WO2021017907A1 (en) Method and device for optimized inter-microservice communication
CN108241495A (en) The method and device of the URL of the resource file of document storage system update down-stream system
JP5353682B2 (en) Configuration information management apparatus, distributed information management system, distributed information management method, and distributed information management program
CN114650221A (en) Method and system for quickly calling service interface
CN107145606A (en) A kind of data managing method and device
JP2005141644A (en) Information processing apparatus for managing data storage, data management method, program, and recording medium
JP5324276B2 (en) Information acquisition system, connection destination information acquisition server, and program

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
GR01 Patent grant
GR01 Patent grant