Data classification caching method and device, equipment, storage medium and program product
By introducing category identifiers and a two-level key-value pattern into mobile applications, the problems of scattered cache management and cumbersome operations are solved, achieving efficient maintenance and data consistency of cached data, and reducing operational complexity and maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-22
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, mobile application data caching management lacks a classification mechanism, resulting in fragmented caching management, cumbersome operations, difficulty in meeting the needs of efficient maintenance, and easy to cause data residue or business logic errors.
By introducing category identifiers, a mapping relationship between cached data and business scenarios is established. The cached data is stored as a collection of key-value pairs and processed in batches under the target business scenario. A two-level key-value pattern is used for cache management.
It realizes logical aggregation and batch clearing of cached data, reduces operational complexity and maintenance costs, reduces the risk of data residue, and improves the efficiency of clearing operations and data consistency.
Smart Images

Figure CN121833848A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of information security and financial technology, and in particular to a data classification caching method and device, equipment, a storage medium and a program product. BACKGROUND
[0002] In the development of mobile Internet applications, mobile applications need to frequently process user interaction data, business logic parameters and temporary cache information. The management of data caching directly affects user experience, data security and development efficiency. In mobile application programs, user interaction behavior generates a large amount of temporary cache data, which needs to be cleared at different time points according to business needs.
[0003] In the prior art, the data caching of mobile application programs usually adopts a single-layer key-value pair storage mode, that is, each cache parameter is independently stored as a key-value pair, and no classification management mechanism is introduced. All parameters are stored in independent key-value pairs, which causes developers to operate key-value pairs one by one when maintaining the cache. In addition, with the expansion of business scenarios, the classification requirements of the cache are increasingly complex. The prior art lacks a classification management mechanism for the cache, making it difficult to meet the fine control requirements, resulting in scattered cache management, cumbersome operation and easy omission, and failing to meet the efficient maintenance requirements. SUMMARY
[0004] The present application provides a data classification caching method, device, equipment, storage medium and program product to solve the technical problem that the cache management is scattered, the operation is cumbersome and easy to miss in the prior art, and the efficient maintenance requirements cannot be met.
[0005] In a first aspect, the present application provides a data classification caching method, comprising:
[0006] obtaining business requirements;
[0007] determining the classification identifier corresponding to the cache data according to the business requirements, and establishing a mapping relationship between the classification identifier and the cache data;
[0008] storing the cache data corresponding to the classification identifier as a key-value pair set based on the classification identifier and the mapping relationship;
[0009] In a target business scenario, the key-value pair set is processed in batches according to the classification identifier.
[0010] In a second aspect, the present application provides a data classification caching device, comprising:
[0011] an obtaining module configured to obtain business requirements;
[0012] a determining module configured to determine the classification identifier corresponding to the cache data according to the business requirements, and establish a mapping relationship between the classification identifier and the cache data;
[0013] a storage module, configured to store the cache data corresponding to the classification identifier as a key-value pair set based on the classification identifier and the mapping relationship;
[0014] a processing module, configured to perform corresponding batch processing on the key-value pair set according to the classification identifier under a target service scenario.
[0015] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory in communication connection with the processor;
[0016] The memory stores computer execution instructions;
[0017] The processor executes the computer execution instructions stored in the memory to implement the method of any one of the first aspect.
[0018] In a fourth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method of any one of the first aspect.
[0019] In a fifth aspect, the present application provides a computer program product, comprising a computer program, wherein the computer program is executed by the processor to implement the method of any one of the first aspect.
[0020] The data classification cache method, device, equipment, storage medium and program product provided by the present application realize logical aggregation and batch clearing of cache data through the hierarchical structure of classification identifier, solve the problems of complicated operation, high maintenance cost and data consistency risk caused by insufficient cache classification management in the prior art. The introduction of classification identifier directly binds cache data and service scenarios, without the need to process independent key-value pairs one by one, avoiding the complex operation of manually clearing multiple independent key-value pairs in the traditional scheme, significantly reducing the operation complexity. In addition, the design of classification identifier supports on-demand expansion, without the need to restructure the existing storage logic, thereby reducing the maintenance cost. Through the aggregated storage of key-value pair set, the problem of scattered storage of cache data is reduced, the execution efficiency of the clearing operation is improved, and the risk of data residue or business logic error caused by omitted clearing operation is reduced. BRIEF DESCRIPTION OF DRAWINGS
[0021] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the application.
[0022] Figure 1 A schematic diagram of an application program parameter cache;
[0023] Figure 2 A flowchart of a data classification cache method provided by an embodiment of the present application;
[0024] Figure 3 A structural schematic diagram of a data classification caching device provided by an embodiment of the present application is shown in the figure.
[0025] Figure 4 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in the figure.
[0026] The specific embodiments of the present application have been shown in the above figures, and will be described in more detail hereinafter. These figures and the written description are not intended to limit the scope of the present application in any way, but to illustrate the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0027] The exemplary embodiments will be described in detail herein with reference to the attached drawings. Unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements. The following detailed description does not, therefore, limit the scope of the application, but the concept of the present application is set forth in the appended claims.
[0028] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards of relevant countries and regions, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user to choose authorization or refusal.
[0029] And the present application involves big data analysis of user information (including but not limited to personal biological characteristics, identity data, consumption data, asset data, electronic terminal operation data, etc.), and uses artificial intelligence technology for automatic decision-making, and provides a corresponding operation portal for the user to choose to agree or refuse the automatic decision-making result based on the automatic decision-making result to make a decision that has a significant impact on personal rights and interests; if the user chooses to refuse, the expert decision-making process is entered.
[0030] It should be noted that the data classification caching method, device, equipment, storage medium and program product provided by the present application can be used in the field of information security and financial technology, and can also be used in any field other than information security and financial technology. The application field of the data classification caching method, device, equipment, storage medium and program product in the present application is not limited.
[0031] The specific application scenario of the present application is the scenario of mobile Internet application development. In mobile Internet application development, the mobile terminal application program needs to frequently process user interaction data, business logic parameters and temporary cache information. For example, the business of a bank application program needs to dynamically generate and store parameters according to user behavior, the scan function needs to cache the scan results to support subsequent processing, and the third-party jump scenario needs to record the jump context information. In these scenarios, the management of data caching directly affects user experience, data security and development efficiency. In the prior art, the data caching of the mobile terminal APP usually adopts a single-layer key-value storage mode, that is, each cache parameter is independently stored as a key-value pair, and no classification management mechanism is introduced. Taking a bank application program as an example, Figure 1 An application program parameter cache diagram is shown in Figure 1 In the bank application program, the cache parameters of business A can be stored as independent key-value pairs such as key_ad1-value1, key_ad2-value2, and the cache parameters of the scan function are stored as key_scan1-value1, key_scan2-value2, and the like. When clearing the cache, the developer needs to operate each independent key-value pair one by one, for example, manually clearing all key-value pairs related to "this start" when the application program restarts, or manually clearing the key-value pairs related to "the last scan" before scanning the code.
[0032] Therefore, the existing application program cache mode has the following defects: 1. Information management is scattered: all cache parameters are independently stored, and there is a lack of unified classification logic, resulting in chaotic cache data management. 2. Operation is complicated and prone to errors: in scenarios that require batch clearing of cache (such as APP restart, before scanning, third-party jump, etc.), the developer needs to locate and clear the related key-value pairs one by one, which is complex and prone to omission, which may cause data residue or logic errors. 3. Poor scalability: when new cache classification requirements are added (such as adding "cross-platform jump cache"), the key-value pair naming rules need to be redesigned, there is a lack of flexible classification management capability, and the storage logic of a large number of independent key-value pairs needs to be modified, the development and maintenance cost is significantly increased. 4. Data consistency risk: due to the lack of unified classification management, the developer may misoperate or miss critical parameters when clearing the cache, resulting in data residue or business logic errors.
[0033] The data classification caching method, device, equipment, storage medium and program product provided by the present application determine the classification identifier according to the business requirement, and establish the mapping relationship between the classification identifier and the cache data; the cache data is divided into a "classification identifier-key value pair set" structure and stored under the corresponding classification identifier. In the target business scenario, the key-value pair set is located according to the classification identifier, and batch processing is performed, aiming to solve the above technical problems of the prior art.
[0034] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes can not be described again in some examples. The embodiments of the present application will be described below with reference to the drawings.
[0035] Figure 2 A flowchart of a data classification caching method provided by an embodiment of the present application is shown in FIG. 1, which includes the following steps. Figure 2
[0036] S201, obtaining a business requirement.
[0037] In an example, a parameter set that needs to be cached in a business scenario can be obtained, and the parameter set can be generated through business logic or user interaction behavior. The business requirement can include a specific context for triggering a cache clearing operation, such as application APP restart or before scanning a code.
[0038] S202, determining a classification identifier corresponding to the cached data according to the business requirement, and establishing a mapping relationship between the classification identifier and the cached data.
[0039] In an example, according to the business requirement, a classification identifier (such as A, B, and C) corresponding to the cached data involved in the business scenario can be defined, and a unique classification key key can be allocated to each classification identifier. For example, in a bank application, A-class cache corresponds to “parameters that need to be cleared when the APP restarts”, B-class cache corresponds to “parameters that need to be cleared before scanning a code”, and C-class cache corresponds to “parameters that need to be cleared in a third-party jump scenario”. The classification keys are KeyA, KeyB, and KeyC respectively. A mapping relationship table of the classification keys and the business scenario is generated, for example, KeyA → A-class cache, KeyB → B-class cache, and KeyC → C-class cache. The classification identifier is used as a unique key for identifying cache classification.
[0040] S203, storing the cached data corresponding to the classification identifier as a key-value pair set based on the classification identifier and the mapping relationship.
[0041] In an example, each classification identifier corresponds to a parameter stored in a dictionary format (including a set of sub-key value pairs, etc.), and is associated with the classification identifier. For example, the classification KeyA stores parameters para1:1, para2:2, forming a dictionary ValueA = { "para1": "1", "para2": "2"}; the classification KeyB stores a parameter scan_result:QR123, forming a dictionary ValueB = { "scan_result": "QR123"}. Wherein the dictionary format is used to represent the storage structure of the set of key value pairs, for example { "para1": "1", "para2": "2"}.
[0042] S204, in the target business scenario, according to the classification identifier, the set of key value pairs is processed in batches.
[0043] In an example, taking the target business scenario as an example of the business scenario triggering the cache clearing operation, the corresponding set of key value pairs is located according to the classification identifier (such as KeyA), and the batch clearing operation (such as emptying { "para1": "1", "para2": "2"}) is executed. The target business scenario triggering the cache clearing operation can include but is not limited to APP restart, before scanning, detecting third party jump event, etc.
[0044] In the embodiments of the present application, by the implementation scheme of APP data classification cache, the two-level key-value mode is adopted for classification management of the cache, so that the cache data clearing in the development process is more convenient. Specifically, it can include: a. Cache data classification: according to the business requirements, the cache parameters are classified according to the emptying opportunity. For example, some parameters are only valid at this APP startup, and the next startup needs to be cleared (hereinafter referred to as A class); the parameter cache for two-dimensional code scanning in the scan function needs to be cleared before the next scan to prevent dirty data from causing errors (hereinafter referred to as B class); the parameter cache for third-party jump needs to be cleared in advance when the third-party jump scene is identified (hereinafter referred to as C class), etc. The A, B, and C three types of data correspond to the classification data in different scenarios, and can also be extended according to the actual scene. b. Classification definition and implementation: each type of data is defined according to the corresponding key-value: KeyA-ValueA, KeyB-ValueB, KeyC-ValueC, etc. Among them, the value value in each key-value pair is a dictionary format, that is, the specific parameters under the classification identifier are stored in the format of key-value. For example, the parameters that need to be cleared when the APP starts again under classification A, "para1": "1", "para2": "2", "para3": "3", etc. The key-value pair is stored in the ValueA dictionary, and the value corresponding to the specific key is obtained according to the ValueA corresponding to the KeyA. C. Management of classified storage: taking the operation of clearing the cache parameters in the target business scenario as an example, when the APP runs to the target business scenario, the value dictionary corresponding to the key in the target business scenario is cleared, that is, the cache data can be cleared in batches without the need for individual operation of each actual key-value.
[0045] The data classification cache method provided in the embodiments realizes logical aggregation and batch clearing of cache data through the hierarchical structure of classification identifiers, solves the problems of cumbersome operation, high maintenance cost and data consistency risk caused by the insufficient cache classification management in the prior art. The introduction of classification identifiers directly binds the cache data to the business scenario, without the need to process each independent key-value pair one by one, avoiding the complex operation of manually clearing multiple independent key-value pairs in the traditional scheme, and significantly reducing the operation complexity. In addition, the design of classification identifiers supports on-demand expansion without the need to restructure the existing storage logic, thereby reducing the maintenance cost. Through the aggregated storage of key-value pairs, the problem of scattered storage of cache data is reduced, the execution efficiency of the clearing operation is improved, and the risk of data residue or business logic error caused by omitted clearing operation is reduced.
[0046] Optionally, the cache data corresponding to the classification identifier is stored as a set of key-value pairs, including: storing the cache data corresponding to each classification identifier in a dictionary format, the dictionary format containing a plurality of sub-key-value pairs, each sub-key-value pair including a data identifier and a value corresponding to the data identifier.
[0047] In an example, the dictionary format is used to represent the storage structure of the set of key-value pairs, such as { "para1": "1", "para2": "2"}. The sub-key-value pair is used to represent a single key-value pair in the dictionary format, such as "para1": "1". The data identifier is used to represent the key in the sub-key-value pair, which is used to identify the cache parameter, such as para1. The value corresponding to the data identifier is used to represent the value in the sub-key-value pair, which represents the specific content of the cache parameter, such as 1.
[0048] For example, the cache data para1:1, para2:2 corresponding to the classification KeyA is stored as a dictionary { "para1": "1", "para2": "2"}. The dictionary format aggregates multiple sub-key-value pairs into a logical unit, each sub-key-value pair consisting of a data identifier (such as para1) and a value (such as 1). Through the storage method of the dictionary format, the cache data under the same classification identifier is centrally managed, providing a data basis for subsequent batch cleanup operations.
[0049] Through the storage method of the dictionary format, the logical aggregation and centralized management of cache data are achieved. The dictionary format stores multiple sub-key-value pairs under the same classification identifier as a set, avoiding the problem of dispersed storage of independent key-value pairs in traditional schemes. Not only does it reduce the complexity of maintaining cache data, but it also improves the execution efficiency of batch cleanup operations, eliminating the need to process independent key-value pairs one by one, thereby significantly reducing the operational burden on developers and reducing the risk of missing cleanup operations.
[0050] Optionally, after determining the classification identifier corresponding to the cache data according to the business requirements, the method further includes: dynamically extending the classification identifier according to the change of the business requirements to adapt to the changed business requirements.
[0051] In an example, the classification identifier can be added or modified according to the business requirements, such as defining a new KeyD to support the "cross-platform jump cache" scenario. For example, when the bank APP adds the "cross-platform jump cache" scenario, the system defines a new classification identifier KeyD and configures its corresponding cache rules (such as "clear immediately after detecting a cross-platform jump event"). The dynamic extension mechanism allows the cache management logic to flexibly adapt to changes in business requirements without the need to restructure existing storage logic.
[0052] The dynamic expansion of the classification identifier is used to realize flexible binding of the cache classification definition and the business scenario, significantly improve the expansibility of the system, and reduce the maintenance cost caused by changes in the business requirements. Meanwhile, the dynamic expansion mechanism ensures the compatibility of the newly added classification identifier and the existing cache management logic, and avoids system abnormalities caused by rule conflicts.
[0053] Optionally, before determining the classification identifier corresponding to the cache data according to the business requirements, the method further includes: determining the life cycle rule corresponding to the classification identifier according to the business requirements, so that the batch processing is performed according to the life cycle rule, and the life cycle rule includes a clearing trigger condition and a clearing execution time.
[0054] In an example, the life cycle rule is used to represent the clearing strategy of the classification identifier, such as “clearing when the APP is restarted” and “clearing 5 minutes before scanning”. The clearing trigger condition is used to represent the event or state triggering the clearing operation, such as “APP restart” and “scanning event”. The clearing execution time is used to represent the execution time point of the clearing operation, such as “5 minutes before scanning”.
[0055] For example, the classification KeyB is configured with the rule “clearing 5 minutes before scanning”, and the system automatically triggers the clearing operation by scanning the cache state once a minute through a timing task when it is detected that the time difference between the current time and the scanning operation time is less than 5 minutes. The configuration of the life cycle rule provides the basis for the automatic execution of the subsequent clearing operation.
[0056] Through the configuration of the dynamic life cycle rule, the automatic execution of the cache batch processing operation is realized. The automatic triggering through the timing task avoids the mistakes or omissions of manual judgment of the batch processing time. The reliability of the cache management is significantly improved, the cache residual problem caused by human operation is reduced, and the system resource utilization is optimized.
[0057] Optionally, after determining the classification identifier corresponding to the cache data according to the business requirements, the method further includes: obtaining an operation log; performing behavior analysis on the operation based on the operation log to obtain a behavior analysis result; and adjusting the classification identifier based on the behavior analysis result.
[0058] In an example, the behavior analysis result can generate a user behavior portrait, such as “high-frequency scanning user” and “low-frequency scanning user”, by analyzing the operation log. Taking an example in which the analysis result includes a high-frequency operation scenario and a low-frequency operation scenario of the user, the high-frequency operation scenario is used to represent the business scenario frequently performed by the user, such as “more than 5 times of scanning per day”. The low-frequency operation scenario is used to represent the business scenario less frequently performed by the user, such as “1 time of scanning per month”.
[0059] For example, the behavior analysis result (e.g., "high-frequency code scanning user") is generated by analyzing the operation log. Based on the behavior analysis result, the definition of the classification identifier is dynamically adjusted. For example, KeyB_high is defined for high-frequency code scanning users and a stricter clearing rule (e.g., "clear immediately after each code scanning") is configured; KeyB_low is defined for low-frequency users and the clearing interval is extended (e.g., "clear once a day"). The dynamic adaptation of the classification identifier is driven by the user behavior analysis result.
[0060] The dynamic adjustment of the classification identifier driven by the user behavior analysis result realizes the personalized optimization of cache management. The risk of errors caused by data residue is reduced; unnecessary resource waste is avoided. The flexibility and user experience of the system are significantly improved, while the efficient use of system resources is ensured.
[0061] Optionally, according to the change of business requirements, the classification identifier is dynamically extended, including: after the change of business requirements, a new classification identifier is defined according to the changed business requirements; and / or, the clearing rule corresponding to the classification identifier is modified.
[0062] In an example, a new classification identifier is added: a new classification identifier is defined to support a new business scenario. Modifying the clearing rule of the existing classification identifier can include: adjusting the clearing strategy of the defined classification identifier, for example, adjusting the clearing rule of KeyA from "clear when the APP restarts" to "clear 10 minutes after the APP starts".
[0063] For example, dynamically extending the classification identifier can include adding a new classification identifier or modifying the clearing rule of an existing classification identifier. For example, when the bank APP adds a "cross-platform jump cache" scenario, the system adds a classification identifier KeyD and configures its clearing rule (e.g., "clear immediately after detecting a cross-platform jump event"); when the business requirements of KeyA change, the system modifies its clearing rule (e.g., from "clear when the APP restarts" to "clear 10 minutes after the APP starts").
[0064] By adding a new classification identifier or modifying the clearing rule of an existing classification identifier, the dynamic adaptation of the cache classification definition and the business scenario is realized. The flexibility and maintainability of the system are significantly improved, and the reconstruction cost caused by changes in business requirements is reduced.
[0065] Optionally, based on the behavior analysis result, the classification identifier is adjusted, including: based on the behavior analysis result, determining the operation frequency; according to the operation frequency, modifying the clearing trigger condition and execution time of the classification identifier.
[0066] In an example, adjusting the life cycle rule can include modifying the clearing trigger condition and execution time of the classification identifier, for example, adjusting the rule of KeyB from "clear 5 minutes before scanning" to "clear 3 minutes before scanning". For example, for high-frequency scanning users, the system adjusts the clearing rule of KeyB from "clear 5 minutes before scanning" to "clear 3 minutes before scanning"; for low-frequency users, the system adjusts the rule to "clear 10 minutes before scanning".
[0067] By driving the adjustment of the dynamic life cycle rule through the user behavior analysis result, the personalized adaptation of the cache clearing strategy is realized. The data residual risk is reduced; unnecessary resource consumption is avoided. The adaptive ability of the system is significantly improved, and the balance between user experience and system performance is optimized.
[0068] Optionally, the method further includes: performing batch processing corresponding to the classification identifier through a preset timing task; and / or, performing batch processing corresponding to the classification identifier when a preset event is monitored.
[0069] In an example, the preset timing task can include a periodic background task, such as scanning the cache state once every minute. Real-time response to the monitored preset event, such as monitoring "scanning event", "APP restart event", etc. For example, the timing task scans the cache state once every minute, and when it is detected that the clearing trigger condition of KeyB is met (such as 3 minutes before scanning), the clearing operation is automatically performed; the event monitoring mechanism triggers the clearing operation of KeyB immediately after detecting the "scanning event".
[0070] Through the combination of system timing tasks and preset event monitoring, the automation and accurate execution of the cache clearing operation are realized. The timing task ensures the periodic checking of the rule, and the event monitoring mechanism ensures the immediate response to the key event. The reliability and efficiency of cache management are significantly improved, the need for manual intervention is reduced, and the system stability and business continuity are guaranteed.
[0071] Figure 3 A structural schematic diagram of a data classification cache device provided by an embodiment of the present application is shown in Figure 3 As shown in the figure, the data classification cache device 30 provided by the embodiment includes:
[0072] The acquisition module 301 is configured to acquire a business requirement.
[0073] The determination module 302 is configured to determine a classification identifier corresponding to cache data according to the business requirement, and establish a mapping relationship between the classification identifier and the cache data.
[0074] The storage module 303 is configured to store the cache data corresponding to the classification identifier as a key-value pair set based on the classification identifier and the mapping relationship.
[0075] The processing module 304 is configured to perform corresponding batch processing on the key-value pair set according to the classification identifier in the target service scenario.
[0076] In a possible implementation, the storage module 303 is specifically configured to store the cache data corresponding to each classification identifier in a dictionary format, and the dictionary format includes a plurality of sub-key-value pairs, each of which includes a data identifier and a value corresponding to the data identifier.
[0077] In a possible implementation, the data classification cache apparatus is further configured to dynamically extend the classification identifier according to a change in the service requirement, so as to adapt to the changed service requirement.
[0078] In a possible implementation, the data classification cache apparatus is further configured to determine a life cycle rule corresponding to the classification identifier according to the service requirement, so that the batch processing is performed according to the life cycle rule, and the life cycle rule includes a clearing trigger condition and a clearing execution time.
[0079] In a possible implementation, the data classification cache apparatus is further configured to obtain an operation log, perform behavior analysis on the operation based on the operation log to obtain a behavior analysis result, and adjust the classification identifier based on the behavior analysis result.
[0080] In a possible implementation, the data classification cache apparatus is further configured to define a new classification identifier according to the changed service requirement after the change in the service requirement, and / or modify the clearing rule corresponding to the classification identifier.
[0081] In a possible implementation, the data classification cache apparatus is further configured to determine an operation frequency based on the behavior analysis result, and modify the clearing trigger condition and the execution time of the classification identifier according to the operation frequency.
[0082] In a possible implementation, the data classification cache apparatus is further configured to perform the batch processing corresponding to the classification identifier through a preset timing task, and / or perform the batch processing corresponding to the classification identifier when a preset event is monitored.
[0083] The data classification cache apparatus provided in this embodiment can perform the method provided in the method embodiment, and has similar implementation principles and technical effects, which will not be described here.
[0084] Figure 4 A structural schematic diagram of an electronic device provided in an embodiment of the present application is shown in FIG. 1. Figure 4As shown, the electronic device 40 can include a memory 401, a processor 402. Optionally, the electronic device can further include a transceiver 403, wherein the memory 401 and the processor 402 are in communication; for example, the memory 401, the processor 402 and the transceiver 403 can be in communication through a communication bus 404, the memory 401 is configured to store a computer program, and the processor 402 executes the computer program to implement the method of the above-mentioned embodiments.
[0085] Optionally, the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor and the like. The steps of the method embodiments disclosed in the present application can be directly embodied as hardware processor execution, or executed by a combination of hardware and software modules in the processor.
[0086] The embodiments of the present application also provide a computer readable storage medium, and the computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method in any of the above method embodiments.
[0087] The embodiments of the present application also provide a computer program product, and the computer program product includes a computer program, and the computer program is executed by the processor to implement the method in any of the above method embodiments.
[0088] All or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware. The foregoing program can be stored in a readable memory. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the foregoing memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape, floppy disk, optical disc and any combination thereof.
[0089] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the computer or other programmable data processing apparatus generate a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 one or more flows and / or blocks
[0090] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction devices that implement the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 one or more flows and / or blocks
[0091] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a process for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 one or more flows and / or blocks
[0092] Obviously, those skilled in the art can make various modifications and variations to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.
[0093] In the present application, the term "comprising" and its variants can refer to non-limiting inclusion; the term "or" and its variants can refer to "and / or". In the present application, the terms "first", "second", etc. are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. In the present application, "multiple" refers to two or more. "And / or", which describes the relationship between the associated objects, means that there can be three relationships, for example, A and / or B can represent the three cases of A alone, A and B together, and B alone. The character " / " generally represents an "or" relationship between the associated objects.
[0094] It should be noted that, for the foregoing method embodiments, the sequences of the described actions are merely illustrative, and the present application is not limited to the sequences of the described actions. In some embodiments, the sequences of the described actions can be changed or reordered. In some embodiments, some of the actions can be performed simultaneously. In some embodiments, some of the actions can be omitted, or other actions can be added.
[0095] It should be noted that, in the flow charts, each step is shown in order according to the arrows, but the steps are not necessarily performed in the order shown by the arrows. Unless otherwise specified herein, the steps are not necessarily limited in order, and the steps can be performed in other orders. Moreover, at least some of the steps in the flow charts can include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but can be performed at different times. The order of the sub-steps or stages is not necessarily sequential, but can be performed in rotation or alternation with other steps or sub-steps or stages of other steps.
[0096] It should be understood that the above-described device embodiments are merely illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-described embodiments is merely a logical functional division, and actual implementation can have another division manner. For example, multiple units / modules or components can be combined, or can be integrated into another system, or some features can be omitted or not performed.
[0097] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application can be integrated in one unit / module, or each unit / module can exist physically, or two or more units / modules can be integrated together. The integrated unit / module can be realized in the form of hardware or in the form of a software program module.
[0098] If the integrated units / modules are implemented in the form of hardware, the hardware can be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. Unless otherwise specified, the storage unit can be any appropriate magnetic storage medium or magneto-optical storage medium, such as resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), etc.
[0099] If the integrated units / modules are implemented in the form of software program modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the essential part or all or part of the technical solutions that make contributions to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0100] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0101] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.
[0102] It is to be understood that the application is not limited to the precise construction herein described and as shown in the attached drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is to be indicated by the appended claims, rather than the description and examples.
Claims
1. A data classification caching method, characterized by, The method comprises: acquiring a business requirement; determining a classification identifier corresponding to cached data according to the business requirement, and establishing a mapping relationship between the classification identifier and the cached data; storing cached data corresponding to the classification identifier as a key-value pair set based on the classification identifier and the mapping relationship; under a target business scenario, performing corresponding batch processing on the key-value pair set according to the classification identifier.
2. The method of claim 1, wherein, The cached data corresponding to the classification identifier is stored as a key-value pair set, comprising: storing the cached data corresponding to each classification identifier in a dictionary format, the dictionary format containing a plurality of sub-key-value pairs, each sub-key-value pair including a data identifier and a value corresponding to the data identifier.
3. The method of claim 1, wherein, After determining the classification identifier corresponding to the cached data according to the business requirement, the method further comprises: dynamically extending the classification identifier according to changes in the business requirement to adapt to the changed business requirement.
4. The method of claim 3, wherein, Before determining the classification identifier corresponding to the cached data according to the business requirement, the method further comprises: determining a lifecycle rule corresponding to the classification identifier according to the business requirement, so that batch processing is performed according to the lifecycle rule, the lifecycle rule including a clearing trigger condition and a clearing execution time.
5. The method of claim 4, wherein, After determining the classification identifier corresponding to the cached data according to the business requirement, the method further comprises: acquiring an operation log; based on the operation log, performing behavior analysis on the operation to obtain a behavior analysis result; based on the behavior analysis result, adjusting the classification identifier.
6. The method of claim 4, wherein, The dynamically extending the classification identifier according to the changes in the business requirement comprises: after the business requirement changes, defining a new classification identifier according to the changed business requirement; and / or, modifying the clearing rule corresponding to the classification identifier.
7. The method of claim 5, wherein, The adjusting the classification identifier based on the behavior analysis result comprises: based on the behavior analysis result, determining an operation frequency; according to the operation frequency, modifying the clearing trigger condition and the execution time of the classification identifier.
8. The method of claim 1, wherein, The method further comprises: performing batch processing corresponding to the classification identifier through a preset timing task; and / or, performing batch processing corresponding to the classification identifier when a preset event is monitored.
9. A data classification cache apparatus, characterized by The device comprises: an acquisition module for acquiring a business requirement; a determination module for determining a classification identifier corresponding to cached data according to the business requirement, and establishing a mapping relationship between the classification identifier and the cached data; a storage module for storing cached data corresponding to the classification identifier as a key-value pair set based on the classification identifier and the mapping relationship; a processing module for performing corresponding batch processing on the key-value pair set according to the classification identifier under a target business scenario.
10. An electronic device, comprising: comprising: a processor, and a memory in communication with the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method of any one of claims 1 to 8.
11. A computer readable storage medium, characterized in that, The computer readable storage medium stores computer-executable instructions which, when executed by a processor, implement the method of any one of claims 1 to 8.
12. A computer program product, characterised in that, A computer program which, when executed by a processor, implements the method of any one of claims 1 to 8.