Data processing method and device, electronic equipment and storage medium

By identifying target feature tags in the database and using them to determine the validity of data on the requesting end, the database overload problem caused by cache penetration is solved, and the stability and responsiveness of the database are improved.

CN118796884APending Publication Date: 2024-10-18CHINA MOBILE (XIONGAN) ICT CO LTD +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311434763.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Cache penetration can lead to database request blocking and a surge in query pressure, which in turn can cause database overload.

Method used

By identifying target feature tags for the target type in the database, and based on the access request from the requesting end, the database is used to determine whether the target data is contained in the database. If it is not contained, the requesting end is prohibited from accessing the database to avoid access to invalid data.

Benefits of technology

It effectively avoids cache penetration, improves database stability, prevents invalid data from damaging the database, and enhances the database's responsiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796884A_ABST
    Figure CN118796884A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device, electronic equipment and a storage medium, belongs to the field of computer application, and is used for preventing cache penetration. The method comprises the following steps: determining a target feature tag of a target type according to data of the target type in a database; determining target data of the target type requested by a request end according to a database access request sent by the request end; and prohibiting the request end from accessing the database under the condition of determining that the database does not comprise the target data according to the target feature tag.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer applications, and specifically relates to a data processing method, device, electronic device and storage medium. Background Art

[0002] Caching is a broad concept. The core meaning is to store data closer to the user, or to store data in a faster-access medium. In high-concurrency systems, caching technology is used to cache hot data, which greatly relieves the pressure on the backend database. In order to prevent frequent traffic from accessing the database and causing database access overload, a cache layer is generally set up in front of the database layer as protection.

[0003] However, when the request side accesses hot data with high concurrency, if a large number of continuous requests do not find the hot data in the cache, they will directly access the backend database. If the data does not exist in the database at this time, it will cause cache penetration problems, resulting in a large number of request blocking and doubled query pressure on the database, which will eventually cause the database to be overloaded. Summary of the invention

[0004] The embodiments of the present application provide a data processing method, device, electronic device and storage medium, which can solve the problem of cache penetration causing a large number of request blocking, doubling the query pressure of the database, and ultimately causing the database to overload.

[0005] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising: determining a target feature tag of the target type based on data of the target type in a database; determining target data of the target type requested by the requesting end based on a database access request sent by the requesting end; and prohibiting the requesting end from accessing the database when it is determined, based on the target feature tag, that the database does not include the target data.

[0006] In a second aspect, an embodiment of the present application provides a data processing device, which includes: a first determination module, used to determine a target feature tag of a target type based on data of the target type in a database; a second determination module, used to determine target data of the target type requested by the requesting end based on an access request sent by the requesting end; and a processing module, used to prohibit the requesting end from accessing the database when it is determined that the database does not include the target data based on the target feature tag.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0009] In an embodiment of the present application, a target feature tag of the target type is determined based on the data of the target type in a database; the target data of the target type requested by the requesting end is determined based on the database access request sent by the requesting end; and when it is determined based on the target feature tag that the target data is not included in the database, the requesting end is prohibited from accessing the database. This can prevent the requesting end from accessing the database when the target data is not included in the database, avoid cache penetration, avoid invalid data from penetrating the database, and improve the stability of the database. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0011] Figure 2 It is a flowchart of another data processing method provided in an embodiment of the present application;

[0012] Figure 3 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0013] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0014] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0015] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0016] The data processing method, device, electronic device and storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0017] Figure 1 A data processing method provided by an embodiment of the present application is shown, and the method can be executed by an electronic device, and the electronic device may include: a server and / or a terminal device. In other words, the method can be executed by software or hardware installed in the electronic device, and the method includes the following steps:

[0018] Step 102: Determine a target feature label of the target type according to the target type data in the database.

[0019] Specifically, the database may include multiple types of data, such as name, age, gender, etc., which can be used as a data type. In the implementation example of the present application, it is necessary to determine the target feature label of the target type according to the data of the target type in the database. The data of the target type can be any data in the database, and the target feature label is used to express the characteristics of the data of the target type.

[0020] In one implementation, determining the target feature tag of the target type according to the target type data in the database includes:

[0021] The data of the target type is input into a label prediction model, and a feature label set of the target type is output, wherein the feature label set includes multiple first feature labels; a first number of first feature labels are selected from the feature label set as a first centroid; according to the first centroid, multiple first feature labels in the feature label set are clustered to obtain a first number of clusters; a first feature label that meets the centroid condition is determined from each of the clusters as a second centroid; and the second centroid is determined as the target feature label.

[0022] Specifically, the target type data can be input into the label prediction model, and the label prediction model can output the target type feature label set. The label prediction model can include a basic model and an enhanced model. The target type data is input into the basic model for learning and prediction, and the basic feature label can be output. The basic feature label is then input into the enhanced model, and the accuracy of the basic feature label is further enhanced by the enhanced model. The training and learning of the basic model and the enhanced model are repeated until the loss function reaches a preset threshold, and a feature label set can be obtained, which includes multiple first feature labels. As an example, the existing data sequence Ω in the database H =[H1,H2,......,H L ], where HL represents the Lth type of data. By learning and predicting HL through the basic model and the reinforcement model, we can get H L The first feature label of the class. Assume H L Representing age, the first feature label obtained through the learning of the basic model and the reinforcement model can be: greater than 0 and less than 100.

[0023] The first feature label is used as the input of the clustering module. Since it is necessary to obtain the feature closest to the actual data, the clustering algorithm is used to output multiple first centroids with a small distance from the data sequence. The first centroid can be a uniform centroid in the feature label set, that is, a first number of first feature labels are selected from the feature label set as the first centroid, and then clustering algorithms such as k-means, mean shift, and agglomerative hierarchy can be used for clustering. The multiple first feature labels in the feature label set are clustered to obtain the first number of clusters. Then, the first feature label that meets the centroid condition is determined from each cluster as the second centroid; the second centroid is determined as the target feature label.

[0024] Step 104: According to the database access request sent by the requesting end, target data of the target type requested by the requesting end is determined.

[0025] Specifically, after receiving the data request sent by the requesting end, the cache layer can first detect whether there is target data of the target type requested by the requesting end. If the cache layer does not have the target data requested by the requesting end, the requesting end will make an access request to the database.

[0026] Step 106: If it is determined that the database does not include the target data according to the target feature tag, prohibiting the requesting end from accessing the database

[0027] After determining the target data of the target type requested by the requester, it is necessary to determine whether the database includes the target data based on the target feature tag. If the database includes the target database, the requester is allowed to access the data. If the database does not include the target data, the requester is prohibited from accessing the database.

[0028] In one implementation, when it is determined according to the target feature tag that the database does not include the target data, prohibiting the requesting end from accessing the database includes:

[0029] The target feature tag is compared with the target data. If the target data does not match the target feature tag, it is determined that the database does not include the target data, and the requesting end is prohibited from accessing the database.

[0030] Specifically, through the cache layer, the target feature tag is compared with the target data of the target type requested by the requesting end. If the target data does not match the target feature tag, the target data is determined to be invalid, that is, the target database is not included in the database, and the requesting end is prohibited from accessing the data.

[0031] In one implementation, after determining the target data of the target type requested by the requesting end according to the database access request sent by the requesting end, the method further includes:

[0032] The target feature tag is compared with the target data, and when the target data matches the target feature tag, it is determined that the database includes the target data, and the requesting end is allowed to access the database.

[0033] Specifically, through the cache layer, the target feature tag is compared with the target data of the target type requested by the requesting end. If the target data matches the target feature tag, it is determined that the target data is valid, that is, the database includes the target database, and the requesting end is allowed to access the database.

[0034] The data processing method provided by the embodiment of the present invention determines the target feature label of the target type according to the data of the target type in the database; determines the target data of the target type requested by the requesting end according to the database access request sent by the requesting end; and prohibits the requesting end from accessing the database when it is determined according to the target feature label that the database does not include the target data. This can avoid the requesting end accessing the database when the database does not include the target data, avoid cache penetration, adopt intelligent label recognition to establish the model center point, decentralize data, establish data learning according to the different data dimensions obtained from different data sources, achieve database data labeling, avoid invalid data from penetrating the database, and improve the stability of the database.

[0035] In one implementation, clustering the plurality of first feature tags in the feature tag set according to the first centroid to obtain a first number of clusters includes:

[0036] Allocate each of the first feature labels to the cluster where the first centroid closest to the first feature label is located, to obtain the first number of clusters.

[0037] Specifically, clustering the first feature labels in the feature label set is to assign each of the first feature labels to the cluster where the first centroid closest to the first feature label is located, so as to obtain a first number of clusters.

[0038] In one implementation, determining the first feature label that meets the centroid condition from each of the clusters as the second centroid includes:

[0039] A first feature label that meets a centroid condition is determined in each of the clusters as a second centroid, wherein the centroid condition is that the distance from each of the first feature labels in the cluster is the shortest.

[0040] Specifically, after obtaining the first number of clusters, the centroid can be updated according to the centroid condition, and the first feature label that meets the centroid condition is re-determined as the second centroid, and the centroid condition is that the distance within the cluster to each of the first feature labels is the shortest.

[0041] In one implementation, before determining the target feature tag of the target type according to the target type data in the database, the method further includes:

[0042] Obtain the number of calls and expiration time of each cache data in the cache layer; determine the target cache data whose number of cache calls is greater than the high-frequency call number threshold and whose expiration time is lower than the time threshold among the cache data; update the expiration time of the target cache data to the target expiration time, and the target expiration time is greater than the expiration time.

[0043] Specifically, for data processing in the cache layer, it is necessary to combine the least recently used (LRU) algorithm to eliminate data and update the expiration time according to the historical records of data access. The core idea is "if the data has been accessed frequently recently, then the records that will be accessed in the future will also be more frequent, so its expiration time can be extended. If the data has been accessed less frequently recently, then it can be eliminated." The specific algorithm is as follows:

[0044] 1. When the requesting end accesses data, if the requested data is in the cache layer, the cached data is returned and the call is recorded.

[0045] 2. Regularly process and update the cache data of the cache layer. The specific steps include:

[0046] (1) The existing sequence in the cache layer is used as the input of the training module.

[0047] (2) Extract the call count and expiration time (unit: seconds) of cached data.

[0048] (3) Filter out the data whose call times meet the high-frequency call condition and determine whether its expiration time is lower than the threshold.

[0049] (4) According to the LRU algorithm, if the expiration time of the filtered cache data is lower than the threshold, the cache data is determined to be the target cache data, and the expiration time of the target cache data is updated to the target expiration time. The target expiration time is greater than the original expiration time of the target cache data. For example, the target expiration time can be 3600 seconds (2 hours).

[0050] (5) Repeat the above steps regularly to ensure the data validity and data expiration period of the cache layer.

[0051] By obtaining the call count and expiration time of each cache data in the cache layer; determining the target cache data whose cache count is greater than the high-frequency call count threshold and whose expiration time is lower than the time threshold in each cache data; updating the expiration time of the target cache data to the target expiration time, and the target expiration time is greater than the expiration time, the cache breakdown can be prevented.

[0052] In one implementation, the update frequency of the feature labels of each data type can also be set. In this step, the data in the database can be updated by time and category, which greatly reduces the amount of data processing.

[0053] The data processing method provided by this application is specifically described below through a specific embodiment:

[0054] There are L types of data in the database, including name, age, gender, position, existing points, registration time, etc.

[0055] The main steps of the invention are as follows:

[0056] Step 1: Obtaining data labels: Obtaining data samples from the real-time database H =[H1,H2,......,H L ], and use it as the input of the label prediction model to obtain the prediction feature set

[0057] Step 2, initialization: In order to make full use of the database data information and speed up the convergence of the clustering algorithm, the feature set N uniform centroids are selected as the initial centroids within the range t θ =[t θ,1,t θ,2 ,......,t θ,N ].

[0058] Step 3: Cluster each feature separately: According to the nearest neighbor rule, each data object is associated with the nearest centroid. Specifically, since the i-th element To the lth cluster centroid t θ,l The distance is the smallest, so the data object is assigned to the lth cluster, and the cluster selection process is expressed as Then Belong to the lth cluster Cluster θ,l .

[0059] Step 4, obtaining the cluster centroid: After all data objects are divided, the cluster centroid will be updated according to the centroid condition, and the object with the smallest distance to all data in the cluster will be selected as the new centroid of the current cluster. For the lth cluster of the angle feature, its cluster centroid can be expressed as Repeat this clustering process until the objects and centroids of each cluster remain unchanged. Finally, we get N centroids t θ .

[0060] Step 5: The requester attempts to access data with an age of -10 and first finds the age data for label comparison.

[0061] Step 6: The age of -10 is determined to be invalid data, which does not meet the label category. The request is rejected.

[0062] Figure 2 Another data processing method provided by the embodiment of the present application is shown. Figure 2 As shown, the data processing method includes:

[0063] The existing data in the cache layer is analyzed according to the call frequency, and the cache validity period corresponding to the data with high call frequency is updated. The WEB application (request end) first makes a data request in the cache layer. In the case that the cache layer does not include the data requested by the request end, such as a large number of non-existent data read requests, the cache layer does not find the requested data, and the cache data expires, the request end will request to access the database.

[0064] In the database, feature prediction is performed on existing data to obtain key features. Key features are used as inputs to the reinforcement model to ultimately obtain data set features and a set of key features of the database data, i.e., feature labels of the data. Before accessing the database, the requester first determines at the cache layer whether the data requested by the requester meets the key features of the database data. If so, it means that the data requested by the requester is valid data, and the requester is allowed to access the database. If not, it means that the data requested by the requester is invalid data, and the requester is prohibited from accessing the database.

[0065] This application builds a cache breakdown / penetration solution based on intelligent identification. By clustering the existing data in the database, data of different dimensions are collected from different users at the same time to optimize the training model. The independence, group association, emotional characteristics and commercial attributes of keywords behind the data are presented in depth, and data are mined and mechanisms are constructed to label the existing data in the database. The label update frequency of each type of data is set for the model. In this step, the data in the database can be updated in a time-sharing and classified manner, which greatly reduces the data processing volume of the module.

[0066] It should be noted that the data processing method provided in the embodiment of the present application can be executed by a data processing device or a control module in the data processing device for executing the data processing method. In the embodiment of the present application, the data processing device provided in the embodiment of the present application is described by taking the data processing device executing the data processing method as an example.

[0067] Figure 3 Schematic diagram of the structure of a data processing device according to an embodiment of the present invention. Figure 3 As shown, the data processing device 300 includes: a first determination module 310 , a second determination module 320 and a processing module 330 .

[0068] The first determination module 310 is used to determine the target feature tag of the target type according to the data of the target type in the database; the second determination module 320 is used to determine the target data of the target type requested by the requesting end according to the access request sent by the requesting end; the processing module 330 is used to prohibit the requesting end from accessing the database when it is determined that the database does not include the target data according to the target feature tag.

[0069] In one implementation, the first determination module 310 is used to input the data of the target type into a label prediction model, output a feature label set of the target type, and the feature label set includes multiple first feature labels; select a first number of first feature labels from the feature label set as a first centroid; cluster the multiple first feature labels in the feature label set according to the first centroid to obtain a first number of clusters; determine a first feature label that meets the centroid condition from each of the clusters as a second centroid; and determine the second centroid as the target feature label.

[0070] In one implementation, the first determination module 310 is configured to assign each of the first feature labels to the cluster where the first centroid closest to the first feature label is located, to obtain the first number of clusters.

[0071] In one implementation, the first determination module 310 is used to determine in each of the clusters a first feature label that meets a centroid condition as the second centroid, wherein the centroid condition is that the distance within the cluster to each of the first feature labels is the shortest.

[0072] In one implementation, the processing module 330 is used to obtain the number of calls and expiration time of each cache data in the cache layer; determine the target cache data among the cache data whose number of cache calls is greater than the high-frequency call number threshold and whose expiration time is lower than the time threshold; and update the expiration time of the target cache data to the target expiration time, wherein the target expiration time is greater than the expiration time.

[0073] In one implementation, the processing module 330 is used to compare the target feature tag with the target data, and if the target data does not match the target feature tag, determine that the database does not include the target data, and prohibit the requesting end from accessing the database.

[0074] In one implementation, the processing module 330 is further used to compare the target feature tag with the target data, and if the target data matches the target feature tag, determine that the target data is included in the database, and allow the requesting end to access the database.

[0075] The data processing device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0076] The data processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0077] The data processing device provided in the embodiment of the present application can realize Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0078] Alternatively, if Figure 4 As shown, an embodiment of the present application further provides an electronic device 400, including a processor 401 and a memory 402, wherein the memory 402 stores a program or instruction that can be executed on the processor 401, and when the program or instruction is executed by the processor 401, it is implemented as follows: determining a target feature tag of the target type based on data of the target type in a database; determining target data of the target type requested by the requesting end based on a database access request sent by the requesting end; and prohibiting the requesting end from accessing the database when it is determined that the target data is not included in the database based on the target feature tag.

[0079] In one implementation, the data of the target type is input into a label prediction model, and a feature label set of the target type is output, wherein the feature label set includes multiple first feature labels; a first number of first feature labels are selected from the feature label set as a first centroid; based on the first centroid, the multiple first feature labels in the feature label set are clustered to obtain a first number of clusters; a first feature label that meets the centroid condition is determined from each of the clusters as a second centroid; and the second centroid is determined as the target feature label.

[0080] In one implementation, each of the first feature labels is assigned to the cluster where the first centroid closest to the first feature label is located, so as to obtain the first number of clusters.

[0081] In one implementation, a first feature label that meets a centroid condition is determined in each of the clusters as the second centroid, wherein the centroid condition is that the distance within the cluster to each of the first feature labels is the shortest.

[0082] In one implementation, before determining the target feature tag of the target type based on the data of the target type in the database, the number of calls and expiration time of each cache data in the cache layer are obtained; the target cache data whose number of cache calls is greater than the high-frequency call number threshold and whose expiration time is lower than the time threshold is determined among the cache data; the expiration time of the target cache data is updated to the target expiration time, and the target expiration time is greater than the expiration time.

[0083] In one implementation, the target feature tag is compared with the target data, and if the target data does not match the target feature tag, it is determined that the database does not include the target data, and the requesting end is prohibited from accessing the database.

[0084] In one implementation, after determining the target data of the target type requested by the requesting end based on the database access request sent by the requesting end, the target feature tag is compared with the target data. If the target data meets the target feature tag, it is determined that the target data is included in the database, and the requesting end is allowed to access the database.

[0085] The specific execution steps can refer to the various steps of the above-mentioned data processing method embodiment, and can achieve the same technical effect. To avoid repetition, they will not be repeated here.

[0086] It should be noted that the electronic devices in the embodiments of the present application include: servers, terminals, or other devices except terminals.

[0087] The above electronic device structure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0088] The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).

[0089] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.

[0090] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned data processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0091] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as ROM, RAM, magnetic disk or optical disk.

[0092] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes 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 one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0094] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A data processing method, It is characterized in that include: Determine a target feature label of the target type according to the target type data in the database; Determining target data of the target type requested by the requesting end according to the database access request sent by the requesting end; When it is determined according to the target feature tag that the database does not include the target data, the requesting end is prohibited from accessing the database.

2. The processing method according to claim 1, It is characterized in that The step of determining the target feature label of the target type according to the target type data in the database includes: Inputting the data of the target type into a label prediction model, and outputting a feature label set of the target type, wherein the feature label set includes a plurality of first feature labels; Selecting a first number of first feature tags from the feature tag set as first centroids; Clustering the plurality of first feature tags in the feature tag set according to the first centroid to obtain a first number of clusters; Determine a first feature label that meets the centroid condition from each of the clusters as a second centroid; The second centroid is determined as the target feature label.

3. The processing method according to claim 2, wherein the first centroid is used to cluster the first feature labels in the feature label set to obtain a first number of clusters. include: Allocate each of the first feature labels to the cluster where the first centroid closest to the first feature label is located, to obtain the first number of clusters.

4. The processing method according to claim 2, It is characterized in that The step of determining the first feature label that meets the centroid condition from each of the clusters as the second centroid includes: A first feature label that meets a centroid condition is determined in each of the clusters as a second centroid, wherein the centroid condition is that the distance from each of the first feature labels in the cluster is the shortest.

5. The processing method according to claim 1, It is characterized in that Before determining the target feature tag of the target type according to the target type data in the database, the method further includes: Get the call count and expiration time of each cache data in the cache layer; Determine, from among the cache data, target cache data whose cache times are greater than a high-frequency call times threshold and whose expiration time is less than a time threshold; The expiration time of the target cache data is updated to a target expiration time, where the target expiration time is greater than the expiration time.

6. The processing method according to claim 1, It is characterized in that When it is determined according to the target feature tag that the database does not include the target data, prohibiting the requesting end from accessing the database comprises: The target feature tag is compared with the target data. If the target data does not match the target feature tag, it is determined that the database does not include the target data, and the requesting end is prohibited from accessing the database.

7. The method according to claim 1, It is characterized in that After determining the target data of the target type requested by the requesting end according to the database access request sent by the requesting end, the method further includes: The target feature tag is compared with the target data, and when the target data matches the target feature tag, it is determined that the database includes the target data, and the requesting end is allowed to access the database.

8. A data processing device, It is characterized in that include: A first determination module, used to determine a target feature tag of the target type according to data of the target type in a database; A second determination module, configured to determine target data of the target type requested by the requesting end according to the access request sent by the requesting end; A processing module is used to prohibit the requesting end from accessing the database when it is determined that the database does not include the target data according to the target feature tag.

9. An electronic device, It is characterized in that The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the data processing method according to any one of claims 1 to 7.

10. A readable storage medium, It is characterized in that The readable storage medium stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the data processing method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Data access and modularization presentation method based on interface

    CN120128628A