Strategy data adjustment method, computer program product, electronic equipment and storage medium

By hashing and marking the policy data and building an index table, dynamic adjustment of the policy data is achieved, solving the problem that the existing technology cannot be adjusted and detected without distinction, and improving detection performance and data security.

CN119719113APending Publication Date: 2025-03-28HUBEI TIANRONGXIN NETWORK SECURITY TECH CO LTD +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411917543.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the prior art, in the process of policy data, undifferentiated adjustment, detection of abnormalities and dynamic adjustments cannot be achieved, resulting in the impact of detection performance and the inability to prevent repeated configurations.

Method used

By hashing the policy data, the hash value is obtained, and the policy data is marked based on the hash value, and an index table is constructed to achieve dynamic adjustment of the marked policy data.

Benefits of technology

It realizes the dynamic adjustment of policy data, improves data utilization, prevents duplicate configuration, improves data security, and expands application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719113A_ABST
    Figure CN119719113A_ABST
Patent Text Reader

Abstract

The invention provides a strategy data adjusting method, a computer program product, electronic equipment and a storage medium, and the method comprises the steps: obtaining strategy data; performing hash processing on the strategy data to obtain a hash value of the strategy data; marking the strategy data according to the hash value to obtain marked strategy data; constructing an index table according to the marked strategy data; and dynamically adjusting the marked strategy data according to the index table. By implementing the method, the policy data can be flexibly and dynamically adjusted, the utilization rate of the policy data is improved, repetition is prevented, the security of the policy data is improved, the application scene of the policy data is expanded, and various use requirements are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method for adjusting policy data, a computer program product, an electronic device, and a storage medium. Background Art

[0002] With the continuous development of Internet technology, the amount of data is growing rapidly, and the policy configuration of the network data leakage prevention system is becoming more and more complicated, resulting in an increase in the amount of policy data and an increase in the possibility of repeated configuration of policy data. Configuring repeated policies will affect detection performance. Therefore, it is necessary to adjust the policy data to improve data processing capabilities and meet detection needs in different scenarios.

[0003] The existing technical methods rely on application scenarios in the process of processing data. Therefore, the applicable scenarios are limited, the data cannot be adjusted indiscriminately, anomalies in policy data cannot be detected, and dynamic adjustment of data, such as addition, deletion, query and modification, cannot be achieved, and data leakage and duplication prevention cannot be achieved. Summary of the invention

[0004] The purpose of this application is to provide a policy data adjustment method, computer program product, electronic device and storage medium, which can flexibly and dynamically adjust policy data, improve the utilization rate of policy data, prevent duplication, improve the security of policy data, expand the application scenarios of policy data, and meet various usage needs.

[0005] In a first aspect, an embodiment of the present application provides a method for adjusting policy data, the method comprising:

[0006] Get policy data;

[0007] Performing hash processing on the policy data to obtain a hash value of the policy data;

[0008] Marking the policy data according to the Hash value to obtain marked policy data;

[0009] Building an index table according to the marked policy data;

[0010] The marked policy data is dynamically adjusted according to the index table.

[0011] In the above implementation process, the policy data is marked according to the hash value, and the marked policy data is dynamically adjusted according to the constructed index table. The policy data can be flexibly adjusted dynamically, the utilization rate of the policy data is improved, duplication is prevented, the security of the policy data is improved, the application scenarios of the policy data are expanded, and various usage requirements are met.

[0012] Furthermore, the step of marking the policy data according to the Hash value to obtain the marked policy data includes:

[0013] De-duplicate and compare the hash values ​​to obtain the policy ID corresponding to each hash value;

[0014] Determine whether there is an identical hash value;

[0015] If so, mark the multiple policy IDs corresponding to the hash value to obtain the marked policy data.

[0016] In the above implementation process, the hash values ​​are deduplicated and compared, and multiple duplicate policy IDs are marked, so that the duplicate policy IDs can be quickly extracted, making the policy data clearer and improving the utilization rate of the policy data.

[0017] Furthermore, the step of constructing an index table according to the marked policy data includes:

[0018] Removing the policy data corresponding to the marked policy ID from the marked policy data to obtain deduplicated policy data;

[0019] The index table is constructed according to the hash value of the deduplicated policy data.

[0020] In the above implementation process, an index table is constructed based on the hash value of the policy data without the policy data corresponding to the marked policy ID, so that there will be no duplication in the index table, which can improve the utilization of the index table and further improve the indexing efficiency.

[0021] Furthermore, the step of dynamically adjusting the marked policy data according to the index table includes:

[0022] Obtain dynamically updated policy data;

[0023] Comparing the dynamically updated policy data with the marked policy data to obtain policy differences;

[0024] The marked policy data is adjusted according to the index table and the policy difference.

[0025] In the above implementation process, the marked policy data is adjusted according to the policy differences, which can improve the adjustment efficiency, improve the accuracy of the policy data, reduce errors in the adjustment process, and avoid duplicate policy data.

[0026] Furthermore, the step of adjusting the marked policy data according to the index table and the policy difference includes:

[0027] If the policy difference is a policy increase, the marked policy data is increased and adjusted according to the index table;

[0028] If the policy difference is policy deletion, the marked policy data is deleted and adjusted according to the index table.

[0029] In the above implementation process, the marked policy data is added or deleted according to different policy differences, so as to facilitate timely addition or deletion of policy data, improve the processing efficiency of policy data, and simplify the marked policy data.

[0030] Furthermore, the step of adding and adjusting the marked policy data according to the index table includes:

[0031] Get the hash value of the increase strategy;

[0032] Compare the hash value of the added strategy with the index table to determine whether there are duplicate hash values;

[0033] If there are duplicate hash values, the additional policy is added to the marked policy data and the policy ID is re-marked;

[0034] If there is no duplicate hash value, the hash value corresponding to the added policy is added to the index table, and the policy ID corresponding to the added policy is added to the marked policy data.

[0035] In the above implementation process, the index table and the marked policy data are adjusted according to the hash value of the added policy, so that the policy data can be expanded and the application scope of the policy data can be expanded to avoid the use of the policy data being limited by the application scenario.

[0036] Furthermore, the step of deleting and adjusting the marked policy data according to the index table includes:

[0037] Search the index table according to the policy ID of the deletion policy to determine whether the hash value of the deletion policy corresponds to only one policy ID;

[0038] If so, delete the hash value corresponding to the deleted policy in the index table, and delete the policy ID corresponding to the deleted policy in the marked policy data;

[0039] If not, the policy ID corresponding to the policy is deleted from the marked policy data.

[0040] In the above implementation process, the index table and the marked policy data are adjusted according to the hash value of the deletion policy, so as to avoid duplicate hash values ​​in the index table and avoid the influence of duplicate policy data on the data index.

[0041] In a second aspect, an embodiment of the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method as described in any one of the first aspects.

[0042] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the first aspects when executing the computer program.

[0043] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer executes the method as described in any one of the first aspects.

[0044] In a fifth aspect, an embodiment of the present application further provides a device for adjusting policy data, the device comprising:

[0045] An acquisition module, used to obtain policy data;

[0046] A hash processing module, used to perform hash processing on the policy data to obtain a hash value of the policy data;

[0047] A marking module, used for marking the policy data according to the hash value to obtain the marked policy data;

[0048] A construction module, used to construct an index table according to the marked policy data;

[0049] An adjustment module is used to dynamically adjust the marked policy data according to the index table.

[0050] In the above implementation process, the policy data is marked according to the hash value, and the marked policy data is dynamically adjusted according to the constructed index table. The policy data can be flexibly adjusted dynamically, the utilization rate of the policy data is improved, duplication is prevented, the security of the policy data is improved, the application scenarios of the policy data are expanded, and various usage requirements are met.

[0051] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.

[0052] And it can be implemented according to the contents of the specification. The following is a detailed description of the preferred embodiments of the present application with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the range values. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0054] Figure 1 A flowchart of a method for adjusting policy data provided in an embodiment of the present application;

[0055] Figure 2 A schematic diagram of the structure of a device for adjusting policy data provided in an embodiment of the present application;

[0056] Figure 3 A schematic diagram of the structural composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0058] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0059] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application, but are not used to limit the scope of the present application.

[0060] Embodiment 1

[0061] Figure 1 is a flow chart of a method for adjusting policy data provided in an embodiment of the present application, such as Figure 1 As shown, the method includes:

[0062] S1, obtain strategy data;

[0063] S2, performing hash processing on the policy data to obtain a hash value of the policy data;

[0064] S3, marking the policy data according to the hash value to obtain the marked policy data;

[0065] S4, constructing an index table based on the marked strategy data;

[0066] S5, dynamically adjust the marked policy data according to the index table.

[0067] In the above implementation process, the policy data is marked according to the hash value, and the marked policy data is dynamically adjusted according to the constructed index table. The policy data can be flexibly adjusted dynamically, the utilization rate of the policy data is improved, duplication is prevented, the security of the policy data is improved, the application scenarios of the policy data are expanded, and various usage requirements are met.

[0068] The present application provides a method for adjusting policy data, which can realize multiple ways of adjustment such as deduplication, addition, deletion, query and modification of policy data. The embodiment of the present application can dynamically deduplicate multiple policy data and perform regular verification.

[0069] In S1 and S2, the policy data on the device is read and a strong hash algorithm is used for the policy data. The embodiment of the present application selects a suitable hash algorithm (for example: SHA-256) for hash processing to obtain a data fingerprint (hash value) of each policy data.

[0070] Furthermore, S3 includes:

[0071] De-duplicate and compare the hash values ​​to obtain the policy ID corresponding to each hash value;

[0072] Determine whether there is an identical hash value;

[0073] If so, mark the multiple policy IDs corresponding to the hash value to obtain marked policy data.

[0074] In the above implementation process, the hash values ​​are deduplicated and compared, and multiple duplicate policy IDs are marked, so that the duplicate policy IDs can be quickly extracted, making the policy data clearer and improving the utilization rate of the policy data.

[0075] De-duplicate the hash values ​​and record the policy ID corresponding to each hash value. If there are duplicate hash values, you need to save multiple policy IDs corresponding to the hash value. And mark the duplicate policy IDs.

[0076] Furthermore, S4 includes:

[0077] Remove the policy data corresponding to the marked policy ID from the marked policy data to obtain deduplicated policy data;

[0078] Build an index table based on the hash value of the deduplicated policy data.

[0079] In the above implementation process, an index table is constructed based on the hash value of the policy data without the policy data corresponding to the marked policy ID, so that there will be no duplication in the index table, which can improve the utilization of the index table and further improve the indexing efficiency.

[0080] After removing the policy data corresponding to the marked policy ID, an index table is established using the hash values ​​of all the policy data after deduplication. Optionally, the index table can be a database table, or a hash table, or other data structure that can query hash values ​​at high speed.

[0081] Furthermore, S5 includes:

[0082] Obtain dynamically updated policy data;

[0083] Compare the dynamically updated policy data with the marked policy data to obtain policy differences;

[0084] The marked policy data is adjusted according to the index table and policy differences.

[0085] In the above implementation process, the marked policy data is adjusted according to the policy differences, which can improve the adjustment efficiency, improve the accuracy of the policy data, reduce errors in the adjustment process, and avoid duplicate policy data.

[0086] Furthermore, the step of adjusting the marked policy data according to the index table and the policy difference includes:

[0087] If the policy difference is a policy increase, the marked policy data is increased and adjusted according to the index table;

[0088] If the policy difference is policy deletion, the marked policy data is deleted and adjusted according to the index table.

[0089] In the above implementation process, the marked policy data is added or deleted according to different policy differences, so as to facilitate timely addition or deletion of policy data, improve the processing efficiency of policy data, and simplify the marked policy data.

[0090] Furthermore, the step of adding and adjusting the marked policy data according to the index table includes:

[0091] Get the hash value of the increase strategy;

[0092] Compare the hash value of the added policy with the index table to determine whether there are duplicate hash values;

[0093] If there are duplicate hash values, the additional policy will be added to the marked policy data and the policy ID will be re-marked;

[0094] If there is no duplicate hash value, the hash value corresponding to the added policy is added to the index table, and the policy ID corresponding to the added policy is added to the marked policy data.

[0095] In the above implementation process, the index table and the marked policy data are adjusted according to the hash value of the added policy, so that the policy data can be expanded and the application scope of the policy data can be expanded to avoid the use of the policy data being limited by the application scenario.

[0096] If the policy data increases and the policy difference is a policy increase, the hash value of the policy data is calculated and compared with the index table. If there is a duplicate hash value, this hash value is not added to the index table, and the marked policy data is modified, and the policy ID of the hash value corresponding to the policy data is added to the marked policy data; if there is no duplicate hash value, this hash value is added to the index table, and the marked policy data is modified, and the policy ID of the hash value corresponding to the policy data is added to the marked policy data.

[0097] Furthermore, the step of deleting and adjusting the marked policy data according to the index table includes:

[0098] Search the index table according to the policy ID of the deletion policy to determine whether the hash value of the deletion policy corresponds to only one policy ID;

[0099] If so, delete the hash value corresponding to the deleted policy in the index table, and delete the policy ID corresponding to the deleted policy in the marked policy data;

[0100] If not, the policy ID corresponding to the policy is deleted from the marked policy data.

[0101] In the above implementation process, the index table and the marked policy data are adjusted according to the hash value of the deletion policy, so as to avoid duplicate hash values ​​in the index table and avoid the influence of duplicate policy data on the data index.

[0102] If the policy data is deleted and the policy difference is policy deletion, then the hash value corresponding to the policy ID of the policy data is searched from the marked policy data. If the hash value corresponds to only one policy data, then the policy data is deleted from the index table and the marked policy data; if the hash value corresponds to multiple policy IDs, then only the policy ID is deleted from the index table.

[0103] In addition, the policy differences of the present application also include policy updates. That is, if the policy data is updated, the hash value corresponding to the policy ID of the updated policy data is searched from the marked policy data. If the hash value corresponds to only one policy data, the updated policy data is deleted from the index table and the marked policy data; if the hash value corresponds to multiple policy IDs, only the policy ID is deleted from the index table.

[0104] Then compare the hash value of the updated policy data with the index table. If there is a duplicate hash value, this hash value will not be added to the index table, and the marked policy data will be modified, and the policy ID of the hash value corresponding to the updated policy data will be added to the marked policy data; if there is no duplicate hash value, this hash value will be added to the index table, and the marked policy data will be modified, and the policy ID of the hash value corresponding to the updated policy data will be added to the marked policy data.

[0105] The adjustment method of the embodiment of the present application can regularly audit the index table to ensure the integrity and security of the data, and evaluate the hash algorithm to ensure security and applicability.

[0106] The embodiments of the present application can be applied to an anti-leakage system based on network data, and can also be used to optimize the detection process and improve detection performance. For example, after the system is configured with policy data, the policy data deduplication script is called to execute the deduplication method to generate an index table and a policy data file corresponding to the hash value and the policy ID. Before the system loads the policy data, the present application first reads the policy data file corresponding to the hash value and the policy ID, and only loads the first policy data corresponding to each hash value. After the detection, it is queried whether the policy ID of the violation shares the same hash value with other policy data. If so, other policy data with the same hash value are also in violation. If not, only the policy data is in violation, and a corresponding violation event is generated based on the above detection results.

[0107] The embodiment of the present application supports deduplication detection of policy data, reduces repeated detection of the same configuration policy, improves performance, and can prompt users of repeated policy configurations to reduce redundant configurations.

[0108] Embodiment 2

[0109] An embodiment of the present application provides a computer program product. When the computer program product is run on a computer, the computer executes any method of the first embodiment.

[0110] Embodiment 3

[0111] In order to execute the method corresponding to the above embodiment 1 to achieve the corresponding functions and technical effects, a device for adjusting policy data is provided below, such as Figure 2 As shown, the device comprises:

[0112] Acquisition module 1, used for acquiring strategy data;

[0113] Hash processing module 2, used for performing hash processing on the policy data to obtain a hash value of the policy data;

[0114] A marking module 3 is used to mark the policy data according to the hash value to obtain the marked policy data;

[0115] Construction module 4, used to construct an index table according to the marked policy data;

[0116] The adjustment module 5 is used to dynamically adjust the marked policy data according to the index table.

[0117] In the above implementation process, the policy data is marked according to the hash value, and the marked policy data is dynamically adjusted according to the constructed index table. The policy data can be flexibly adjusted dynamically, the utilization rate of the policy data is improved, duplication is prevented, the security of the policy data is improved, the application scenarios of the policy data are expanded, and various usage requirements are met.

[0118] Furthermore, the marking module 3 is also used for:

[0119] De-duplicate and compare the hash values ​​to obtain the policy ID corresponding to each hash value;

[0120] Determine whether there is an identical hash value;

[0121] If so, mark the multiple policy IDs corresponding to the hash value to obtain marked policy data.

[0122] In the above implementation process, the hash values ​​are deduplicated and compared, and multiple duplicate policy IDs are marked, so that the duplicate policy IDs can be quickly extracted, making the policy data clearer and improving the utilization rate of the policy data.

[0123] Furthermore, the building block 4 is also used for:

[0124] Remove the policy data corresponding to the marked policy ID from the marked policy data to obtain deduplicated policy data;

[0125] Build an index table based on the hash value of the deduplicated policy data.

[0126] In the above implementation process, an index table is constructed based on the hash value of the policy data without the policy data corresponding to the marked policy ID, so that there will be no duplication in the index table, which can improve the utilization of the index table and further improve the indexing efficiency.

[0127] Furthermore, the adjustment module 5 is also used for:

[0128] Obtain dynamically updated policy data;

[0129] Compare the dynamically updated policy data with the marked policy data to obtain policy differences;

[0130] The marked policy data is adjusted according to the index table and policy differences.

[0131] In the above implementation process, the marked policy data is adjusted according to the policy differences, which can improve the adjustment efficiency, improve the accuracy of the policy data, reduce errors in the adjustment process, and avoid duplicate policy data.

[0132] Furthermore, the adjustment module 5 is also used for:

[0133] If the policy difference is a policy increase, the marked policy data is increased and adjusted according to the index table;

[0134] If the policy difference is policy deletion, the marked policy data is deleted and adjusted according to the index table.

[0135] In the above implementation process, the marked policy data is added or deleted according to different policy differences, so as to facilitate timely addition or deletion of policy data, improve the processing efficiency of policy data, and simplify the marked policy data.

[0136] Furthermore, the adjustment module 5 is also used for:

[0137] Get the hash value of the increase strategy;

[0138] Compare the hash value of the added policy with the index table to determine whether there are duplicate hash values;

[0139] If there are duplicate hash values, the additional policy will be added to the marked policy data and the policy ID will be re-marked;

[0140] If there is no duplicate hash value, the hash value corresponding to the added policy is added to the index table, and the policy ID corresponding to the added policy is added to the marked policy data.

[0141] In the above implementation process, the index table and the marked policy data are adjusted according to the hash value of the added policy, so that the policy data can be expanded and the application scope of the policy data can be expanded to avoid the use of the policy data being limited by the application scenario.

[0142] Furthermore, the adjustment module 5 is also used for:

[0143] Search the index table according to the policy ID of the deletion policy to determine whether the hash value of the deletion policy corresponds to only one policy ID;

[0144] If so, delete the hash value corresponding to the deleted policy in the index table, and delete the policy ID corresponding to the deleted policy in the marked policy data;

[0145] If not, the policy ID corresponding to the policy is deleted from the marked policy data.

[0146] In the above implementation process, the index table and the marked policy data are adjusted according to the hash value of the deletion policy, so as to avoid duplicate hash values ​​in the index table and avoid the influence of duplicate policy data on the data index.

[0147] The above-mentioned device for adjusting policy data can implement the method of the above-mentioned embodiment 1. The options in the above-mentioned embodiment 1 are also applicable to this embodiment and will not be described in detail here.

[0148] The rest of the contents of the embodiments of the present application can refer to the contents of the above-mentioned embodiment 1, and will not be repeated in this embodiment.

[0149] Embodiment 4

[0150] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the policy data adjustment method of the first embodiment.

[0151] Optionally, the above-mentioned electronic device may be a server.

[0152] See also Figure 3 , Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 31, a communication interface 32, a memory 33 and at least one communication bus 34. The communication bus 34 is used to realize direct connection and communication between these components. The communication interface 32 of the device in the embodiment of the present application is used to communicate signaling or data with other node devices. The processor 31 may be an integrated circuit chip with signal processing capabilities.

[0153] The processor 31 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor 31 can also be any conventional processor, etc.

[0154] The memory 33 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory 33 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 31, the device can execute the above-mentioned Figure 1 The method embodiment involves various steps.

[0155] Optionally, the electronic device may further include a storage controller and an input / output unit. The memory 33, the storage controller, the processor 31, the peripheral interface, and the input / output unit are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via a communication bus 34. The processor 31 is used to execute executable modules stored in the memory 33, such as software function modules or computer programs included in the device.

[0156] The input and output unit is used to provide users with the task creation and to create a start optional time period or preset execution time for the task to realize the interaction between the user and the server. The input and output unit can be, but is not limited to, a mouse and a keyboard.

[0157] Understandably, Figure 3 The structure shown is for illustration only. The electronic device may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown. Figure 3 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0158] In addition, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the policy data adjustment method of the first embodiment when executed by a processor.

[0159] The embodiment of the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the method described in the method embodiment.

[0160] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart, can be implemented with a dedicated hardware-based device that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0161] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0162] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0163] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0164] The above is only a specific implementation of the present application, but the protection range of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical range disclosed in the present application, which should be included in the protection range of the present application. Therefore, the protection range of the present application should be based on the protection range of the claims.

[0165] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A method for adjusting strategy data, characterized in that: The method comprises: Get policy data; Performing hash processing on the policy data to obtain a hash value of the policy data; Marking the policy data according to the Hash value to obtain marked policy data; Building an index table according to the marked policy data; The marked policy data is dynamically adjusted according to the index table.

2. The method for adjusting policy data according to claim 1, characterized in that: The step of marking the policy data according to the Hash value to obtain the marked policy data includes: De-duplicate and compare the hash values ​​to obtain the policy ID corresponding to each hash value; Determine whether there is an identical hash value; If so, mark the multiple policy IDs corresponding to the hash value to obtain the marked policy data.

3. The method for adjusting policy data according to claim 1, characterized in that: The step of constructing an index table according to the marked policy data includes: Removing the policy data corresponding to the marked policy ID from the marked policy data to obtain deduplicated policy data; The index table is constructed according to the hash value of the deduplicated policy data.

4. The method for adjusting policy data according to claim 1, characterized in that: The step of dynamically adjusting the marked policy data according to the index table includes: Obtain dynamically updated policy data; Comparing the dynamically updated policy data with the marked policy data to obtain policy differences; The marked policy data is adjusted according to the index table and the policy difference.

5. The method for adjusting policy data according to claim 4, characterized in that: The step of adjusting the marked policy data according to the index table and the policy difference comprises: If the policy difference is a policy increase, the marked policy data is increased and adjusted according to the index table; If the policy difference is policy deletion, the marked policy data is deleted and adjusted according to the index table.

6. The method for adjusting policy data according to claim 5, characterized in that: The step of adding and adjusting the marked policy data according to the index table includes: Get the hash value of the increase strategy; Compare the hash value of the added strategy with the index table to determine whether there are duplicate hash values; If there are duplicate hash values, the additional policy is added to the marked policy data and the policy ID is re-marked; If there is no duplicate hash value, the hash value corresponding to the added policy is added to the index table, and the policy ID corresponding to the added policy is added to the marked policy data.

7. The method for adjusting policy data according to claim 6, characterized in that: The step of deleting and adjusting the marked policy data according to the index table includes: Search the index table according to the policy ID of the deletion policy to determine whether the hash value of the deletion policy corresponds to only one policy ID; If so, delete the hash value corresponding to the deleted policy in the index table, and delete the policy ID corresponding to the deleted policy in the marked policy data; If not, the policy ID corresponding to the policy is deleted from the marked policy data.

8. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is enabled to perform the method according to any one of claims 1 to 7.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the method for adjusting policy data according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The computer program is stored therein, and when the computer program is executed by a processor, the method for adjusting the policy data according to any one of claims 1 to 7 is implemented.