CN115665127A - Resource file upgrading method and device, computer equipment and storage medium - Google Patents

Resource file upgrading method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115665127A
CN115665127A CN202211246521.6A CN202211246521A CN115665127A CN 115665127 A CN115665127 A CN 115665127A CN 202211246521 A CN202211246521 A CN 202211246521A CN 115665127 A CN115665127 A CN 115665127A
Authority
CN
China
Prior art keywords
resource file
source tracing
imported
identifier
local
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
CN202211246521.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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN202211246521.6A priority Critical patent/CN115665127A/en
Publication of CN115665127A publication Critical patent/CN115665127A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a resource file upgrading method, a resource file upgrading device, a computer device, a storage medium and a computer program product. The method comprises the following steps: acquiring an imported resource file, and determining a local resource file corresponding to the imported resource file; when the local resource file has a corresponding first source tracing identifier and the imported resource file has a corresponding second source tracing identifier, detecting whether the first source tracing identifier is included by the second source tracing identifier; if not, refusing to upgrade the local resource file based on the imported resource file; if yes, upgrading the local resource file based on the imported resource file when the second source tracing identifier is determined to meet upgrading conditions. By adopting the method, the safety can be upgraded.

Description

Resource file upgrading method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for upgrading a resource file, a computer device, a storage medium, and a computer program product.
Background
With the development of computer technology, an integration platform for integrating various business systems is widely used. When the service logic of the integrated platform changes, the local resource file of the integrated platform needs to be upgraded. In the conventional technology, when a local resource file is upgraded, resources in the current environment are usually directly covered, which may cause content of a user who performs differentiation modification before upgrading to be lost, and the security of the resource file cannot be guaranteed.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a resource file upgrading method, apparatus, computer device, computer readable storage medium and computer program product capable of improving security.
In a first aspect, the present application provides a resource file upgrading method. The method comprises the following steps:
acquiring an imported resource file, and determining a local resource file corresponding to the imported resource file;
when the local resource file has a corresponding first source tracing identifier and the imported resource file has a corresponding second source tracing identifier, detecting whether the first source tracing identifier is included by the second source tracing identifier;
if not, refusing to upgrade the local resource file based on the imported resource file;
if yes, upgrading the local resource file based on the imported resource file when the second source tracing identifier is determined to meet upgrading conditions.
In a second aspect, the present application further provides a resource file upgrading apparatus. The device comprises:
the determining module is used for acquiring an imported resource file and determining a local resource file corresponding to the imported resource file;
the detecting module is used for detecting whether the first source tracing identifier is included by the second source tracing identifier or not when the local resource file has the corresponding first source tracing identifier and the imported resource file has the corresponding second source tracing identifier;
the rejection module is used for rejecting upgrading of the local resource file based on the imported resource file if the local resource file is not upgraded;
and if so, upgrading the local resource file based on the imported resource file when the second source tracing identifier is determined to meet the upgrading condition.
In one embodiment, the determining module is further configured to:
if the second source tracing identifier is consistent with the first source tracing identifier, determining that the second source tracing identifier meets an upgrading condition;
and upgrading the local resource file based on the imported resource file.
In one embodiment, the determining module is further configured to:
if the second source tracing identifier is inconsistent with the first source tracing identifier, judging whether the second source tracing identifier contains a target client identifier;
if the second source tracing identifier does not contain the target client identifier, determining that the second source tracing identifier meets an upgrading condition, and upgrading the local resource file based on the imported resource file.
In one embodiment, the apparatus further comprises:
the detection module is further configured to detect a start operation for a import switch if the second source tracing identifier includes the target client identifier;
the upgrading module is further configured to upgrade the local resource file based on the imported resource file when the starting operation is detected.
In one embodiment, the determining module is further configured to:
acquiring a resource file identifier corresponding to the imported resource file;
if the local storage area stores the target resource file matched with the resource file identifier, determining the target resource file as a local resource file corresponding to the imported resource file;
the upgrading module is further configured to upgrade the local resource file based on the imported resource file if the target resource file is not stored in the local storage area.
In one embodiment, the apparatus further comprises:
the upgrading module is further configured to upgrade the local resource file based on the imported resource file when the local resource file does not have the corresponding first source tracing identifier;
the rejecting module is further configured to reject upgrading of the local resource file based on the imported resource file when the local resource file has the corresponding first source tracing identifier and the imported resource file does not have the corresponding second source tracing identifier.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
acquiring an imported resource file, and determining a local resource file corresponding to the imported resource file;
when the local resource file has a corresponding first source tracing identifier and the imported resource file has a corresponding second source tracing identifier, detecting whether the first source tracing identifier is included by the second source tracing identifier;
if not, refusing to upgrade the local resource file based on the imported resource file;
if yes, upgrading the local resource file based on the imported resource file when the second source tracing identifier is determined to meet upgrading conditions.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring an imported resource file, and determining a local resource file corresponding to the imported resource file;
when the local resource file has a corresponding first source tracing identifier and the imported resource file has a corresponding second source tracing identifier, detecting whether the first source tracing identifier is included by the second source tracing identifier;
if not, refusing to upgrade the local resource file based on the imported resource file;
if yes, upgrading the local resource file based on the imported resource file when the second source tracing identifier is determined to meet upgrading conditions.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
acquiring an imported resource file, and determining a local resource file corresponding to the imported resource file;
when the local resource file has a corresponding first source tracing identifier and the imported resource file has a corresponding second source tracing identifier, detecting whether the first source tracing identifier is included by the second source tracing identifier;
if not, refusing to upgrade the local resource file based on the imported resource file;
if yes, upgrading the local resource file based on the imported resource file when the second source tracing identifier is determined to meet upgrading conditions.
The resource file upgrading method, the resource file upgrading device, the computer equipment, the storage medium and the computer program product acquire the imported resource file and determine the local resource file corresponding to the imported resource file. When a local resource file has a corresponding first source tracing identifier and an imported resource file has a corresponding second source tracing identifier, detecting whether the first source tracing identifier is included by the second source tracing identifier. If the first source tracing identifier is not included in the second source tracing identifier, it indicates that modification paths of the imported resource file and the local resource file are different, that is, the local resource file includes differentiated modification contents relative to the imported resource file, and the local resource file is rejected to be upgraded based on the imported resource file in order to avoid the imported resource file from covering the local resource file. If the first source tracing identifier is included in the second source tracing identifier, it is indicated that modification paths of the imported resource file and the local resource file may be the same, and when it is determined that the second source tracing identifier meets the upgrade condition, the local resource file is upgraded based on the imported resource file. Therefore, before the local resource file is upgraded, whether the upgrade of the local resource file can cause loss of differentiated modified contents or not can be judged according to the first source tracing identifier and the second source tracing identifier, and when the upgrade of the local resource file can cause loss, the upgrade of the local resource file is refused, so that the safety of the local resource file is ensured.
Drawings
FIG. 1 is a diagram of an application environment of a resource file upgrade method in one embodiment;
FIG. 2 is a flowchart illustrating a resource file upgrade method according to an embodiment;
FIG. 3 is a diagram of a method for upgrading a resource file in one embodiment;
FIG. 4 is a flowchart illustrating a resource file upgrade method according to another embodiment;
FIG. 5 is a block diagram showing the structure of a resource file upgrading apparatus according to an embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The resource file upgrading method provided by the embodiment of the application can be applied to the application environment shown in fig. 1. Wherein the computer device 102 communicates with the server 104 over a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104, or may be located on the cloud or other network server. The computer device 102 acquires the imported resource file and determines a local resource file corresponding to the imported resource file; when the local resource file has a corresponding first source tracing identifier and the imported resource file has a corresponding second source tracing identifier, detecting whether the first source tracing identifier is included by the second source tracing identifier; if not, refusing to upgrade the local resource file based on the imported resource file; if yes, upgrading the local resource file based on the imported resource file when the second source tracing identifier is determined to meet the upgrading condition.
The computer device 102 may be a terminal or a server, the terminal may be but is not limited to various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart car-mounted devices, and the like. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, and the like. The server may be implemented as a stand-alone server or as a server cluster consisting of a plurality of servers.
The server 104 may be an independent physical server, or may be a server cluster formed by a plurality of service nodes in a block chain system, a point-To-point (P2P, peer To Peer) network is formed among the service nodes, and the P2P Protocol is an application layer Protocol operating on a Transmission Control Protocol (TCP). The server 104 may be a server cluster including a plurality of physical servers, and may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a web service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), and a big data and artificial intelligence platform.
In one embodiment, as shown in fig. 2, a resource file upgrading method is provided, which is described by taking the method as an example applied to the computer device in fig. 1, and includes the following steps:
s202, the imported resource file is obtained, and the local resource file corresponding to the imported resource file is determined.
The resource files are various files required by the operation of the integration platform, and can be text files containing an integration platform starting scheme and an integration scheme. For example, the resource file may be a DTS file (Device Tree Source). The imported resource file is a resource file used for importing the local resource file and upgrading the local resource file, and may be stored in a network disk, a cloud server, a network server, or the like. The imported resource file may be a standard version of the resource file or may be a test version of the resource file. The standard version resource file may be various standard version resource files that have been released historically, or may also be newly released standard version resource files. The local resource file is a resource file downloaded to the local of the user, and may have been modified according to the service requirement, including differentiated modified content. For example, after a user downloads a standard version resource file stored in a cloud server to the local, the standard version resource file is modified according to actual service requirements, and a local resource file adapted to the current environment is obtained.
S204, when the local resource file has a corresponding first source tracing identifier and the imported resource file has a corresponding second source tracing identifier, detecting whether the first source tracing identifier is included by the second source tracing identifier.
The source tracing identifier is an identifier used for tracing a modification source of the resource file. For example, the source tracing identifier may be a character string composed of client identifiers corresponding to clients that have modified the resource file. When a client modifies a resource file, the client identifier corresponding to the client is spliced to the end of the client identifier of the last modified resource file, so as to obtain a source tracing identifier. For example, the source tracing identifier is "client identifier 1; a client identifier 2; the client identification 3 … ". The first source tracing identifier is an identifier used for tracing a modification source of the local resource file, and includes client identifiers corresponding to clients that have modified the local resource file. The second source tracing identifier is an identifier for tracing a modification source of the imported resource file, and includes client identifiers corresponding to clients that have modified the imported resource file.
In one embodiment, if the first source traceback identifier is included in the second source traceback identifier, the first source traceback identifier may be a prefix of the second source traceback identifier. The detecting whether the first source trace back identifier is identified by the second source trace back identifier may specifically be detecting whether the first source trace back identifier is a prefix of the second source trace back identifier.
In one embodiment, a first source tracing identifier corresponding to a local resource file and a second source tracing identifier corresponding to an imported resource file are inquired, if the first source tracing identifier and the second source tracing identifier are not null, it is determined that the local resource file has the corresponding first source tracing identifier, and the imported resource file has the corresponding second source tracing identifier, and whether the first source tracing identifier is a prefix of the second source tracing identifier is detected.
The computer equipment records the first source tracing identifier corresponding to the local resource file and the second source tracing identifier corresponding to the imported resource file, so that the modification path of the local resource file and the imported resource file can be recorded, and the modification link of the local resource file and the imported resource file can be traced.
S206, if not, upgrading the local resource file based on the imported resource file is refused.
If the first source traceback identifier is not a prefix of the second source traceback identifier, for example, the first source traceback identifier is "abd" and the second source traceback identifier is "aceb". In this case, the second source tracing identifier does not include the first source tracing identifier, and the second source tracing identifier is not equal to the first source tracing identifier, that is, the imported resource file and the local resource file are modified by different clients respectively, modification paths of the imported resource file and the local resource file are different, and the local resource file includes differentiated modification content with respect to the imported resource file. Thus, the computer device refuses to upgrade the local resource file based on the imported resource file to avoid overwriting differentiated modified content during upgrading.
And S208, if yes, upgrading the local resource file based on the imported resource file when the second source tracing identifier meets the upgrading condition.
The first source tracing identifier is included in the second source tracing identifier, and one of the two cases is that the first source tracing identifier is a prefix part of the second source tracing identifier, for example, the first source tracing identifier is "abd", and the second source tracing identifier is "abdec"; another case is that the first source trace back id is equal to the second source trace back id, for example, the first source trace back id is "abd" and the second source trace back id is "abd". The upgrade condition is a condition for judging whether to upgrade the local resource file. For example, the upgrade condition may be that the first source tracing identifier is equal to the second source tracing identifier. For example, the upgrade condition may be that the first source trace back identity is not equal to the second source trace back identity, and the second source trace back identity does not include the target client identity. The target client identification may be a client identification of the currently running integration platform.
When the first source tracing identifier is included in the second source tracing identifier, the first source tracing identifier has a possibility equal to that of the second source tracing identifier, that is, the imported resource file and the local resource file may be modified by the same client, and the modification paths of the imported resource file and the local resource file may be the same. Therefore, it is necessary to further determine whether the second source tracing identifier satisfies the upgrade condition, and when the second source tracing identifier satisfies the upgrade condition, upgrade the local resource file based on the imported resource file.
In the above embodiment, the imported resource file is obtained, and the local resource file corresponding to the imported resource file is determined. When the local resource file has a corresponding first source tracing identifier and the imported resource file has a corresponding second source tracing identifier, detecting whether the first source tracing identifier is included by the second source tracing identifier. If the first source tracing identifier is not included in the second source tracing identifier, it indicates that modification paths of the imported resource file and the local resource file are different, that is, the local resource file includes differentiated modification contents relative to the imported resource file, and the local resource file is rejected to be upgraded based on the imported resource file in order to avoid the imported resource file from covering the local resource file. If the first source tracing identifier is included in the second source tracing identifier, it is indicated that modification paths of the imported resource file and the local resource file may be the same, and when it is determined that the second source tracing identifier meets the upgrade condition, the local resource file is upgraded based on the imported resource file. Therefore, before the local resource file is upgraded, whether the upgrade of the local resource file can cause loss of differentiated modified contents or not can be judged according to the first source tracing identifier and the second source tracing identifier, and when the upgrade of the local resource file can cause loss, the upgrade of the local resource file is refused, so that the safety of the local resource file is ensured.
In one embodiment, S208 specifically includes: if the second source tracing identifier is consistent with the first source tracing identifier, determining that the second source tracing identifier meets the upgrading condition; and upgrading the local resource file based on the imported resource file.
When the first source tracing identifier is a prefix of the second source tracing identifier, the first source tracing identifier and the second source tracing identifier may be equal or may not be equal, and only when the first source tracing identifier is equal to the second source tracing identifier, the imported resource file and the local resource file have the same modification path, so that the computer device continues to judge whether the first source tracing identifier and the second source tracing identifier are consistent when determining that the first source tracing identifier is the prefix of the second source tracing identifier, and determines that the second source tracing identifier satisfies the upgrade condition when the second source tracing identifier is consistent with the first source tracing identifier, and upgrades the local resource file based on the imported resource file.
In the above embodiment, if the second source trace back identifier is consistent with the first source trace back identifier, the modification path of the imported resource file is the same as that of the local resource file, and the imported resource file and the local resource file contain the same differentiated modification content. Therefore, the computer device determines that the second source tracing identifier meets the upgrade condition, and upgrades the local resource file based on the imported resource file. Because the imported resource file and the local resource file contain the same differential modification content, even if the imported resource file is used for covering the local resource file during upgrading, the differential modification content is not lost, and the data security in the upgrading process is ensured.
In one embodiment, S208 specifically includes: if the second source tracing identifier is inconsistent with the first source tracing identifier, judging whether the second source tracing identifier contains a target client identifier; and if the second source tracing identifier does not contain the target client identifier, determining that the second source tracing identifier meets the upgrading condition, and upgrading the local resource file based on the imported resource file.
The target client identifier is a preconfigured client identifier, for example, the target client identifier may be a client identifier of a currently running integration platform, or may also be another client identifier. For example, the target client identification may be a client identification of a current tenant of the integration platform. If the first source tracing identifier is a prefix of the second source tracing identifier, but the second source tracing identifier is not consistent with the first source tracing identifier, it is indicated that the local resource file is a historical version of the imported resource file, and the imported resource file includes modified content of the local resource file. At this time, if the second source trace identifier does not include the target client identifier, it indicates that the imported resource file has not been modified in the current environment, and therefore the modified content included in the imported resource file is the latest modified content, and the imported resource file may be used to overwrite the local resource file. And the computer equipment determines that the second source tracing identifier meets the upgrading condition, and upgrades the local resource file based on the imported resource file.
In the above embodiment, if the second source tracing identifier is not consistent with the first source tracing identifier, it is determined whether the second source tracing identifier includes the target client identifier; and if the second source tracing identifier does not contain the target client identifier, determining that the second source tracing identifier meets the upgrading condition, and upgrading the local resource file based on the imported resource file. Therefore, when the local resource file is a historical version of the imported resource file and the imported resource file is not modified in the current environment, the imported resource file can be determined to cover the local resource file, and the upgrading process is guaranteed not to cause the failure of the normally running scheme in the current environment or the change of the execution result.
In one embodiment, if the second source tracing identifier is inconsistent with the first source tracing identifier and the second source tracing identifier includes a target client identifier, detecting a start operation for the import switch; and when the starting operation is detected, upgrading the local resource file based on the imported resource file.
The import switch is a switch for controlling whether to import a resource file. For example, the import switch may control whether to import an import resource file acquired from a cloud server. For another example, the import switch may control whether to import a resource file in the test environment into the formal environment. For another example, the import switch may control whether to import a resource file in the formal environment into the test environment. If the computer equipment detects the starting operation aiming at the import switch, the import switch is determined to be opened by the user, and at the moment, the local resource file can be covered by the import resource file according to the instruction of the user no matter whether the modification paths of the import resource file and the local resource file are the same or not, and the local resource file is upgraded on the basis of the import resource file, so that the requirements of different users are met, and the flexibility of upgrading the resource file is improved.
In one embodiment, the local resource file is a resource file of the test environment, and the imported resource file is a resource file of the formal environment. If the second source tracing identifier is inconsistent with the first source tracing identifier and the second source tracing identifier comprises a target client identifier, detecting the starting operation aiming at the import switch; when the starting operation is detected, the resource file of the formal environment is imported into the testing environment, and the resource file of the testing environment is covered, so that the resource file of the testing environment is upgraded.
In the above embodiment, if the second source tracing identifier is inconsistent with the first source tracing identifier and the second source tracing identifier includes the target client identifier, the start operation for the import switch is detected; and when the starting operation is detected, upgrading the local resource file based on the imported resource file. Therefore, the requirements of different users can be met, and the flexibility of upgrading the resource files is improved.
In one embodiment, S202 specifically includes: acquiring a resource file identifier corresponding to an imported resource file; if the local storage area stores the target resource file matched with the resource file identifier, determining the target resource file as a local resource file corresponding to the imported resource file; after S202, the method further includes: and if the target resource file is not stored in the local storage area, upgrading the local resource file based on the imported resource file.
The resource file identifier is used for marking the resource file, and may be composed of numbers, letters, characters, or special symbols. For example, the resource file identification may be an encoding of the resource file. When the computer equipment acquires the resource file identification corresponding to the imported resource file, the target resource file matched with the resource file identification is searched in the local storage area, and the identification of the target resource file is consistent with the resource file identification of the imported resource file. And if the target resource file can be found, determining the target resource file as a local resource file corresponding to the imported resource file. If the target resource file cannot be found, the local storage area does not store the local resource file corresponding to the imported resource file, and the imported resource file is used for covering the local resource file, so that the loss of differentiated modified contents in the local resource file cannot be caused.
In the above embodiment, if the local storage area does not store the local resource file corresponding to the imported resource file, the local resource file is upgraded based on the imported resource file. Therefore, whether the local resource file can be upgraded or not can be efficiently judged, and the efficiency of upgrading the resource file is improved.
In one embodiment, S204 further includes before: when the local resource file does not have the corresponding first source tracing identifier, upgrading the local resource file based on the imported resource file; and when the local resource file has the corresponding first source tracing identifier and the imported resource file does not have the corresponding second source tracing identifier, refusing to upgrade the local resource file based on the imported resource file.
When the local resource file does not have the corresponding first source tracing identifier, that is, the source tracing of the local resource file is empty, it is indicated that the local resource file does not contain the differentiated modified content, and the local resource file is upgraded based on the imported resource file. When the local resource file has the corresponding first source tracing identifier and the imported resource file does not have the corresponding second source tracing identifier, it is indicated that the local resource file is modified and contains differentiated modified content, and when the second source tracing identifier of the imported resource file is null, the imported resource file is not modified and does not contain differentiated modified content. At this time, if the imported resource file is used to upgrade the local resource file, the differentiated modified content in the local resource file will be covered, so that the scheme that normally operates in the resource file may fail or the execution result may be changed.
In the above embodiment, when the local resource file does not have the corresponding first source tracing identifier, the local resource file is upgraded based on the imported resource file; and when the local resource file has the corresponding first source tracing identifier and the imported resource file does not have the corresponding second source tracing identifier, refusing to upgrade the local resource file based on the imported resource file. Therefore, before the local resource file is upgraded, whether the upgrade of the local resource file can cause loss of differentiated modified contents or not can be judged according to the first source tracing identifier and the second source tracing identifier, and when the upgrade of the local resource file can cause loss, the upgrade of the local resource file is refused, so that the safety of the local resource file is ensured.
In an embodiment, when the imported resource file is obtained, a client identifier corresponding to a client that modifies the imported resource file for the last time is queried, and if the queried client identifier is not the end of the second source trace identifier corresponding to the imported resource file, it is indicated that the imported resource file is an illegal file, and the local resource file cannot be upgraded by using the imported resource file.
In one embodiment, as shown in fig. 3, when the computer device starts upgrading, the computer device obtains an import resource file and a resource file identifier corresponding to the import resource file. And judging whether a target resource file matched with the resource file identifier is stored in the current environment. And if the local storage area does not store the target resource file matched with the resource file identifier, upgrading the local resource file based on the imported resource file. And if the local storage area stores the target resource file matched with the resource file identifier, determining the target resource file as the local resource file and judging whether the first source tracing identifier corresponding to the local resource file is empty or not. And if the first source tracing identifier is null, upgrading the local resource file based on the imported resource file. And if the first source tracing identifier is not null, judging whether a second source tracing identifier corresponding to the imported resource file is null. And if the second source tracing identifier is empty, refusing to upgrade the local resource file based on the imported resource file. And if the second source tracing identifier is not null, judging whether the first source tracing identifier is the prefix of the second source tracing identifier. And if the first source tracing identifier is not the prefix of the second source tracing identifier, refusing to upgrade the local resource file based on the imported resource file. If the first source tracing identifier is a prefix of the second source tracing identifier, judging whether the first source tracing identifier is equal to the second source tracing identifier, and if so, upgrading the local resource file based on the imported resource file; and if not, judging whether the second source tracing identifier contains the target client identifier. And if the second source tracing identifier does not contain the target client identifier, upgrading the local resource file based on the imported resource file. And if the second source tracing identifier comprises the target client identifier, detecting the starting operation aiming at the import switch. And if the starting operation aiming at the import switch is detected, upgrading the local resource file based on the import resource file. And if the starting operation aiming at the import switch is not detected, the upgrading of the local resource file based on the import resource file is refused.
In one embodiment, as shown in fig. 4, the resource file upgrading method includes the following steps:
s402, acquiring the imported resource file and the resource file identifier corresponding to the imported resource file.
S404, if the local storage area stores the target resource file with the resource file identifier matched, determining the target resource file as a local resource file corresponding to the imported resource file.
S406, if the target resource file is not stored in the local storage area, upgrading the local resource file based on the imported resource file.
S408, when the local resource file does not have the corresponding first source tracing identifier, upgrading the local resource file based on the imported resource file.
S410, when the local resource file has the corresponding first source tracing identifier and the imported resource file does not have the corresponding second source tracing identifier, the upgrading of the local resource file based on the imported resource file is refused.
S412, when the local resource file has the corresponding first source tracing identifier and the imported resource file has the corresponding second source tracing identifier, detecting whether the first source tracing identifier is a prefix of the second source tracing identifier.
And S414, if not, refusing to upgrade the local resource file based on the imported resource file.
S416, if yes, judging whether the second source tracing identifier is consistent with the first source tracing identifier; when the second source tracing identifier is consistent with the first source tracing identifier, determining that the second source tracing identifier meets the upgrading condition; and upgrading the local resource file based on the imported resource file.
S418, when the second source tracing identifier is inconsistent with the first source tracing identifier, judging whether the second source tracing identifier contains a target client identifier; and when the second source tracing identifier does not contain the target client identifier, determining that the second source tracing identifier meets the upgrading condition, and upgrading the local resource file based on the imported resource file.
S420, if the second source tracing identifier comprises a target client identifier, detecting the starting operation aiming at the import switch; and when the starting operation is detected, upgrading the local resource file based on the imported resource file.
The specific contents of S402 to S420 may refer to the above specific implementation process.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a resource file upgrading apparatus for implementing the above-mentioned resource file upgrading method. The implementation scheme for solving the problem provided by the apparatus is similar to the implementation scheme described in the method, so the specific limitations in one or more embodiments of the resource file upgrading apparatus provided below may refer to the limitations on the resource file upgrading method in the foregoing, and details are not described here again.
In one embodiment, as shown in fig. 5, there is provided a resource file upgrade apparatus, including: a determination module 502, a detection module 504, a rejection module 506, and an upgrade module 508, wherein:
a determining module 502, configured to obtain an import resource file, and determine a local resource file corresponding to the import resource file;
a detecting module 504, configured to detect whether the first source trace back identifier is included in the second source trace back identifier when the local resource file has the corresponding first source trace back identifier and the imported resource file has the corresponding second source trace back identifier;
a refusing module 506, configured to refuse to upgrade the local resource file based on the imported resource file if yes;
and the upgrading module 508 is configured to, if not, upgrade the local resource file based on the imported resource file when it is determined that the second source tracing identifier meets the upgrading condition.
In the above embodiment, the import resource file is obtained, and the local resource file corresponding to the import resource file is determined. When a local resource file has a corresponding first source tracing identifier and an imported resource file has a corresponding second source tracing identifier, detecting whether the first source tracing identifier is included by the second source tracing identifier. If the first source tracing identifier is not included in the second source tracing identifier, it indicates that modification paths of the imported resource file and the local resource file are different, that is, the local resource file includes differentiated modification contents relative to the imported resource file, and the local resource file is rejected to be upgraded based on the imported resource file in order to avoid the imported resource file from covering the local resource file. If the first source tracing identifier is included in the second source tracing identifier, it is indicated that modification paths of the imported resource file and the local resource file may be the same, and when it is determined that the second source tracing identifier meets the upgrade condition, the local resource file is upgraded based on the imported resource file. Therefore, before the local resource file is upgraded, whether the upgrade of the local resource file can cause loss of differentiated modified contents or not can be judged according to the first source tracing identifier and the second source tracing identifier, and when the upgrade of the local resource file can cause loss, the upgrade of the local resource file is refused, so that the safety of the local resource file is ensured.
In one embodiment, the determining module 502 is further configured to:
if the second source tracing identifier is consistent with the first source tracing identifier, determining that the second source tracing identifier meets the upgrading condition;
and upgrading the local resource file based on the imported resource file.
In one embodiment, the determining module 502 is further configured to:
if the second source tracing identifier is inconsistent with the first source tracing identifier, judging whether the second source tracing identifier comprises a target client identifier;
and if the second source tracing identifier does not contain the target client identifier, determining that the second source tracing identifier meets the upgrading condition, and upgrading the local resource file based on the imported resource file.
In one embodiment, the apparatus further comprises:
the detection module 504 is further configured to detect, if the second source tracing identifier includes the target client identifier, a start operation for the import switch;
the upgrading module 508 is further configured to, when the start operation is detected, upgrade the local resource file based on the imported resource file.
In one embodiment, the determining module 502 is further configured to:
acquiring a resource file identifier corresponding to an imported resource file;
if the local storage area stores the target resource file matched with the resource file identifier, determining the target resource file as a local resource file corresponding to the imported resource file;
and the upgrading module is also used for upgrading the local resource file based on the imported resource file if the target resource file is not stored in the local storage area.
In one embodiment, the apparatus further comprises:
the upgrading module 508 is further configured to, when the local resource file does not have the corresponding first source tracing identifier, upgrade the local resource file based on the imported resource file;
the rejecting module 506 is further configured to reject upgrading the local resource file based on the imported resource file when the local resource file has the corresponding first source tracing identifier and the imported resource file does not have the corresponding second source tracing identifier.
The modules in the resource file upgrading device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, an Input/Output interface (I/O for short), and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing resource file upgrade data. The input/output interface of the computer device is used for exchanging information between the processor and an external device. The communication interface of the computer device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a resource file upgrade method.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer apparatus includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input device. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The input/output interface of the computer device is used for exchanging information between the processor and an external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a resource file upgrade method. The display unit of the computer equipment is used for forming a visual and visible picture, and can be a display screen, a projection device or a virtual reality imaging device, the display screen can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the configurations shown in fig. 6 and 7 are merely block diagrams of some configurations relevant to the present disclosure, and do not constitute a limitation on the computing devices to which the present disclosure may be applied, and that a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In an embodiment, a computer program product is provided, comprising a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the relevant laws and regulations and standards of the relevant country and region.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), magnetic Random Access Memory (MRAM), ferroelectric Random Access Memory (FRAM), phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A resource file upgrading method is characterized by comprising the following steps:
acquiring an imported resource file, and determining a local resource file corresponding to the imported resource file;
when the local resource file has a corresponding first source tracing identifier and the imported resource file has a corresponding second source tracing identifier, detecting whether the first source tracing identifier is included by the second source tracing identifier;
if not, refusing to upgrade the local resource file based on the imported resource file;
if yes, upgrading the local resource file based on the imported resource file when the second source tracing identifier is determined to meet upgrading conditions.
2. The method of claim 1, wherein upgrading the local resource file based on the imported resource file when it is determined that the second source tracing identifier satisfies an upgrade condition comprises:
if the second source tracing identifier is consistent with the first source tracing identifier, determining that the second source tracing identifier meets an upgrading condition;
and upgrading the local resource file based on the imported resource file.
3. The method of claim 1, wherein upgrading the local resource file based on the imported resource file when it is determined that the second source tracing identifier satisfies an upgrade condition comprises:
if the second source tracing identifier is inconsistent with the first source tracing identifier, judging whether the second source tracing identifier contains a target client identifier;
if the second source tracing identifier does not contain the target client identifier, determining that the second source tracing identifier meets an upgrading condition, and upgrading the local resource file based on the imported resource file.
4. The method of claim 3, further comprising:
if the second source tracing identifier comprises the target client identifier, detecting the starting operation aiming at the import switch;
and when the starting operation is detected, upgrading the local resource file based on the imported resource file.
5. The method of claim 1, wherein the determining the local resource file corresponding to the imported resource file comprises:
acquiring a resource file identifier corresponding to the imported resource file;
if the local storage area stores the target resource file matched with the resource file identifier, determining the target resource file as a local resource file corresponding to the imported resource file;
the method further comprises the following steps:
and if the target resource file is not stored in the local storage area, upgrading the local resource file based on the imported resource file.
6. The method of claim 1, further comprising:
when the local resource file does not have a corresponding first source tracing identifier, upgrading the local resource file based on the imported resource file;
and when the local resource file has a corresponding first source tracing identifier and the imported resource file does not have a corresponding second source tracing identifier, refusing to upgrade the local resource file based on the imported resource file.
7. An apparatus for resource file upgrade, the apparatus comprising:
the determining module is used for acquiring an imported resource file and determining a local resource file corresponding to the imported resource file;
the detecting module is used for detecting whether the first source tracing identifier is included by the second source tracing identifier or not when the local resource file has the corresponding first source tracing identifier and the imported resource file has the corresponding second source tracing identifier;
the rejection module is used for rejecting upgrading of the local resource file based on the imported resource file if the local resource file is not upgraded;
and if not, upgrading the local resource file based on the imported resource file when the second source tracing identifier is determined to meet the upgrading condition.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 6 when executed by a processor.
CN202211246521.6A 2022-10-12 2022-10-12 Resource file upgrading method and device, computer equipment and storage medium Pending CN115665127A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211246521.6A CN115665127A (en) 2022-10-12 2022-10-12 Resource file upgrading method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211246521.6A CN115665127A (en) 2022-10-12 2022-10-12 Resource file upgrading method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115665127A true CN115665127A (en) 2023-01-31

Family

ID=84987735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211246521.6A Pending CN115665127A (en) 2022-10-12 2022-10-12 Resource file upgrading method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115665127A (en)

Similar Documents

Publication Publication Date Title
US10862889B2 (en) Methods and systems for persistent cross application mobile device identification
US11699146B2 (en) Updating digital wallet assets
US11652628B2 (en) Deterministic verification of digital identity documents
CN110532799B (en) Data desensitization control method, electronic device and computer readable storage medium
US20140250105A1 (en) Reliable content recommendations
CN103139761B (en) The method and communication terminal of a kind of information real-time show
US20170277526A1 (en) Software categorization method and electronic device
US20140237568A1 (en) Unique identification for an information handling system
CN104615662A (en) Data processing method and device and terminal device
KR20200053239A (en) Electronic device and method of providing personal information, and computer-readable recording medium recording the same
CN115665127A (en) Resource file upgrading method and device, computer equipment and storage medium
CN114860295A (en) Resource file updating method, device, equipment and readable storage medium
CN113836428A (en) Business pushing method and device, computer equipment and storage medium
US11824948B2 (en) Enhanced processing of user profiles using data structures specialized for graphical processing units (GPUs)
US10621575B1 (en) Instantiating digital wallet assets
GB2599522A (en) Server device, server device control method, program, official article determination system, and official article determination system control method
CN111159759A (en) Mixed sensitive information discovery method and device based on black and white list and electronic equipment
EP3192225A1 (en) Information object system
CN113472840B (en) Cloud service dynamic management method and device
KR101728945B1 (en) System and method for determining existence of relationship between users
CN117763247A (en) Link downloading method, device, computer equipment and storage medium
CN113360296A (en) Address management method and device, electronic equipment and readable storage medium
CN117389762A (en) Application program interface calling method and device, computer equipment and storage medium
CN114090300A (en) Method, device and system for data transmission among multiple activities and computer equipment
CN116894010A (en) Resource state processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination