Data rule matching method and apparatus, device, medium, and product
By obtaining the mapping relationship between data feature values and preset rule feature values, the data rule matching process was optimized, solving the problem of low matching efficiency under large data volumes. Furthermore, the user experience of the e-commerce platform was improved by configuring the preset rule table through a page.
Patent Information
- Application Number
- PCT/CN2024/137833
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-28
- Filing Date
- 2024-12-09
- Publication Date
- 2026-03-05
AI Technical Summary
Existing technologies are inefficient when matching business rules with large amounts of data, and provide a poor user experience when adding or modifying rules on e-commerce platforms.
By obtaining the mapping relationship between data feature values and the preset rule feature value list, the amount of data is reduced and the rule matching process is optimized. The preset rule table is configured in a page-based manner to improve the user experience.
It improved the efficiency of data rule matching, reduced redundant matching operations, and enhanced the efficiency of business rule modification and user experience on e-commerce platforms.
Smart Images

Figure CN2024137833_05032026_PF_FP_ABST
Abstract
Description
Data rule matching methods, devices, equipment, media and products
[0001] Priority application
[0002] This application claims priority to Chinese Patent Application No. 202411194720.6, filed on August 28, 2024, entitled “Data Rule Matching Method, Apparatus, Device, Media and Product”. Technical Field
[0003] This application relates to the field of data processing, and in particular to a data rule matching method, apparatus, device, medium, and product. Background Technology
[0004] With the development of e-commerce, the business of e-commerce platforms is also expanding, and consequently, the number of business rules is also increasing.
[0005] When using the platform, it is necessary to effectively classify the massive amount of e-commerce related platform data by matching business rules in order to obtain the business rules corresponding to each piece of platform data, and then output them to users on the platform.
[0006] In some cases, when matching business rules, it is necessary to match each piece of platform data with each business rule.
[0007] This method has low matching efficiency, especially with large amounts of data. Summary of the Invention
[0008] This application provides a data rule matching method, apparatus, device, medium, and product.
[0009] Firstly, this application provides a data rule matching method, including:
[0010] Obtain the data feature value of each data field included in each piece of data to be processed; obtain the target feature value from the data feature values that is the same as the rule feature value category in the preset rule feature value list, the preset rule feature value list including: the mapping relationship between each rule feature value category in the preset rule table and all preset rules in which the current rule feature value category is located in the preset rule table; obtain a data list based on the target feature value and the data feature value of each data field included in each piece of data to be processed, the data list including: the mapping relationship between each target feature value and all the data to be processed in which each target feature value is located; obtain the preset rule that each piece of data to be processed conforms to based on the data list and the preset rule feature value list.
[0011] Secondly, this application provides a data rule matching device, comprising: a first acquisition module, configured to acquire data feature values of each data field included in each piece of data to be processed; a second acquisition module, configured to acquire target feature values in the data feature values that are the same as rule feature value categories in a preset rule feature value list, the preset rule feature value list including: a mapping relationship between each rule feature value category in the preset rule table and all preset rules in which the current rule feature value category is located in the preset rule table; a third acquisition module, configured to acquire a data list based on the target feature values and the data feature values of each data field included in each piece of data to be processed, the data list including: a mapping relationship between each target feature value and all the data to be processed in which each target feature value is located; and a fourth acquisition module, configured to acquire the preset rule that each piece of data to be processed conforms to based on the data list and the preset rule feature value list.
[0012] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the data rule matching method described in any one of the above.
[0013] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the data rule matching method described in any one of the above descriptions.
[0014] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the data rule matching method described in any one of the above descriptions. Attached Figure Description
[0015] Figure 1 is a flowchart illustrating a data rule matching method according to an exemplary embodiment;
[0016] Figure 2 is a schematic diagram of the functional modules of a data rule matching device provided in an embodiment of this application;
[0017] Figure 3 is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0020] Figure 1 is a flowchart illustrating a data rule matching method according to an exemplary embodiment. As shown in Figure 1, the method includes the following steps S101-S104:
[0021] In step S101, the data feature values of each data field included in each piece of data to be processed are obtained.
[0022] The regular expression function `regexp_matches` can be used to calculate the data feature value of each data field in each piece of data to be processed. For example, the first piece of data to be processed, `data1`, includes two data fields. The data feature value corresponding to the first data field is `m1`, and the data feature value corresponding to the second data field is `s1`. Therefore, the data feature value corresponding to the first piece of data to be processed, `data1`, is {m1, s1}. The second piece of data to be processed, `data2`, includes three data fields. The data feature value corresponding to the first data field is `s2`, and the data feature value corresponding to the second data field is `s2`. The data feature value corresponding to the second data field is s1, and the data feature value corresponding to the third data field of the second data to be processed is m1. Therefore, the data feature value corresponding to the second data to be processed is data2 = {s2, s1, m1}. The third data to be processed, data3, includes three data fields. The data feature value corresponding to the first data field of the third data to be processed is s2, the data feature value corresponding to the second data field of the third data to be processed is s1, and the data feature value corresponding to the third data field of the third data to be processed is m2. Therefore, the data feature value corresponding to the third data to be processed is data3 = {s2, s1, m2}.
[0023] In step S102, the target feature value in the data feature value that is the same as the rule feature value category in the preset rule feature value list is obtained. The preset rule feature value list includes the mapping relationship between each rule feature value category in the preset rule table and all preset rules in which the current rule feature value category is located in the preset rule table.
[0024] Before executing the data rule matching method in this disclosure, a list of preset rule feature values in step S102 can be obtained first, specifically including the following sub-steps A1-A3:
[0025] A1. Obtain the rule feature value corresponding to each rule field in each preset rule in the preset rule table.
[0026] The regular expression function regexp_matches can be used to obtain the rule feature values corresponding to each rule field in each preset rule in the preset rule table.
[0027] For example: Preset rule 1 includes two preset fields. The rule feature value corresponding to the first rule field in preset rule 1 is s1, and the rule feature value corresponding to the second rule field in preset rule 1 is s2. The rule feature value corresponding to preset rule 1 is c1 = {s1, s2}. As another example, preset rule 2 also includes three rule fields. The rule feature value corresponding to the first rule field in preset rule 2 is s2, the rule feature value corresponding to the second rule field in preset rule 2 is s3, and the rule feature value corresponding to the third rule field in preset rule 2 is s4. The rule feature value corresponding to preset rule 2 is c2 = {s2, s3, s4}.
[0028] A2. Obtain the rule feature value category in the preset rule table based on all rule feature values in the preset rule table. The same rule feature values form a rule feature value category.
[0029] In this step, the same rule feature values are classified. Continuing with the example above, the rule feature value corresponding to the preset rule 1 is c1 = {s1, s2}, and the rule feature value corresponding to the preset rule 2 is c2 = {s2, s3, s4}. Then the rule feature value categories are: s1, s2, s3, and s4.
[0030] A3. Based on the rule feature value corresponding to each rule field in each preset rule in the preset rule table and the rule feature value category in the preset rule table, obtain the preset rule feature value list.
[0031] The list of preset rule feature values obtained at this time is shown in Table 1:
[0032] Table 1
[0033] In Table 1, the preset rule for rule feature value category s1 is c1, the preset rules for rule feature value category s2 are c1 and c2, the preset rule for rule feature value category s3 is c2, and the preset rule for rule feature value category s4 is c2.
[0034] As can be seen from step S101, the data feature value corresponding to the first piece of data to be processed is data1 = {m1, s1}; the data feature value corresponding to the second piece of data to be processed is data2 = {s2, s1, m1}; and the data feature value corresponding to the third piece of data to be processed is data3 = {s2, s1, m2}.
[0035] Specifically, after the data feature value data1 = {m1, s1} corresponding to the first piece of data to be processed is matched with the preset rule feature value list (Table 1 above), the target feature value s1 corresponding to the first piece of data to be processed has the same category as the rule feature value. After the data feature value data2 = {s2, s1, m1} corresponding to the second piece of data to be processed is matched with the preset rule feature value list (Table 1 above), the target feature values s1 and s2 corresponding to the second piece of data to be processed have the same category as the rule feature value. After the data feature value data3 = {s2, s1, m2} corresponding to the third piece of data to be processed is matched with the preset rule feature value list (Table 1 above), the target feature values s1 and s2 corresponding to the third piece of data to be processed have the same category as the rule feature value.
[0036] After this step, the target feature values obtained are s1 and s2.
[0037] In this step, if none of the data feature values of the data fields included in the data to be processed match the category of the rule feature value, a prompt message is output. The prompt message is used to indicate that the data to be processed does not conform to the preset rule in the preset rule feature value list.
[0038] In step S103, a data list is obtained based on the target feature value and the data feature value of each data field included in each piece of data to be processed. The data list includes the mapping relationship between each target feature value and all the data to be processed containing each target feature value.
[0039] The resulting data list is shown in Table 2:
[0040] Table 2
[0041] In Table 2, the data to be processed containing the target feature value s1 are: the first data to be processed, the second data to be processed, and the third data to be processed; the data to be processed containing the target feature value s2 are: the second data to be processed and the third data to be processed.
[0042] In step S104, the preset rule that each piece of data to be processed conforms to is obtained according to the data list and the preset rule feature value list.
[0043] The preset rules that each piece of data to be processed can be obtained from Tables 2 and 1.
[0044] Continuing with the example above: Table 2 shows that the target feature value of the first, second, and third pending data is s1. Table 1 shows that the preset rule for the target feature value s1 is c1. Therefore, the first and second pending data conform to the preset rule c1. Similarly, the target feature value of the second and third pending bill data is s2. Table 1 shows that the preset rules for the target feature value s2 are c1 and c2. Therefore, the second and third pending bill data conform to the preset rules c1 and c2.
[0045] Ultimately, based on the fact that the first and second pending data pieces meet preset rule c1, and the second and third pending bill data pieces meet preset rules c1 and c2, it can be concluded that the first pending data piece meets preset rule c1, the second pending bill data meets preset rules c1 and c2, and the third pending bill data meets preset rules c1 and c2.
[0046] In existing technologies, when matching rules to data, each piece of data to be processed needs to be matched with each preset rule to obtain the preset rules that each piece of data to be processed satisfies. This leads to very low matching efficiency. Continuing with the example above, the three pieces of data to be processed need to be matched with each preset rule separately. Since there are two preset rules, this requires six matching operations. If there are 10,000 pieces of data to be processed and 100 preset rules, each piece of data to be processed must be matched 100 times, and 10,000 pieces of data to be processed must be matched a million times. In reality, the data to be processed that satisfy the same preset rule will have the same characteristics, and there is no need to repeat the process. Based on this consideration, this disclosure will feature the preset rules and the massive amount of data to be processed, find the rule feature values that are the same as the rule feature values of the preset rules among the data feature values of the massive amount of data to be processed, and then determine the preset rule corresponding to each piece of data to be processed based on these same rule feature values, thereby reducing the amount of data and improving the rule matching efficiency. Following the example above, after obtaining Table 2, we only need to perform matching twice based on the target feature value, thereby reducing the amount of data processing and improving matching efficiency.
[0047] New business operations generate new data to be processed, and the original preset rules can no longer be applied. In this case, new rules need to be added, but modifying rules requires modifying the code. Since the rules are hard-coded, the efficiency is low and the user experience is poor.
[0048] This application also provides an application scenario in which the above-mentioned data rule matching method is applied. Specifically, the data rule matching method provided in this embodiment can be applied to an e-commerce ERP system. Taking billing data in an ERP system as an example, the ERP system will classify and summarize the billing data obtained from various e-commerce platforms by expense items. As the business of various e-commerce platforms is constantly developing and changing, new business rules are emerging one after another, which will cause the expense items in the billing data to be updated accordingly. Therefore, the ERP system needs to add new classification rules in a timely manner as the business of e-commerce platforms changes. In related technologies, the original classification rules are generally hard-coded into the code and are not configurable on the page. Every time the rules are modified or a preset rule is added, the rule configuration, the online order number regular expression, and the billing expense related code need to be modified. The job service needs to be published after the modification is completed to take effect, which will result in a poor user experience.
[0049] To enhance user experience, the preset rule table in this disclosure is configured via a page, allowing users to modify and delete rules at any time. Specifically:
[0050] When adding a new preset rule to the preset rule table, the following sub-steps C1-C5 are included:
[0051] C1. Receive newly added preset rules.
[0052] C2. Add the new preset rules to the preset rule table to obtain the updated rule table.
[0053] C3. Obtain the rule feature value corresponding to each rule field in each preset rule of the update rule table.
[0054] C4. Obtain the rule feature value category in the update rule table based on all rule feature values in the update rule table.
[0055] C5. Based on the rule feature value corresponding to each rule field in each preset rule of the update rule table and the rule feature value category in the update rule table, obtain the update rule feature value list corresponding to the update rule table. The update rule feature value list includes: the mapping relationship between each rule feature value category in the update rule table and all preset rules in the update rule table where the rule feature value category in the current update rule table is located.
[0056] When adding a new preset rule, the user can directly enter the new preset rule in the preset rule table. After the preset rule table is updated, the rule feature value list will be updated again to obtain the updated rule feature value list. The updated rule feature value list will be used for matching in the next rule matching.
[0057] Deleting a preset rule from the preset rule table includes the following sub-steps D1-D5:
[0058] D1. Receive rule deletion instructions, which include the target rule in the preset rule table to be deleted;
[0059] D2. Delete the target rule in the preset rule table according to the rule deletion command to obtain the deletion rule table;
[0060] D3. Obtain the rule feature value corresponding to each rule field in each preset rule of the deletion rule table;
[0061] D4. Obtain the rule feature value category from the deletion rule table based on all rule feature values in the deletion rule table;
[0062] D5. Based on the rule feature value corresponding to each rule field in each preset rule of the deletion rule table and the rule feature value category in the deletion rule table, obtain the deletion rule feature value list corresponding to the deletion rule table; the deletion rule feature value list includes: the mapping relationship between the rule feature value category in each deletion rule table and all preset rules in the deletion rule table where the rule feature value category in the current deletion rule table is located.
[0063] When deleting a preset rule, the user can directly select the target rule in the preset rule table to be deleted, and then delete the target rule in the preset rule table according to the rule deletion command to obtain the deleted target rule table. After obtaining the deleted target rule table, the rule feature value list will be updated again to obtain the deleted rule feature value list. The deleted rule feature value list will be used for matching in the next rule matching.
[0064] Based on the same inventive concept, this application also provides a data rule matching apparatus for implementing the data rule matching method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more data rule matching apparatus embodiments provided below can be found in the limitations of the data rule matching method described above, and will not be repeated here.
[0065] In an exemplary embodiment, as shown in FIG2, a data rule matching device is provided, comprising:
[0066] The first acquisition module 11 is used to acquire the data feature value of each data field included in each piece of data to be processed;
[0067] The second acquisition module 12 is used to acquire target feature values in the data feature values that are the same as the rule feature value categories in the preset rule feature value list. The preset rule feature value list includes: the mapping relationship between each rule feature value category in the preset rule table and all preset rules in which the current rule feature value category is located in the preset rule table;
[0068] The third acquisition module 13 is used to acquire a data list based on the target feature value and the data feature value of each data field included in each piece of data to be processed. The data list includes: the mapping relationship between each target feature value and all the data to be processed in which each target feature value is located;
[0069] The fourth acquisition module 14 is used to acquire the preset rules that each piece of data to be processed conforms to based on the data list and the preset rule feature value list.
[0070] In one exemplary embodiment, the data rule matching device further includes:
[0071] The output module is used to output a prompt message if none of the data feature values of the data fields included in the data to be processed match the category of the rule feature value. The prompt message is used to indicate that the data to be processed does not conform to the preset rule in the preset rule feature value list.
[0072] In one exemplary embodiment, the data rule matching device further includes:
[0073] The fifth acquisition module is used to acquire the rule feature value corresponding to each rule field in each preset rule in the preset rule table before the second acquisition module acquires the target feature value that is the same as the rule feature value category in the preset rule feature value list.
[0074] Obtain the rule feature value category from the preset rule table based on all rule feature values in the preset rule table, where the same rule feature values form a rule feature value category;
[0075] Based on the rule feature value corresponding to each rule field in each preset rule in the preset rule table and the rule feature value category in the preset rule table, obtain the preset rule feature value list.
[0076] In one exemplary embodiment, the data rule matching device further includes:
[0077] The first receiving module is used to receive newly added preset rules;
[0078] The add module is used to add new preset rules to the preset rule table to obtain the updated rule table;
[0079] The sixth acquisition module is used to acquire the rule feature value corresponding to each rule field in each preset rule of the update rule table;
[0080] The seventh acquisition module is used to obtain the rule feature value category in the update rule table based on all rule feature values in the update rule table;
[0081] The eighth acquisition module is used to acquire the update rule feature value list corresponding to the update rule table based on the rule feature value corresponding to each rule field in each preset rule of the update rule table and the rule feature value category in the update rule table. The update rule feature value list includes: the mapping relationship between each rule feature value category in the update rule table and all preset rules in the update rule table where the rule feature value category in the current update rule table is located.
[0082] In one exemplary embodiment, the data rule matching device further includes:
[0083] The second receiving module is used to receive rule deletion instructions, which include the target rule in the preset rule table to be deleted.
[0084] The deletion module is used to delete target rules from a preset rule table according to rule deletion instructions, thereby obtaining a deletion rule table;
[0085] The ninth module is used to obtain the rule feature value corresponding to each rule field in each preset rule of the deletion rule table;
[0086] The tenth acquisition module is used to obtain the rule feature value category in the deletion rule table based on all rule feature values in the deletion rule table;
[0087] The eleventh acquisition module is used to obtain a list of deletion rule feature values corresponding to the deletion rule table based on the rule feature value corresponding to each rule field in each preset rule of the deletion rule table and the rule feature value category in the deletion rule table. The list of deletion rule feature values includes: the mapping relationship between the rule feature value category in each deletion rule table and all preset rules in the deletion rule table where the rule feature value category in the current deletion rule table is located.
[0088] In one exemplary embodiment, the first acquisition module specifically includes:
[0089] The `get` submodule is used to retrieve the data feature values of each data field included in each piece of data to be processed using regular expression functions.
[0090] In an exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram is shown in Figure 3. The computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is connected to the system bus via the I / O interfaces. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device stores data rule matching data. The I / O interfaces of the computer device are used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a data rule matching method.
[0091] Those skilled in the art will understand that the structure shown in Figure 3 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or may combine certain components, or may have different component arrangements.
[0092] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0093] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0094] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0095] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0096] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0097] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0098] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0099] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A data rule matching method, characterized in that, The data rule matching method includes: Obtain the data feature values of each data field included in each piece of data to be processed; Obtain the target feature value from the data feature values that is the same as the rule feature value category in the preset rule feature value list. The preset rule feature value list includes: the mapping relationship between each rule feature value category in the preset rule table and all preset rules in which the current rule feature value category is located in the preset rule table; A data list is obtained based on the target feature value and the data feature value of each data field included in each piece of data to be processed. The data list includes: the mapping relationship between each target feature value and all the data to be processed containing each target feature value. Based on the data list and the preset rule feature value list, obtain the preset rule that each piece of data to be processed conforms to.
2. The data rule matching method according to claim 1, characterized in that, The data rule matching method further includes: If none of the data feature values of the data fields included in the data to be processed match the category of the rule feature value, a prompt message is output. The prompt message is used to indicate that the data to be processed does not conform to the preset rule in the preset rule feature value list.
3. The data rule matching method according to claim 1, characterized in that, Before obtaining the target feature value in the data feature value that has the same category as the rule feature value in the preset rule feature value list, the data rule matching method further includes: Obtain the rule feature value corresponding to each rule field in each preset rule in the preset rule table; The rule feature value category in the preset rule table is obtained based on all the rule feature values in the preset rule table, wherein the same rule feature values form a rule feature value category; Based on the rule feature value corresponding to each rule field in each preset rule in the preset rule table and the rule feature value category in the preset rule table, obtain the preset rule feature value list.
4. The data rule matching method according to claim 3, characterized in that, The data rule matching method further includes: Receive newly added preset rules; The newly added preset rule is added to the preset rule table to obtain the updated rule table; Obtain the rule feature value corresponding to each rule field in each preset rule of the update rule table; The rule feature value category in the update rule table is obtained based on all rule feature values in the update rule table; Based on the rule feature value corresponding to each rule field in each preset rule of the update rule table and the rule feature value category in the update rule table, an update rule feature value list corresponding to the update rule table is obtained. The update rule feature value list includes: the mapping relationship between each rule feature value category in the update rule table and all preset rules in the update rule table where the current rule feature value category in the update rule table is located.
5. The data rule matching method according to claim 3, characterized in that, The data rule matching method further includes: Receive a rule deletion instruction, wherein the rule deletion instruction includes the target rule to be deleted from the preset rule table; The target rule in the preset rule table is deleted according to the rule deletion instruction to obtain the deletion rule table; Obtain the rule feature value corresponding to each rule field in each preset rule of the deletion rule table; The rule feature value category in the deletion rule table is obtained based on all rule feature values in the deletion rule table; Based on the rule feature value corresponding to each rule field in each preset rule of the deletion rule table and the rule feature value category in the deletion rule table, a deletion rule feature value list corresponding to the deletion rule table is obtained; the deletion rule feature value list includes: the mapping relationship between each rule feature value category in the deletion rule table and all preset rules in the deletion rule table where the current rule feature value category in the deletion rule table is located.
6. The data rule matching method according to claim 1, characterized in that, The step of obtaining the data feature value of each data field included in each piece of data to be processed specifically includes: Use regular expression functions to obtain the data feature values of each data field included in each piece of data to be processed.
7. A data rule matching device, characterized in that, The data rule matching device includes: The first acquisition module is used to acquire the data feature values of each data field included in each piece of data to be processed; The second acquisition module is used to acquire target feature values in the data feature values that are the same as the rule feature value categories in the preset rule feature value list. The preset rule feature value list includes: the mapping relationship between each rule feature value category in the preset rule table and all preset rules to which the current rule feature value category belongs; The third acquisition module is used to acquire a data list based on the target feature value and the data feature value of each data field included in each piece of data to be processed. The data list includes: the mapping relationship between each target feature value and all the data to be processed containing each target feature value. The fourth acquisition module is used to acquire the preset rule that each piece of data to be processed conforms to based on the data list and the feature value list.
8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the data rule matching method according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the data rule matching method according to any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the data rule matching method according to any one of claims 1-6.
Citation Information
Patent Citations
Method and device for processing data
CN105786950A
Information recommendation method and device
CN112084291A
Data storage method, data query method and related devices
CN117972012A
Data storage method and device, data query method and device and electronic equipment
CN118193518A
Incremental updates for ordered multi-field classification rules when represented by a tree of longest prefix matching tables
US20150149395A1