Resource file upgrading method and device, computer device and storage medium

By acquiring and comparing the source traceability identifiers of resource files and detecting their inclusion relationships, the problem of losing differentiated modified content during traditional resource file upgrades is solved, thus achieving secure upgrades of resource files.

CN115665127BActive Publication Date: 2026-04-07KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-12
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Traditional resource file upgrade methods result in the loss of user-modified content and cannot guarantee the security of resource files.

Method used

By obtaining the source traceability identifiers of imported resource files and local resource files, the system detects and compares their inclusion relationships to determine whether the upgrade conditions are met, and rejects or performs the upgrade to avoid overwriting differentiated modified content.

Benefits of technology

Before upgrading resource files, it is determined whether the upgrade will result in the loss of differentiated modified content. The upgrade is rejected or proceeded, thus ensuring the security and data integrity of local resource files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115665127B_ABST
    Figure CN115665127B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, computer device, storage medium, and computer program product for upgrading resource files. The method includes: 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 traceability identifier and the imported resource file has a corresponding second source traceability identifier, detecting whether the first source traceability identifier is contained within the second source traceability identifier; if not, refusing to upgrade the local resource file based on the imported resource file; if yes, and determining that the second source traceability identifier meets the upgrade conditions, upgrading the local resource file based on the imported resource file. This method can enhance security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer equipment, storage medium, and computer program product for upgrading resource files. Background Technology

[0002] With the development of computer technology, integration platforms for integrating various business systems have been widely used. When the business logic of an integration platform changes, it is necessary to upgrade the local resource files of the platform. In traditional technologies, upgrading local resource files usually involves directly overwriting the resources of the current environment. This can lead to the loss of any modifications made by users before the upgrade, and the security of the resource files cannot be guaranteed. Summary of the Invention

[0003] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve the security of resource file upgrades in response to the above-mentioned technical problems.

[0004] Firstly, this application provides a method for upgrading resource files. The method includes:

[0005] Obtain the imported resource file and determine the local resource file corresponding to the imported resource file;

[0006] When the local resource file has a corresponding first source traceability identifier and the imported resource file has a corresponding second source traceability identifier, it is detected whether the first source traceability identifier is included by the second source traceability identifier;

[0007] If not, refuse to upgrade the local resource file based on the imported resource file;

[0008] If so, when it is determined that the second source traceability identifier meets the upgrade conditions, the local resource file is upgraded based on the imported resource file.

[0009] Secondly, this application also provides a resource file upgrade device. The device includes:

[0010] The determination module is used to obtain the imported resource file and determine the local resource file corresponding to the imported resource file;

[0011] The detection module is used to detect whether the first source traceability identifier is included by the second source traceability identifier when the local resource file has a corresponding first source traceability identifier and the imported resource file has a corresponding second source traceability identifier.

[0012] The rejection module is used to refuse to upgrade the local resource file based on the imported resource file if no.

[0013] The upgrade module is used to upgrade the local resource file based on the imported resource file if the second source traceability identifier meets the upgrade conditions.

[0014] In one embodiment, the determining module is further configured to:

[0015] If the second source traceability identifier is consistent with the first source traceability identifier, it is determined that the second source traceability identifier meets the upgrade conditions;

[0016] The local resource files are upgraded based on the imported resource files.

[0017] In one embodiment, the determining module is further configured to:

[0018] If the second source tracing identifier is inconsistent with the first source tracing identifier, determine whether the second source tracing identifier contains the target client identifier;

[0019] If the second source tracing identifier does not contain the target client identifier, it is determined that the second source tracing identifier meets the upgrade conditions, and the local resource file is upgraded based on the imported resource file.

[0020] In one embodiment, the apparatus further includes:

[0021] The detection module is further configured to detect the opening operation of the import switch if the second source traceability identifier contains the target client identifier;

[0022] The upgrade module is also used to upgrade the local resource file based on the imported resource file when the start operation is detected.

[0023] In one embodiment, the determining module is further configured to:

[0024] Obtain the resource file identifier corresponding to the imported resource file;

[0025] If the local storage area stores a target resource file that matches the resource file identifier, the target resource file is determined as the local resource file corresponding to the imported resource file;

[0026] The upgrade module is also used 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.

[0027] In one embodiment, the apparatus further includes:

[0028] The upgrade module is further configured to upgrade the local resource file based on the imported resource file when the local resource file does not have a corresponding first source traceability identifier;

[0029] The rejection module is further configured to refuse to upgrade the local resource file based on the imported resource file when the local resource file has a corresponding first source traceability identifier and the imported resource file does not have a corresponding second source traceability identifier.

[0030] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0031] Obtain the imported resource file and determine the local resource file corresponding to the imported resource file;

[0032] When the local resource file has a corresponding first source traceability identifier and the imported resource file has a corresponding second source traceability identifier, it is detected whether the first source traceability identifier is included by the second source traceability identifier;

[0033] If not, refuse to upgrade the local resource file based on the imported resource file;

[0034] If so, when it is determined that the second source traceability identifier meets the upgrade conditions, the local resource file is upgraded based on the imported resource file.

[0035] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0036] Obtain the imported resource file and determine the local resource file corresponding to the imported resource file;

[0037] When the local resource file has a corresponding first source traceability identifier and the imported resource file has a corresponding second source traceability identifier, it is detected whether the first source traceability identifier is included by the second source traceability identifier;

[0038] If not, refuse to upgrade the local resource file based on the imported resource file;

[0039] If so, when it is determined that the second source traceability identifier meets the upgrade conditions, the local resource file is upgraded based on the imported resource file.

[0040] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0041] Obtain the imported resource file and determine the local resource file corresponding to the imported resource file;

[0042] When the local resource file has a corresponding first source traceability identifier and the imported resource file has a corresponding second source traceability identifier, it is detected whether the first source traceability identifier is included by the second source traceability identifier;

[0043] If not, refuse to upgrade the local resource file based on the imported resource file;

[0044] If so, when it is determined that the second source traceability identifier meets the upgrade conditions, the local resource file is upgraded based on the imported resource file.

[0045] The aforementioned resource file upgrade method, apparatus, computer equipment, storage medium, and computer program product acquire an imported resource file and determine the corresponding local resource file. When the local resource file has a corresponding first source traceability identifier and the imported resource file has a corresponding second source traceability identifier, it is detected whether the first source traceability identifier is contained in the second source traceability identifier. If the first source traceability identifier is not contained in the second source traceability identifier, it indicates that the modification paths of the imported resource file and the local resource file are different, that is, the local resource file contains differentiated modification content relative to the imported resource file. To avoid the imported resource file overwriting the local resource file, the upgrade of the local resource file based on the imported resource file is rejected. If the first source traceability identifier is contained in the second source traceability identifier, it indicates that the modification paths of the imported resource file and the local resource file may be the same. When it is determined that the second source traceability identifier meets the upgrade conditions, the local resource file is upgraded based on the imported resource file. Thus, before upgrading the local resource file, it is possible to determine whether upgrading the local resource file will lead to the loss of differentiated modification content based on the first and second source traceability identifiers, and if loss is likely, the upgrade of the local resource file is rejected, ensuring the security of the local resource file. Attached Figure Description

[0046] Figure 1 This is a diagram illustrating the application environment of a resource file upgrade method in one embodiment.

[0047] Figure 2 This is a flowchart illustrating a resource file upgrade method in one embodiment;

[0048] Figure 3This is a schematic diagram of a resource file upgrade method in one embodiment;

[0049] Figure 4 This is a flowchart illustrating a resource file upgrade method in another embodiment;

[0050] Figure 5 This is a structural block diagram of a resource file upgrade device in one embodiment;

[0051] Figure 6 This is an internal structural diagram of a computer device in one embodiment;

[0052] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0054] The resource file upgrade method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, computer device 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Computer device 102 obtains an imported resource file and determines the corresponding local resource file. When the local resource file has a corresponding first source traceability identifier and the imported resource file has a corresponding second source traceability identifier, it checks whether the first source traceability identifier is contained within the second source traceability identifier. If not, it refuses to upgrade the local resource file based on the imported resource file; if so, and it is determined that the second source traceability identifier meets the upgrade conditions, it upgrades the local resource file based on the imported resource file.

[0055] The computer device 102 can be a terminal or a server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0056] Server 104 can be a standalone physical server or a server cluster composed of multiple service nodes in a blockchain system. These service nodes form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). Furthermore, server 104 can also be a server cluster composed of multiple physical servers, and can be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0057] In one embodiment, such as Figure 2 As shown, a resource file upgrade method is provided, which can be applied to... Figure 1 Taking a computer device as an example, the explanation includes the following steps:

[0058] S202, obtain the imported resource file and determine the local resource file corresponding to the imported resource file.

[0059] Resource files are various files required for the integration platform to run, and can be text files containing the integration platform's startup and integration schemes. For example, a resource file can be a DTS file (Device Tree Source). Imported resource files are used to import and upgrade local resource files, and can be stored on cloud drives, cloud servers, or web servers. Imported resource files can be standard versions or test versions. Standard versions can be various historically released standard versions or newly released standard versions. Local resource files are resource files downloaded to the user's local machine, and may have been modified according to business needs, containing differentiated modifications. For example, when a user downloads a standard version resource file stored on a cloud server to their local machine, they can modify the standard version resource file according to actual business needs to obtain a local resource file adapted to the current environment.

[0060] S204. When the local resource file has a corresponding first source traceability identifier and the imported resource file has a corresponding second source traceability identifier, check whether the first source traceability identifier is included by the second source traceability identifier.

[0061] The source tracing identifier is used to trace the source of modifications to resource files. For example, it can be a string consisting of the client identifiers of clients that modified the resource file. When a client modifies a resource file, its corresponding client identifier is appended to the end of the identifier of the client that modified the resource file, resulting in the source tracing identifier. For example, the source tracing identifier might be "Client Identifier 1; Client Identifier 2; Client Identifier 3…". The first source tracing identifier is used to trace the source of modifications to local resource files, containing the client identifiers of each client that modified the local resource file. The second source tracing identifier is used to trace the source of modifications to imported resource files, containing the client identifiers of each client that modified the imported resource file.

[0062] In one embodiment, if a first source traceability identifier is included in a second source traceability identifier, the first source traceability identifier may be a prefix of the second source traceability identifier. Detecting whether the first source traceability identifier is included in the second source traceability identifier may specifically involve detecting whether the first source traceability identifier is a prefix of the second source traceability identifier.

[0063] In one embodiment, the first source traceability identifier corresponding to the local resource file and the second source traceability identifier corresponding to the imported resource file are queried. If both the first source traceability identifier and the second source traceability identifier are not empty, it is determined that the local resource file has a corresponding first source traceability identifier and the imported resource file has a corresponding second source traceability identifier. Then, it is detected whether the first source traceability identifier is a prefix of the second source traceability identifier.

[0064] The computer device records the first source traceability identifier corresponding to the local resource file and the second source traceability identifier corresponding to the imported resource file, thereby recording the modification path of the local resource file and the imported resource file, making the modification link of the local resource file and the imported resource file traceable.

[0065] S206, If not, refuse to upgrade local resource files based on imported resource files.

[0066] If the first source tracing identifier is not a prefix of the second source tracing identifier, for example, if the first source tracing identifier is "abd" and the second source tracing identifier is "aceb", then the second source tracing identifier does not contain the first source tracing identifier, and the second source tracing identifier cannot be equal to the first source tracing identifier. That is, the imported resource file and the local resource file have been modified by different clients, their modification paths are different, and the local resource file contains different modifications relative to the imported resource file. Therefore, the computer device refuses to upgrade the local resource file based on the imported resource file to avoid overwriting the different modifications during the upgrade.

[0067] S208, If so, when it is determined that the second source traceability identifier meets the upgrade conditions, the local resource file is upgraded based on the imported resource file.

[0068] The inclusion of the first source tracing identifier by the second source tracing identifier falls into two categories: First, the first source tracing identifier is a prefix of the second source tracing identifier (e.g., the first source tracing identifier is "abd" and the second source tracing identifier is "abdec"); second, the first source tracing identifier and the second source tracing identifier are equal (e.g., both the first and second source tracing identifiers are "abd"). Upgrade conditions are used to determine whether to upgrade local resource files. For example, an upgrade condition could be that the first and second source tracing identifiers are equal. Alternatively, an upgrade condition could be that the first and second source tracing identifiers are not equal, and the second source tracing identifier does not contain the target client identifier. The target client identifier can be the client identifier of the currently running integration platform.

[0069] When the first source tracing identifier is included by the second source tracing identifier, the first source tracing identifier has the possibility of being equal to 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 meets the upgrade conditions, and if the second source tracing identifier meets the upgrade conditions, the local resource file is upgraded based on the imported resource file.

[0070] In the above embodiments, an imported resource file is obtained, and the corresponding local 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, it is checked whether the first source tracing identifier is contained in the second source tracing identifier. If the first source tracing identifier is not contained in the second source tracing identifier, it indicates that the modification paths of the imported resource file and the local resource file are different, that is, the local resource file contains differentiated modification content relative to the imported resource file. To avoid the imported resource file overwriting the local resource file, upgrading the local resource file based on the imported resource file is rejected. If the first source tracing identifier is contained in the second source tracing identifier, it indicates that the modification paths of the imported resource file and the local resource file may be the same. When it is determined that the second source tracing identifier meets the upgrade conditions, the local resource file is upgraded based on the imported resource file. Thus, before upgrading the local resource file, it can be determined whether upgrading the local resource file will lead to the loss of differentiated modification content based on the first and second source tracing identifiers, and if loss is possible, the upgrade of the local resource file is rejected, ensuring the security of the local resource file.

[0071] In one embodiment, S208 specifically includes: if the second source traceability identifier is consistent with the first source traceability identifier, determining that the second source traceability identifier meets the upgrade conditions; and upgrading the local resource file based on the imported resource file.

[0072] When the first source traceability identifier is a prefix of the second source traceability identifier, the first source traceability identifier and the second source traceability identifier may or may not be equal. Since the imported resource file and the local resource file will have the same modification path only when the first source traceability identifier and the second source traceability identifier are equal, when the computer device determines that the first source traceability identifier is a prefix of the second source traceability identifier, it continues to determine whether the first source traceability identifier and the second source traceability identifier are consistent. When the second source traceability identifier is consistent with the first source traceability identifier, it determines that the second source traceability identifier meets the upgrade conditions and upgrades the local resource file based on the imported resource file.

[0073] In the above embodiments, if the second source traceability identifier is consistent with the first source traceability identifier, and the imported resource file and the local resource file have the same modification path, they contain the same differentiated modification content. Therefore, the computer device determines that the second source traceability identifier meets the upgrade conditions and upgrades the local resource file based on the imported resource file. Since the imported resource file and the local resource file contain the same differentiated modification content, even if the imported resource file overwrites the local resource file during the upgrade, the differentiated modification content will not be lost, ensuring data security during the upgrade process.

[0074] In one embodiment, S208 specifically includes: if the second source tracing identifier is inconsistent with the first source tracing identifier, determining whether the second source tracing identifier contains a target client identifier; if the second source tracing identifier does not contain a target client identifier, determining that the second source tracing identifier meets the upgrade conditions, and upgrading the local resource file based on the imported resource file.

[0075] The target client identifier is a pre-configured client identifier. For example, the target client identifier can be the client identifier of the currently running integration platform, or it can be another client identifier. For instance, the target client identifier can be the client identifier of the 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 inconsistent with the first source tracing identifier, it indicates that the local resource file is a historical version of the imported resource file, and the imported resource file contains the modified content of the local resource file. In this case, if the second source tracing identifier does not contain the target client identifier, it indicates that the imported resource file has not been modified in the current environment. Therefore, the modified content contained in the imported resource file is the latest modified content, and the imported resource file can be used to overwrite the local resource file. The computer device determines that the second source tracing identifier meets the upgrade conditions and upgrades the local resource file based on the imported resource file.

[0076] In the above embodiments, if the second source tracing identifier is inconsistent with the first source tracing identifier, it is determined whether the second source tracing identifier contains the target client identifier; if the second source tracing identifier does not contain the target client identifier, it is determined that the second source tracing identifier meets the upgrade conditions, and the local resource file is upgraded based on the imported resource file. This ensures that when the local resource file is a historical version of the imported resource file and the imported resource file has not been modified in the current environment, it can be determined that the imported resource file can overwrite the local resource file, guaranteeing that the upgrade process will not cause the normally operating solution in the current environment to fail or change the execution result.

[0077] In one embodiment, if the second source traceability identifier is inconsistent with the first source traceability identifier, and the second source traceability identifier contains the target client identifier, an activation operation for the import switch is detected; when an activation operation is detected, the local resource file is upgraded based on the imported resource file.

[0078] The import switch controls whether resource files are imported. For example, it can control whether resource files obtained from a cloud server are imported. It can also control whether resource files from the test environment are imported into the production environment, or vice versa. If the computer detects that the import switch is enabled, it determines that the user has turned it on. At this point, regardless of whether the modification paths of the imported and local resource files are the same, the local resource files can be overwritten with the imported resource files according to the user's instructions. This upgrades the local resource files based on the imported resource files, meeting the needs of different users and improving the flexibility of resource file upgrades.

[0079] In one embodiment, the local resource file is the resource file for the test environment, and the imported resource file is the resource file for the production environment. If the second source tracing identifier is inconsistent with the first source tracing identifier, and the second source tracing identifier contains the target client identifier, an activation operation for the import switch is detected. When an activation operation is detected, the resource file for the production environment is imported into the test environment, and the resource file for the test environment is overwritten, thereby upgrading the resource file for the test environment.

[0080] In the above embodiments, if the second source traceability identifier is inconsistent with the first source traceability identifier, and the second source traceability identifier contains a target client identifier, an activation operation for the import switch is detected; when an activation operation is detected, the local resource file is upgraded based on the imported resource file. This can meet the needs of different users and improve the flexibility of resource file upgrades.

[0081] In one embodiment, S202 specifically includes: obtaining the resource file identifier corresponding to the imported resource file; if the local storage area stores a target resource file matching the resource file identifier, determining the target resource file as the local resource file corresponding to the imported resource file; after S202, it further includes: if the local storage area does not store the target resource file, upgrading the local resource file based on the imported resource file.

[0082] The resource file identifier is used to identify the resource file and can be composed of numbers, letters, characters, or special symbols. For example, the resource file identifier can be the resource file's code. When the computer device obtains the resource file identifier corresponding to the imported resource file, it searches for a target resource file in the local storage area that matches the resource file identifier. The identifier of the target resource file must be consistent with the resource file identifier of the imported resource file. If the target resource file can be found, it is identified as the local resource file corresponding to the imported resource file. If the target resource file cannot be found, it means that the local storage area does not store the local resource file corresponding to the imported resource file. Overwriting the local resource file with the imported resource file will not cause the loss of differentiated modifications in the local resource file.

[0083] In the above embodiments, 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. This allows for efficient determination of whether the local resource file can be upgraded, improving the efficiency of resource file upgrades.

[0084] In one embodiment, before S204, the method further includes: when the local resource file does not have a corresponding first source traceability identifier, upgrading the local resource file based on the imported resource file; when the local resource file has a corresponding first source traceability identifier and the imported resource file does not have a corresponding second source traceability identifier, refusing to upgrade the local resource file based on the imported resource file.

[0085] When a local resource file does not have a corresponding first source traceability identifier, meaning its source traceability is empty, it indicates that the local resource file does not contain differentiated modifications. In this case, the local resource file is upgraded based on the imported resource file. Conversely, when a local resource file has a corresponding first source traceability identifier, but the imported resource file does not have a corresponding second source traceability identifier, it means the local resource file has been modified and contains differentiated modifications. However, the imported resource file's second source traceability identifier is empty, indicating it has not been modified and does not contain differentiated modifications. In this situation, upgrading the local resource file using the imported resource file will overwrite the differentiated modifications in the local resource file, potentially causing a normally functioning solution in the resource file to fail or its execution result to change.

[0086] In the above embodiments, when the local resource file does not have a corresponding first source traceability identifier, the local resource file is upgraded based on the imported resource file; when the local resource file has a corresponding first source traceability identifier and the imported resource file does not have a corresponding second source traceability identifier, the upgrade of the local resource file based on the imported resource file is rejected. Therefore, before upgrading the local resource file, it can be determined whether upgrading the local resource file will result in the loss of differentiated modifications based on the first and second source traceability identifiers, and if loss is likely, the upgrade of the local resource file is rejected, ensuring the security of the local resource file.

[0087] In one embodiment, when the imported resource file is obtained, the client identifier corresponding to the client that last modified the imported resource file is queried. If the queried client identifier is not the end of the second source tracing identifier corresponding to the imported resource file, it means that the imported resource file is an illegal file and cannot be used to upgrade the local resource file.

[0088] In one embodiment, such as Figure 3As shown, when a computer device begins an upgrade, it obtains the imported resource file and its corresponding resource file identifier. It then determines whether a target resource file matching the resource file identifier is stored in the current environment. If the local storage area does not store a target resource file matching the resource file identifier, the local resource file is upgraded based on the imported resource file. If the local storage area stores a target resource file matching the resource file identifier, the target resource file is identified as the local resource file, and it is determined whether the first source tracing identifier corresponding to the local resource file is empty. If the first source tracing identifier is empty, the local resource file is upgraded based on the imported resource file. If the first source tracing identifier is not empty, it is determined whether the second source tracing identifier corresponding to the imported resource file is empty. If the second source tracing identifier is empty, the upgrade of the local resource file based on the imported resource file is rejected. If the second source tracing identifier is not empty, it is determined whether the first source tracing identifier is a prefix of the second source tracing identifier. If the first source tracing identifier is not a prefix of the second source tracing identifier, the upgrade of the local resource file based on the imported resource file is rejected. If the first source tracing identifier is a prefix of the second source tracing identifier, determine whether the first source tracing identifier and the second source tracing identifier are equal. If they are equal, upgrade the local resource file based on the imported resource file. If they are not equal, determine whether the second source tracing identifier contains the target client identifier. If the second source tracing identifier does not contain the target client identifier, upgrade the local resource file based on the imported resource file. If the second source tracing identifier contains the target client identifier, detect any activation of the import switch. If an activation of the import switch is detected, upgrade the local resource file based on the imported resource file. If no activation of the import switch is detected, refuse to upgrade the local resource file based on the imported resource file.

[0089] In one embodiment, such as Figure 4 As shown, the resource file upgrade method includes the following steps:

[0090] S402, obtain the imported resource file and the resource file identifier corresponding to the imported resource file.

[0091] S404 If the local storage area stores a target resource file that matches the resource file identifier, the target resource file is determined to be the local resource file corresponding to the imported resource file.

[0092] S406 If the target resource file is not stored in the local storage area, upgrade the local resource file based on the imported resource file.

[0093] S408: When a local resource file does not have a corresponding first source traceability identifier, upgrade the local resource file based on the imported resource file.

[0094] S410: When the local resource file has a corresponding first source traceability identifier and the imported resource file does not have a corresponding second source traceability identifier, the upgrade of the local resource file based on the imported resource file is rejected.

[0095] S412, when the local resource file has a corresponding first source traceability identifier and the imported resource file has a corresponding second source traceability identifier, detect whether the first source traceability identifier is a prefix of the second source traceability identifier.

[0096] S414, If not, refuse to upgrade local resource files based on imported resource files.

[0097] S416, if yes, determine whether the second source traceability identifier is consistent with the first source traceability identifier; when the second source traceability identifier is consistent with the first source traceability identifier, determine that the second source traceability identifier meets the upgrade conditions; upgrade the local resource file based on the imported resource file.

[0098] S418, when the second source tracing identifier is inconsistent with the first source tracing identifier, determine whether the second source tracing identifier contains the target client identifier; and when the second source tracing identifier does not contain the target client identifier, determine that the second source tracing identifier meets the upgrade conditions, and upgrade the local resource file based on the imported resource file.

[0099] S420, if the second source traceability identifier contains the target client identifier, detect the opening operation for the import switch; when the opening operation is detected, upgrade the local resource file based on the imported resource file.

[0100] For details on S402 to S420 above, please refer to the specific implementation process described above.

[0101] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0102] Based on the same inventive concept, this application also provides a resource file upgrade apparatus for implementing the resource file upgrade method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more resource file upgrade apparatus embodiments provided below can be found in the limitations of the resource file upgrade method described above, and will not be repeated here.

[0103] In one embodiment, such as Figure 5 As shown, a resource file upgrade device is provided, including: a determination module 502, a detection module 504, a rejection module 506, and an upgrade module 508, wherein:

[0104] Module 502 is used to obtain the imported resource file and determine the local resource file corresponding to the imported resource file;

[0105] The detection module 504 is used to detect whether the first source traceability identifier is included by the second source traceability identifier when the local resource file has a corresponding first source traceability identifier and the imported resource file has a corresponding second source traceability identifier.

[0106] Reject module 506, used to reject whether or not to upgrade local resource files based on imported resource files;

[0107] Upgrade module 508 is used to upgrade the local resource file based on the imported resource file if, no, it is determined that the second source traceability identifier meets the upgrade conditions.

[0108] In the above embodiments, an imported resource file is obtained, and the corresponding local 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, it is detected whether the first source tracing identifier is contained in the second source tracing identifier. If the first source tracing identifier is not contained in the second source tracing identifier, it indicates that the modification paths of the imported resource file and the local resource file are different, that is, the local resource file contains differentiated modification content relative to the imported resource file. To avoid the imported resource file overwriting the local resource file, upgrading the local resource file based on the imported resource file is rejected. If the first source tracing identifier is contained in the second source tracing identifier, it indicates that the modification paths of the imported resource file and the local resource file may be the same. When it is determined that the second source tracing identifier meets the upgrade conditions, the local resource file is upgraded based on the imported resource file. Thus, before upgrading the local resource file, it can be determined whether upgrading the local resource file will lead to the loss of differentiated modification content based on the first and second source tracing identifiers, and if loss is possible, the upgrade of the local resource file is rejected, ensuring the security of the local resource file.

[0109] In one embodiment, the determining module 502 is further configured to:

[0110] If the second source traceability identifier is consistent with the first source traceability identifier, the second source traceability identifier is determined to meet the upgrade conditions.

[0111] Upgrade local resource files based on imported resource files.

[0112] In one embodiment, the determining module 502 is further configured to:

[0113] If the second source traceability identifier is inconsistent with the first source traceability identifier, determine whether the second source traceability identifier contains the target client identifier;

[0114] If the second source traceability identifier does not contain the target client identifier, it is determined that the second source traceability identifier meets the upgrade conditions, and the local resource file is upgraded based on the imported resource file.

[0115] In one embodiment, the apparatus further includes:

[0116] The detection module 504 is also used to detect the opening operation of the import switch if the second source traceability identifier contains the target client identifier;

[0117] Upgrade module 508 is also used to upgrade local resource files based on imported resource files when an enable operation is detected.

[0118] In one embodiment, the determining module 502 is further configured to:

[0119] Get the resource file identifier corresponding to the imported resource file;

[0120] If the local storage area stores a target resource file that matches the resource file identifier, the target resource file will be identified as the local resource file corresponding to the imported resource file.

[0121] The upgrade module is also used to upgrade local resource files based on imported resource files if the target resource file is not stored in the local storage area.

[0122] In one embodiment, the apparatus further includes:

[0123] Upgrade module 508 is also used to upgrade local resource files based on imported resource files when local resource files do not have a corresponding first source traceability identifier;

[0124] The rejection module 506 is also used to reject upgrading the local resource file based on the imported resource file when the local resource file has a corresponding first source traceability identifier and the imported resource file does not have a corresponding second source traceability identifier.

[0125] Each module in the aforementioned resource file upgrade device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0126] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores resource file upgrade data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a resource file upgrade method.

[0127] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a resource file upgrade method. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0128] Those skilled in the art will understand that Figure 6 , 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0129] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0130] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0131] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0132] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0133] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. 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). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0134] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0135] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for upgrading resource files, characterized in that, The method includes: Obtain the imported resource file and determine the 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 includes: detecting whether the first source tracing identifier is a prefix of the second source tracing identifier; wherein, the first source tracing identifier is an identifier used to trace the modification source of the local resource file, and includes the client identifiers corresponding to each client that has modified the local resource file; the second source tracing identifier is an identifier used to trace the modification source of the imported resource file, and includes the client identifiers corresponding to each client that has modified the imported resource file; If not, refuse to upgrade the local resource file based on the imported resource file; If so, when it is determined that the second source traceability identifier meets the upgrade conditions, the local resource file is upgraded based on the imported resource file.

2. The method according to claim 1, characterized in that, When it is determined that the second source traceability identifier meets the upgrade conditions, upgrading the local resource file based on the imported resource file includes: If the second source traceability identifier is consistent with the first source traceability identifier, it is determined that the second source traceability identifier meets the upgrade conditions; The local resource files are upgraded based on the imported resource files.

3. The method according to claim 1, characterized in that, When it is determined that the second source traceability identifier meets the upgrade conditions, upgrading the local resource file based on the imported resource file includes: If the second source tracing identifier is inconsistent with the first source tracing identifier, determine whether the second source tracing identifier contains the target client identifier; If the second source tracing identifier does not contain the target client identifier, it is determined that the second source tracing identifier meets the upgrade conditions, and the local resource file is upgraded based on the imported resource file.

4. The method according to claim 3, characterized in that, The method further includes: If the second source traceability identifier contains the target client identifier, detect the activation operation of the import switch; When the start operation is detected, the local resource file is upgraded based on the imported resource file.

5. The method according to claim 1, characterized in that, The step of determining the local resource file corresponding to the imported resource file includes: Obtain the resource file identifier corresponding to the imported resource file; If the local storage area stores a target resource file that matches the resource file identifier, the target resource file is determined as the local resource file corresponding to the imported resource file; The method further includes: If the target resource file is not stored in the local storage area, the local resource file is upgraded based on the imported resource file.

6. The method according to claim 1, characterized in that, The method further includes: When the local resource file does not have a corresponding first source traceability identifier, the local resource file is upgraded based on the imported resource file; When the local resource file has a corresponding first source traceability identifier and the imported resource file does not have a corresponding second source traceability identifier, the upgrade of the local resource file based on the imported resource file is rejected.

7. A resource file upgrade device, characterized in that, The device includes: The determination module is used to obtain the imported resource file and determine the local resource file corresponding to the imported resource file; The detection module is configured to detect whether the first source tracing identifier is included in the second source tracing identifier when the local resource file has a corresponding first source tracing identifier and the imported resource file has a corresponding second source tracing identifier. This includes detecting whether the first source tracing identifier is a prefix of the second source tracing identifier. The first source tracing identifier is used to trace the modification source of the local resource file and includes the client identifiers corresponding to each client that modified the local resource file. The second source tracing identifier is used to trace the modification source of the imported resource file and includes the client identifiers corresponding to each client that modified the imported resource file. The rejection module is used to reject any upgrade of the local resource file based on the imported resource file. The upgrade module is used to upgrade the local resource file based on the imported resource file if, no, it is determined that the second source traceability identifier meets the upgrade conditions.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements 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, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data processing method and electronic device

    CN103885798A

  • Information storage method and system capable of tracing information sources

    CN107644103A