CN116389254A - Resource version control method, popup confirmation method, device, equipment and medium - Google Patents

Resource version control method, popup confirmation method, device, equipment and medium Download PDF

Info

Publication number
CN116389254A
CN116389254A CN202310652302.6A CN202310652302A CN116389254A CN 116389254 A CN116389254 A CN 116389254A CN 202310652302 A CN202310652302 A CN 202310652302A CN 116389254 A CN116389254 A CN 116389254A
Authority
CN
China
Prior art keywords
resource
resource file
updated
unique identifier
access link
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
CN202310652302.6A
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.)
Tianjin Jincheng Bank Ltd By Share Ltd
Original Assignee
Tianjin Jincheng Bank Ltd By Share 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 Tianjin Jincheng Bank Ltd By Share Ltd filed Critical Tianjin Jincheng Bank Ltd By Share Ltd
Priority to CN202310652302.6A priority Critical patent/CN116389254A/en
Publication of CN116389254A publication Critical patent/CN116389254A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure relates to the field of resource version management technologies, and in particular, to a resource version control method, a popup window confirmation method, a device, and a medium, where the resource version control method includes: generating an access link for requesting the resource file; setting a unique identifier of a resource file in Http response data corresponding to the access link, and synchronously updating the unique identifier according to the updated resource file when the resource file is detected to be updated; when a user side sends an Http request to an access link, sending Http response data to the user side; the unique identifier in the Http response data is used for the user side to identify the version information of the resource file. Therefore, the method and the device can effectively solve the problems of low reliability, complex operation and server resource waste in resource file version management in the prior art, and further can effectively solve the problem of low reliability in resource upgrading popup window prompt in the prior art.

Description

Resource version control method, popup confirmation method, device, equipment and medium
Technical Field
The present disclosure relates to the field of resource version management technologies, and in particular, to a resource version control method, a popup window confirmation device, and a medium.
Background
In the existing resource version control method, a version configuration system and a resource server are arranged, when a resource file is updated, the resource file needs to be updated in the resource server, then a version number is updated in the version configuration system, and the version configuration system needs to provide external interface access capability to enable a user side to access the version number.
In the scheme, an independent background protocol version management system is required to configure the protocol version number, the interface access capability is provided, the server resource is wasted, and the reliability is low. The resource file uploading and the version number modification are two steps, and are required to be operated respectively, so that omission and forgetting to modify are easy to cause, and the version control reliability is low, so that the version number is not matched with an actual resource file, and the business logic is disordered.
In a word, the existing resource file version management has the problems of low reliability, complex operation and waste of server resources, and the resource upgrading popup window prompt method is realized by depending on the resource version.
Disclosure of Invention
In view of this, the embodiments of the present application provide a method, an apparatus, a device, and a medium for controlling a resource version, and a method, an apparatus, a device, and a medium for determining a popup window, which can effectively solve the problems of low reliability, complex operation, and waste of server resources in the management of resource file versions in the prior art, and further can effectively solve the problem of low reliability when resource upgrading popup window prompts in the prior art.
In a first aspect, an embodiment of the present application provides a method for controlling a resource version, including:
generating an access link for requesting the resource file;
setting a unique identifier of the resource file in Http response data corresponding to the access link, and synchronously updating the unique identifier according to the updated resource file when the resource file is detected to be updated;
when a user side sends an Http request to the access link, sending Http response data to the user side; the unique identifier in the Http response data is used for the user side to identify version information of the resource file.
In some embodiments, the Http response data comprises Http response header data; the setting the unique identification of the resource file in the Http response of the access link includes:
setting an etag field in the Http response header data;
and acquiring the hash value of the resource file, and storing the hash value into the etag field to serve as the unique identifier of the resource file.
In some embodiments, the step of synchronously updating the unique identifier according to the updated resource file includes:
after the resource file is updated, an updated hash value of the updated resource file is obtained, and the updated hash value is stored in the etag field so as to perform synchronous updating.
In a second aspect, an embodiment of the present application provides a method for confirming a resource upgrade popup window, which is applied to a user side, and the method includes:
sending an Http request to an access link corresponding to the resource file through an Http interface, and receiving returned Http response data; the Http response data is obtained by adopting the resource version control method provided by the first aspect of the application;
comparing the unique identifier in the Http response data with the locally stored historical unique identifier to determine whether the resource file is updated;
and if the resource file is updated, accessing the resource file according to the access link, displaying the resource file, and updating and storing the unique identifier.
In some embodiments, the client uses a HEAD interface function to send an Http request to the access link corresponding to the resource file.
In some embodiments, said accessing said resource file in accordance with said access link comprises: and the user side accesses the resource file according to the access link by adopting a GET method.
In a third aspect, an embodiment of the present application provides a resource upgrade popup confirmation system, including: a user terminal and a resource server; the resource server stores a resource file;
the resource server is used for generating an access link for requesting a resource file, setting a unique identifier of the resource file in Http response data corresponding to the access link, and synchronously updating the unique identifier according to the updated resource file when the resource file is detected to be updated;
the user side is used for sending an Http request to the access link corresponding to the resource file through an Http interface;
the resource server is used for returning Http response data according to the Http request;
the user side is used for receiving the Http response data and comparing the unique identifier in the Http response data with the locally stored historical unique identifier to judge whether the resource file is updated or not; if the resource file is updated, accessing the resource file according to the access link, displaying the resource file, and updating and storing the unique identifier.
In a fourth aspect, an embodiment of the present application provides a resource upgrade popup window confirmation device, including: the device comprises an interface module, a judging module, a resource file display module and a storage module;
the interface module is used for sending an Http request to an access link corresponding to the resource file through an Http interface and receiving returned Http response data; the Http response data is obtained by adopting the resource version control method provided by the first aspect of the application;
the judging module is used for comparing the unique identifier in the Http response data with the historical unique identifier stored in the storage module so as to judge whether the resource file is updated or not;
the resource file display module is used for accessing the resource file according to the access link and displaying the resource file when the resource file is updated;
and the storage module is used for synchronously updating and storing the unique identifier when the resource file is updated.
In a fifth aspect, an embodiment of the present application provides a terminal device, where the terminal device includes a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the computer program to implement a resource upgrade popup confirmation method provided in the second aspect of the present application.
In a sixth aspect, embodiments of the present application provide a readable storage medium storing a computer program, which when executed on a processor, implements a resource upgrade popup validation method provided in the second aspect of the present application.
The embodiment of the application has the following beneficial effects:
in the application, only the Http response data corresponding to the access link needs to be set in the resource server when the resource version is controlled, so that the Http response data contains the unique identifier of the resource file. And after the resource file is updated, synchronously updating the unique identifier according to the updated resource file. The operation is realized by automatically monitoring the resource server, manual operation is not needed to fill in the version, the realization method is simple, and the reliability is high. In addition, a version management system does not need to be arranged separately, so that the resources of a resource server are saved. Therefore, the problems of low reliability, complex operation and server resource waste existing in the resource file version management in the prior art can be effectively solved.
On the other hand, when the resource upgrading popup window is confirmed, the user side only needs to send a request to a resource server, then stores the unique identifier of the resource file, can judge whether the resource file is updated or not by comparing the unique identifier obtained by the two times before and after, and when the resource file is detected to be updated, pulls the resource file and displays the resource file so that the user side can confirm the updated resource file. Therefore, the method and the device can effectively solve the problem of low reliability and the like in the prior art when resource upgrading popup window prompt.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a system diagram of a prior art protocol upgrade popup prompt system;
FIG. 2 illustrates a flowchart of a resource version control method of an embodiment of the present application;
FIG. 3 illustrates a flowchart of a resource upgrade popup validation method of an embodiment of the present application;
FIG. 4 illustrates a system diagram of a resource upgrade popup validation system in an embodiment of the present application;
FIG. 5 is a schematic diagram of a resource version control device according to an embodiment of the present application;
fig. 6 shows a schematic structural diagram of a resource upgrade popup confirmation device in an embodiment of the present application.
Description of main reference numerals:
100-user side; 200-a resource server; a 300-version configuration system; a 101-interface module; 102-judging module; 103-a memory module; 104, a resource file display module; 201-a link generation module; 202-a configuration module; 203-updating the detection module; 204-access output module.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments.
The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
In the following, the terms "comprises", "comprising", "having" and their cognate terms may be used in various embodiments of the present application are intended only to refer to a particular feature, number, step, operation, element, component, or combination of the foregoing, and should not be interpreted as first excluding the existence of or increasing the likelihood of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing. Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of this application belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having a meaning that is identical to the meaning of the context in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in connection with the various embodiments.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The embodiments described below and features of the embodiments may be combined with each other without conflict.
Fig. 1 shows a system schematic diagram of a conventional resource upgrade popup prompt system, which includes a client 100, a resource server 200, and a version configuration system 300. The specific workflow of the system is described below by taking a protocol file as an example:
in the first step, the document is edited to generate a protocol file, such as agreement. Pdf. The protocol file is uploaded to the resource server 200, and the resource server 200 automatically generates a protocol access link, for example host, port/path/ag element.
Second, the protocol version number is modified within the protocol version configuration system 300, such as to: 1.0, and simultaneously providing a version access interface to the client 100, for example: host port/path/getAgreementversion for the client 100 to obtain the current protocol version number 1.0.
Thirdly, the client 100 pulls up a version number through a version access interface, judges whether the version number is consistent with the last protocol version number pulled up by the client 100, if the version number is inconsistent with the last protocol version number pulled up by the client 100, loads a protocol access link to the client 100 for browsing, and records version number 1.0 locally at the client 100; if the two version numbers are consistent, the current version protocol user is already seen, and a popup window is not needed to be displayed for confirming to the user.
Fourth, if the protocol file content is changed, that is, the agreement. Pdf file is modified, the modified protocol file is uploaded to the resource server 200, and an access link is also generated: host port/path/agreement. Pdf for subsequent access by the client 100.
Fifth, the version number is modified to 2.0 in the protocol version configuration system 300, and a version access interface is also provided to the client 100, so that the client 100 can obtain the version number 2.0 of the current protocol.
Sixth, the client 100 pulls version number 2.0 through the version access interface, and if it detects that the version number is inconsistent with the version number (1.0) stored locally, the popup loading protocol links to user browsing, and records version number 2.0 locally.
After the resource file is updated, the system needs to update the resource file in the resource server 200 and then update the version number in the version configuration system 300, which is complex in operation and low in reliability. The invention provides a resource version control method which is simple to operate, high in reliability, less in server resource occupation and high in overall performance.
The resource version control method is described below in connection with some specific embodiments.
FIG. 2 illustrates a flowchart of a resource version control method of an embodiment of the present application. Illustratively, the resource version control method includes the steps of:
s110, the resource server 200 generates an access link for requesting the resource file. Illustratively, editing a document generates the resource file, and then uploading the resource file to a resource entity resource. Zip, and then to the resource server 200, the resource server 200 automatically generates an access link for accessing the resource file, where the access link is used for accessing the subsequent client 100. Wherein the access link can be described as: host port/path/resource.
S120, setting the unique identification of the resource file in the Http response data corresponding to the access link, and synchronously updating the unique identification according to the updated resource file when the resource file is detected to be updated.
Specifically, first, in this step, the configuration of the resource server 200 needs to be modified to ensure that the access link of the resource file includes the unique identifier of the resource file in the Http response data returned when accessed. Preferably, the unique identifier is set by setting an etag field in header data of the Http response data, and the etag field value is adopted. I.e., the etag field is carried on the header band of the Http response data.
Where etag is an opaque identifier assigned by the Web server to a particular version of a resource found in the URL (access link). If the resource representation corresponding to the URL changes, a new etag value is reassigned. The etag values are similar to fingerprints and the two etag values can be used to quickly be compared to determine if the two representations of the resource are identical.
Secondly, the application determines the update of the resource file through the change of the hash value of the resource file. The hash value of the resource file is acquired first, and then the hash value is stored in the etag field to be used as the unique identifier of the resource file.
And finally, after the resource file is updated, acquiring an updated hash value of the updated resource file, and storing the updated hash value into the etag field to synchronously update. Specifically, when updating the resource file, a unique attribute etag field is set to the resource file in the server, the setting is set only once when updating, then the resource server 200 can monitor whether the resource file has an uploading action, trigger to calculate the hash value of the resource file after monitoring that the resource file is uploaded, and set to the etag field. For example, setting the hash value of the resource file to the etag field is accomplished using the setEtag () function. For the resource server 200, the action of uploading the resource file is completed in the system, and the update of the resource file is automatically detected, so that the update of the etag field value is automatically triggered.
S130, when the user terminal 100 sends an Http request to the access link, sending the Http response data to the user terminal 100; the unique identifier in the Http response data is used for the user terminal 100 to identify version information of the resource file. Illustratively, the unique identifier is an etag field value, and the hash value of the resource file is stored in the etag field, and the user terminal 100 may store the unique identifier, and once the resource file is updated, the hash value of the resource file may change, and whether the resource file is updated or not may be determined only by comparing the unique identifiers stored before and after.
The application is not limited with respect to the use of version information identifying the resource file. For example, the method can be used in the resource upgrade popup confirmation service of the ue 100, so the present application further provides a resource upgrade popup confirmation method.
The resource upgrade popup confirmation method is described below in connection with some specific embodiments.
Fig. 3 shows a flowchart of a resource upgrade popup confirmation method according to an embodiment of the present application. Illustratively, the resource upgrade popup confirmation method comprises the following steps:
s210, sending an Http request to an access link corresponding to the resource file through an Http interface, and receiving returned Http response data; the Http response data is obtained by adopting a resource version control method as in the embodiment.
After the client 100 starts the APP, the client 100 automatically sends an Http request to the resource server 200 to obtain Http response data.
Further, the Http response data includes Http response header data. The client 100 sends an Http request to the access link corresponding to the resource file by using the HEAD interface function, and the resource server 200 returns Http response header data.
Specifically, the client 100 sets, through the Http interface, an access method of Http to HEAD, for example, the access link of the resource file is:
host: port/Path/resource. Zip, head information band etag of http response, then the corresponding reference link is:
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/ETag。
the HEAD request only returns the header information of the Http and does not return specific file contents, so that the flow consumption can be reduced. For example, the reference links for HEAD are:
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Methods/HEAD。
illustratively, the header information of the http request response includes:
HTTP/1.1 200 OK;
Date: Fri, 30 Oct 1998 13:19:41 GMT;
Server: Apache/1.3.3 (Unix);
Cache-Control: max-age=3600, must-revalidate;
Expires: Fri, 30 Oct 1998 14:19:41 GMT;
Last-Modified: Mon, 29 Jun 1998 02:28:12 GMT;
ETag: "3e86-410-3596fbbc";
Content-Length: 1040;
Content-Type: text/html。
after each time of obtaining the information, the value corresponding to the ETag field is stored locally, namely the unique identifier is stored locally. Wherein the attribute value used locally for storing the unique identifier defaults to null.
S220, comparing the unique identifier in the Http response data with the locally stored historical unique identifier to judge whether the resource file is updated.
If the etag field value is inconsistent with the etag field value stored locally, the updating of the resource file is indicated; if the etag field value is consistent with the etag field value stored locally, the resource file is not updated.
And S230, if the resource file is updated, accessing the resource file according to the access link and displaying the resource file, and updating and storing the unique identifier.
If the resource file is updated, the user terminal 100 accesses and popup the resource file according to the access link by using a GET method. For example, the client 100 sets the method of Http to GET through Http interface, accesses the content of the resource file through access link, such as host: port/path/resource. The file content entity on the resource server 200 is not changed, and the etag field value returned by the http interface is consistent with the etag field value stored locally, which indicates that the current resource file user has seen, does not need to access again, and does not need to pop a window to prompt the user side 100 to review.
Exemplary, the method for confirming the resource upgrading popup window according to the present embodiment may be applied to a protocol file upgrading popup window confirmation service, as shown in fig. 4, and is described below by taking an application scenario of a protocol file as an example:
s310, the user terminal 100 starts an APP and enters a reference home page;
s320, the user terminal 100 sets an access method of Http as HEAD through an Http interface, and requests the resource file from the resource server 200 through an access link of the resource file. The resource server 200 returns Http response header data. The Http response header includes an etag field.
S330, judging the local etag field value (last time the protocol is updated, the etag field value stored after referring to the protocol file, or a null value set locally during initialization).
If the client 100 has already confirmed the version of the protocol content, the locally cached tag field value is consistent with the newly acquired tag field value, and the privacy popup protocol is not given to the client 100, so that the client 100 confirms.
If the user terminal 100 does not confirm the content of the protocol file in the current version, the etag field value of the local cache is inconsistent with the latest acquired etag field value, and a popup window displays the content of the privacy protocol file so that the user terminal 100 confirms, and after the user terminal 100 confirms, the etag field value of the protocol file is cached locally.
S340, if the content of the privacy protocol file is changed, uploading the new privacy protocol file to the resource server 200, wherein the file content entity on the resource server is changed, and the etag field value corresponding to the resource file is synchronously changed.
S350, when the steps S310 and S320 are repeatedly executed, since the etag field value of the local cache is inconsistent with the acquired etag field value, the popup window displays the content of the new version protocol file, so that the client 100 confirms, and the client 100 caches the latest etag field value after confirming.
The resource file may be a protocol file, or may be another resource file, which is not limited herein. The resource file is not limited to the content (such as zip, html, png) in the common file format, and the entity which is internally stored as data belongs to the resource file as long as the content can be uploaded to the resource server to generate a file access link.
The application further provides a resource upgrade popup confirmation system, as shown in fig. 4, including: a user terminal 100 and a resource server 200; the resource server 200 stores a resource file therein;
the resource server 200 is configured to generate an access link for requesting a resource file;
setting a unique identifier of the resource file in Http response data corresponding to the access link, and synchronously updating the unique identifier according to the updated resource file when the resource file is detected to be updated; the user terminal 100 is configured to send an Http request to the access link corresponding to the resource file through an Http interface;
the resource server 200 is configured to return Http response data according to the Http request;
the client 100 is configured to receive the Http response data, and compare a unique identifier in the Http response data with a locally stored historical unique identifier to determine whether the resource file is updated; if the resource file is updated, the user terminal 100 accesses the resource file according to the access link, and displays the resource file, and updates and stores the unique identifier.
In the present application, the Http response of the corresponding resource file in the resource server 200 is set to include the etag field, the system automatically monitors the update of the resource file, and synchronously updates the value of the etag field, so that an additional version system is not required to configure the version, the resource consumption of the server is reduced, the problem of forgetting to set the version is avoided, and the operation is simple and the reliability is high.
The user terminal 100 can determine the uniqueness of the content of the protocol file only according to the etag field value returned by the HEAD request, which is simple to implement and can ensure the reliability of popup confirmation after resource upgrade.
Fig. 5 shows a schematic structural diagram of a resource version control device according to an embodiment of the present application. Illustratively, the resource version control device comprises: a link generation module 201, a configuration module 202, an update detection module 203, and an access output module 204.
The link generation module 201 is configured to generate an access link for requesting a resource file.
The configuration module 202 is configured to set a unique identifier of the resource file in Http response data corresponding to the access link;
the update detection module 203 is configured to, when it is detected that the resource file is updated, synchronously update the unique identifier according to the updated resource file.
The access output module 204 is configured to send the Http response data to the client 100 when the client 100 sends an Http request to the access link; the unique identifier in the Http response data is used for the user terminal 100 to identify version information of the resource file.
Fig. 6 shows a schematic structural diagram of a resource upgrade popup window confirmation device according to an embodiment of the present application. Illustratively, the resource upgrade popup confirmation device comprises:
comprising the following steps: an interface module 101, a judging module 102, a storage module 103 and a resource file display module 104;
the interface module 101 is configured to send an Http request to an access link corresponding to the resource file through an Http interface, and receive returned Http response data; the Http response data is obtained by adopting a resource version control method as in the embodiment.
The judging module 102 is configured to compare the unique identifier in the Http response data with the historical unique identifier stored in the storage module 103, so as to judge whether the resource file is updated;
the interface module 101 is further configured to access the resource file according to the access link when the resource file is updated, so as to obtain the resource file;
the resource file display module 104 is configured to display the resource file obtained by the interface module 101;
the storage module 103 is configured to synchronously update and store the unique identifier when the resource file is updated.
It can be understood that the apparatus of this embodiment corresponds to the resource upgrade popup confirmation method of the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so the description is not repeated here.
The application also provides a terminal device, which exemplarily comprises a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program, so that the terminal device executes the functions of each module in the resource upgrading popup confirmation method or the resource upgrading popup confirmation device.
The processor may be an integrated circuit chip with signal processing capabilities. The processor may be a general purpose processor including at least one of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU) and a network processor (Network Processor, NP), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application.
The Memory may be, but is not limited to, random access Memory (Random Access Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-Only Memory, PROM), erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. The memory is used for storing a computer program, and the processor can correspondingly execute the computer program after receiving the execution instruction.
The present application also provides a readable storage medium for storing the computer program for use in the above terminal device.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, of the flow diagrams and block diagrams in the figures, which illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules or units in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application.

Claims (10)

1. A method for controlling a resource version, comprising:
generating an access link for requesting the resource file;
setting a unique identifier of the resource file in Http response data corresponding to the access link, and synchronously updating the unique identifier according to the updated resource file when the resource file is detected to be updated;
when a user side sends an Http request to the access link, sending Http response data to the user side; the unique identifier in the Http response data is used for the user side to identify version information of the resource file.
2. The resource version control method of claim 1, wherein the Http response data comprises Http response header data; the setting the unique identification of the resource file in the Http response of the access link includes:
setting an etag field in the Http response header data;
and acquiring the hash value of the resource file, and storing the hash value into the etag field to serve as the unique identifier of the resource file.
3. The resource version control method according to claim 2, wherein the synchronously updating the unique identifier according to the updated resource file includes:
after the resource file is updated, an updated hash value of the updated resource file is obtained, and the updated hash value is stored in the etag field so as to perform synchronous updating.
4. The resource upgrading popup confirmation method is characterized by being applied to a user side, and comprises the following steps:
sending an Http request to an access link corresponding to the resource file through an Http interface, and receiving returned Http response data; the Http response data is obtained by the resource version control method as claimed in any one of claims 1 to 3;
comparing the unique identifier in the Http response data with the locally stored historical unique identifier to determine whether the resource file is updated;
and if the resource file is updated, accessing the resource file according to the access link, displaying the resource file, and updating and storing the unique identifier.
5. The method for validating a resource upgrade popup window according to claim 4, wherein the user side uses a HEAD interface function to send an Http request to an access link corresponding to the resource file.
6. The resource upgrade popup confirmation method according to claim 5, wherein said accessing the resource file according to the access link comprises:
and the user side accesses the resource file according to the access link by adopting a GET method.
7. A resource upgrade popup validation system comprising: a user terminal and a resource server; the resource server stores a resource file;
the resource server is used for generating an access link for requesting a resource file, setting a unique identifier of the resource file in Http response data corresponding to the access link, and synchronously updating the unique identifier according to the updated resource file when the resource file is detected to be updated;
the user side is used for sending an Http request to the access link corresponding to the resource file through an Http interface;
the resource server is used for returning Http response data according to the Http request;
the user side is used for receiving the Http response data and comparing the unique identifier in the Http response data with the locally stored historical unique identifier to judge whether the resource file is updated or not; if the resource file is updated, accessing the resource file according to the access link, displaying the resource file, and updating and storing the unique identifier.
8. A resource upgrade popup confirmation device, comprising: the device comprises an interface module, a judging module, a resource file display module and a storage module;
the interface module is used for sending an Http request to an access link corresponding to the resource file through an Http interface and receiving returned Http response data; the Http response data is obtained by the resource version control method as claimed in any one of claims 1 to 3;
the judging module is used for comparing the unique identifier in the Http response data with the historical unique identifier stored in the storage module so as to judge whether the resource file is updated or not;
the interface module is further used for accessing the resource file according to the access link when the resource file is updated so as to obtain the resource file;
the resource file display module is used for displaying the resource file obtained by the interface module;
and the storage module is used for synchronously updating and storing the unique identifier when the resource file is updated.
9. A terminal device, characterized in that it comprises a processor and a memory, the memory storing a computer program, the processor being adapted to execute the computer program to implement the resource upgrade popup confirmation method of any of claims 4-6.
10. A readable storage medium, characterized in that it stores a computer program which, when executed on a processor, implements a resource upgrade popup confirmation method according to any of claims 4-6.
CN202310652302.6A 2023-06-05 2023-06-05 Resource version control method, popup confirmation method, device, equipment and medium Pending CN116389254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310652302.6A CN116389254A (en) 2023-06-05 2023-06-05 Resource version control method, popup confirmation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310652302.6A CN116389254A (en) 2023-06-05 2023-06-05 Resource version control method, popup confirmation method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN116389254A true CN116389254A (en) 2023-07-04

Family

ID=86963766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310652302.6A Pending CN116389254A (en) 2023-06-05 2023-06-05 Resource version control method, popup confirmation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116389254A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109819033A (en) * 2019-01-25 2019-05-28 杭州迪普科技股份有限公司 A kind of resource file loading method and system
US20190342356A1 (en) * 2017-01-02 2019-11-07 Koninklijke Kpn N.V. Selectively updating a dynamic manifest file
CN110688596A (en) * 2019-09-09 2020-01-14 平安普惠企业管理有限公司 Static webpage updating method and device, computer equipment and storage medium
CN115037728A (en) * 2022-04-20 2022-09-09 上海极豆科技有限公司 Protocol updating method, device, equipment and storage medium
CN115718606A (en) * 2022-11-30 2023-02-28 杭州比智科技有限公司 Method and system for automatic and continuous integration and deployment of server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190342356A1 (en) * 2017-01-02 2019-11-07 Koninklijke Kpn N.V. Selectively updating a dynamic manifest file
CN109819033A (en) * 2019-01-25 2019-05-28 杭州迪普科技股份有限公司 A kind of resource file loading method and system
CN110688596A (en) * 2019-09-09 2020-01-14 平安普惠企业管理有限公司 Static webpage updating method and device, computer equipment and storage medium
CN115037728A (en) * 2022-04-20 2022-09-09 上海极豆科技有限公司 Protocol updating method, device, equipment and storage medium
CN115718606A (en) * 2022-11-30 2023-02-28 杭州比智科技有限公司 Method and system for automatic and continuous integration and deployment of server

Similar Documents

Publication Publication Date Title
CN108153670B (en) Interface testing method and device and electronic equipment
US10284443B2 (en) Monitoring of services
CN112867988A (en) Implementing compliance settings by a mobile device to follow a configuration scenario
CN107211003B (en) Distributed storage system and method for managing metadata
CN110673920A (en) Internationalization processing method and device, computer equipment and storage medium
CN113407383B (en) Main and standby system switching method and device, server and main and standby system
CN108279882B (en) Framework generation method, device, equipment and computer readable medium
US20150347612A1 (en) Information terminal and control method
CN111371851B (en) Connection method, connection device, electronic equipment and storage medium
CN111552712A (en) Report data extraction method and device and computer equipment
CN107347093B (en) Configuration method and device for distributed server system
CN116389254A (en) Resource version control method, popup confirmation method, device, equipment and medium
ZA200903243B (en) A method of processing a credit application
CN103455543A (en) Document management server, document management method, and storage medium
CN110990360A (en) File synchronization method based on network storage device and related components
CN108280111B (en) Page processing method, device, user terminal and storage medium
CN114168876A (en) Page display method and device, computer equipment and computer readable storage medium
CN109960552B (en) Webpage interface differential rendering method and device
CN113422791A (en) Cloud service configuration method and device, electronic equipment and computer-readable storage medium
CN112019632A (en) Information management method and system of Internet cloud platform
CN115514806B (en) Perception discovery method and system for discrete service cluster
CN113177567B (en) Image data processing method and system based on cloud computing service
US11983450B2 (en) Generating user interface for onboarding
CN112527780B (en) Redis cluster creation and management method, system, computer equipment and storage medium
US20230037105A1 (en) System, method and apparatus for computer communication

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20230704