Rule input parameter json file compression method and device and storage medium

By merging, cleaning, and optimizing the rule input data of the financial transaction system, a preferred root word table is constructed and compressed to generate a preferred root word tree. This solves the problem of low JSON file compression efficiency and achieves efficient data storage and fast querying.

CN119337826BActive Publication Date: 2025-10-24WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411369375.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-10-24
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

In financial transaction scenarios, existing technologies have low compression efficiency for JSON files, especially in the storage and retrieval of JSON files containing rule input parameters, where frequent updates to the encoding dictionary lead to poor compression results.

Method used

By acquiring the rule input data from the financial business system, the data is merged and cleaned, a preferred word root table is constructed using the preferred splitting algorithm, the rule input data is compressed to generate a preferred word root tree, and finally serialization is performed to generate a compressed JSON file.

Benefits of technology

It improves the compression efficiency of JSON files, reduces data storage space, and enables fast data retrieval and querying without relying on an encoding dictionary, thus improving data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119337826B_ABST
    Figure CN119337826B_ABST
Patent Text Reader

Abstract

The application discloses a rule input parameter json file compression method and device and a storage medium, comprising the following steps: obtaining rule input parameter data of a financial business system in a first preset time period to obtain first rule input parameter data; performing data merging processing on the first rule input parameter data to obtain second rule input parameter data; obtaining first key data in the second rule input parameter data, performing a preset cleaning operation on the first key data to obtain second key data; splitting the second key data according to an optimal splitting algorithm to obtain an optimal root table; obtaining rule input parameter data of the financial business system in a second preset time period to obtain target rule input parameter data; compressing the target rule input parameter data according to the optimal root table to obtain an optimal root tree; and performing serialization on the optimal root tree to generate a compressed target json file. The application improves the compression efficiency of the json file.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of data compression, in particular to a rule input parameter json file compression method and device and storage medium. BACKGROUND

[0002] In a financial transaction scenario, a rule engine is generally used to control complex business logic, and for the convenience of quick verification and batch testing, rule input parameters are often saved in a hive (hive Data Warehouse Software) in the form of a json (JavaScript Object Notation) file.

[0003] Since the json file storing the rule input parameters is large, the json file needs to be compressed when being written into the hive. Generally, the key of the json file is simplified and encoded, the key is re-encoded into a key with a length of 1, and the encoding dictionary of the key is cached on the client side. The disadvantage of this method is that if the dictionary changes, the latest encoding dictionary needs to be read from the server again. The size of the encoding dictionary is often equivalent to the size of the json file before compression. If the encoding dictionary needs to be read again every time, the compression effect cannot be achieved, and the compression efficiency is low.

[0004] Therefore, in the financial transaction scenario, the problem of how to improve the compression efficiency of the json file needs to be solved. SUMMARY

[0005] The application provides a rule input parameter json file compression method and device and storage medium, which improves the compression efficiency of the json file.

[0006] In a first aspect, the application provides a rule input parameter json file compression method applied to a financial business system, and the method comprises the following steps.

[0007] Obtaining rule input parameter data of the financial business system in a first preset time period to obtain first rule input parameter data;

[0008] Performing data merging processing on the first rule input parameter data to obtain second rule input parameter data;

[0009] Obtaining first key data in the second rule input parameter data, performing a preset cleaning operation on the first key data to obtain second key data;

[0010] Splitting the second key data according to an optimal splitting algorithm to obtain an optimal root table;

[0011] obtain target rule parameter data by obtaining rule parameter data of the financial business system in a second preset time period; a starting time point of the second preset time period is later than an ending time point of the first preset time period;

[0012] obtain a preferred root tree by compressing the target rule parameter data according to the preferred root table;

[0013] serialize the preferred root tree to generate a compressed target json file.

[0014] In a second aspect, an embodiment of the present application provides a rule parameter json file compression device, applied to a financial business system, and the device comprises an obtaining unit, a control unit and a splitting unit, wherein:

[0015] The obtaining unit is configured to obtain first rule parameter data by obtaining rule parameter data of the financial business system in a first preset time period.

[0016] The control unit is configured to obtain second rule parameter data by performing data merging processing on the first rule parameter data.

[0017] The obtaining unit is further configured to obtain second key data by performing a preset cleaning operation on first key data in the second rule parameter data.

[0018] The splitting unit is configured to obtain a preferred root table by splitting the second key data according to a preferred splitting algorithm.

[0019] The obtaining unit is further configured to obtain target rule parameter data by obtaining rule parameter data of the financial business system in a second preset time period; a starting time point of the second preset time period is later than an ending time point of the first preset time period.

[0020] The splitting unit is further configured to obtain a preferred root tree by compressing the target rule parameter data according to the preferred root table.

[0021] The control unit is further configured to generate a compressed target json file by serializing the preferred root tree.

[0022] In a third aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform some or all of the steps described in the first aspect of the present application.

[0023] In a fourth aspect, the present application provides an electronic device, comprising: a processor, a memory, the memory being configured to store one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program comprises instructions for executing the steps in the first aspect of the present application.

[0024] In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the present application. The computer program product can be a software installation package.

[0025] The present application has the following advantages:

[0026] It can be seen that the rule parameter json file compression method described in the present application is applied to a financial business system, and the method comprises: obtaining rule parameter data of the financial business system in a first preset time period to obtain first rule parameter data; performing data merging processing on the first rule parameter data to obtain second rule parameter data; obtaining first key data in the second rule parameter data, performing a preset cleaning operation on the first key data to obtain second key data; splitting the second key data according to an optimal splitting algorithm to obtain an optimal root table; obtaining rule parameter data of the financial business system in a second preset time period to obtain target rule parameter data; compressing the target rule parameter data according to the optimal root table to obtain an optimal root tree; and serializing the optimal root tree to generate a compressed target json file. According to the optimal root table, the target rule parameter data is compressed to obtain an optimal root tree, which is a high-efficiency data structure, can merge and compress similar data, reduce the storage space of data, and at the same time, the optimal root tree does not need to rely on an encoding dictionary, and can quickly perform data retrieval and query, improve the data processing efficiency, and thus improve the compression efficiency of the json file. BRIEF DESCRIPTION OF DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background art, the drawings needed to be used in the embodiments of the present application or the background art will be described below.

[0028] Figure 1 is a structural schematic diagram of a financial business system provided by the embodiments of the present application;

[0029] Figure 2 is a flowchart of a rule parameter json file compression method provided by the embodiments of the present application;

[0030] Figure 3is a schematic diagram of a preferred root tree provided by an embodiment of the present application;

[0031] Figure 4 is a schematic diagram of another preferred root tree provided by an embodiment of the present application;

[0032] Figure 5 is a functional unit block diagram of a rule input parameter json file compression device provided by an embodiment of the present application;

[0033] Figure 6 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor fall within the scope of protection of the present application.

[0035] The terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product or device.

[0036] In this document, the term "embodiment" means that the specific features, structures or characteristics described in connection with the embodiment can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor is it independent or alternative to other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0037] The electronic device described in the embodiments of the present application can include a smart phone (such as an Android phone, an iOS phone, a Windows Phone phone, etc.), a tablet computer, a palm computer, a notebook computer, a video matrix, a monitoring platform, a mobile internet device (MID) or a wearable device, etc. The above are only examples and are not exhaustive, including but not limited to the above devices. Of course, the above electronic device can also be a server, for example, a cloud server.

[0038] Some professional terms involved in the present application will be explained as follows:

[0039] json(JavaScript Object Notation): a lightweight data exchange format. json data is composed of key-value pairs, where both keys and values must be enclosed in double quotes, and key-value pairs are separated by commas.

[0040] Rule input: a set composed of N risk variables, for the convenience of data analysis or batch testing, generally stored in a single-level json field. In the financial field, the rule input has the following characteristics: the key field is long, the single rule input has no repetition, the input naming has a regularity, the same type of rule input has the same prefix, the array is also a single-level representation, and the array subscript is distinguished by [number].

[0041] Risk variable: a set of key-value pairs, where the key represents the risk variable name and the value represents the variable value, for example, {"name": "10"}.

[0042] Hive(hive Data Warehouse Software): a data warehouse tool based on Hadoop. Hive can map structured data files into a database table and provide SQL-like query functions for querying and analyzing large-scale data stored in the Hadoop distributed file system. It enables developers familiar with SQL language to easily perform data query, summary, analysis and other operations without directly writing complex operation programs.

[0043] Serialization: converting the preferred root tree data structure into a format that can be persistently stored or transmitted, usually in text format, to facilitate reading and recovery at different systems, environments or time points. The inverse process of serialization is deserialization. When the preferred root tree is needed, the data can be read from the serialized format and restored to the original tree data structure.

[0044] Please refer to Figure 1 , Figure 1 is a structural diagram of a financial business system provided by an embodiment of the present application. It can be known that the financial business system comprises a preferred root table modeling system, a business system, a database (db), a data extraction module, a hive, and a data processing module. The preferred root table modeling system comprises a data acquisition module, a data cleaning module, a preferred root table construction module, a first communication module, and the like, which are not limited here. The business system comprises a second communication module, a business processing module, and the like, which are not limited here.

[0045] Preferably, the preferred root table modeling system is used to build a preferred root table. Specifically, the historical rule parameter data of the financial business system is collected by the data collection module, which is the basis for building the optimal root table. By collecting historical data, the various situations and trends of rule parameters in the business system can be understood. The data cleaning module cleans the collected historical rule parameter data, such as removing invalid data, noise data and abnormal data, etc., to improve the quality and reliability of the data. The preferred root table construction module constructs the latest optimal root table according to the cleaned data. The first communication module is used to realize the communication between the preferred root table modeling system and the business system, and the built optimal root table is pushed to the business system to ensure that the business system can obtain the latest root table information in time to compress and process the rule parameter.

[0046] The business system receives the preferred root table of the preferred root table modeling system and processes the rule parameter data according to the preferred root table to obtain the preferred root tree. Specifically, the second communication module receives the optimal root table pushed by the preferred root table modeling system, and the business processing module processes the rule parameter data in the business system according to the received optimal root table, and converts it into a more compact and efficient data structure, i.e. the optimal root tree.

[0047] The db is used to store the compressed optimal root tree data of the business system as a persistent storage medium for data. The database db can safely save the rule parameter data processed by the business system for subsequent query and analysis.

[0048] The data extraction module is responsible for asynchronously writing the rule parameter optimal root tree json data from the application system database to the hive. The data is transferred from the database of the business system to the hive for large-scale data storage and analysis.

[0049] The hive is used as a data warehouse to store the rule parameter optimal root tree data extracted from the database of the business system. The hive provides large-scale data storage and analysis capabilities, and can perform complex query and analysis operations on the rule parameter data. The hive can also provide data for business personnel to analyze the business situation of the financial business system.

[0050] The data processing module is used to deserialize the optimal root tree and further process and analyze the data read from the hive to meet specific business needs. For example, the optimal root tree data in the hive is deserialized into a data structure in memory, and data cleaning, conversion, aggregation, etc. operations are performed to generate reports, analysis results, etc. output, providing more valuable information for business decision-making.

[0051] Please refer toFigure 2 , Figure 2 is a flowchart of a rule input json file compression method provided by an embodiment of the present application, applied to a financial business system, the method comprising:

[0052] S201, acquiring rule input data of the financial business system in a first preset time period, to obtain first rule input data.

[0053] In the embodiment of the present application, the first preset time period can be preset or default, for example, the first preset time period can be the past week, month or year; the structure of the financial business system can be as shown in Figure 1 .

[0054] In specific embodiments, the rule input data of the financial business system is generally stored in the form of json in hive, and the hive query language can be used to acquire the rule input data in the first preset time period in hive, thereby obtaining the first rule input data.

[0055] S202, performing data merging processing on the first rule input data to obtain second rule input data.

[0056] In the embodiment of the present application, the first rule input data can be subjected to data merging processing to obtain the second rule input data, specifically, the data merging processing can be merging by day, the data in the first rule input data is merged by time, the data of the same day is merged together to obtain merged data, then the merged data can be checked to ensure the accuracy of data merging, some data can be randomly extracted for verification, or compared with the original data to ensure that the result after merging meets the expectation, for example, whether the total sum of the merged data is consistent with the total sum of the original data, or whether the number of merged data meets the expectation, in addition, if abnormal conditions occur during merging, such as data type mismatch, missing values and the like, data filling, adjusting data type and the like can be performed according to the specific circumstances, for example, if there are missing values in a field, the mean, median or other appropriate method can be used for filling, and if the data types are not matched, type conversion can be performed.

[0057] S203, acquiring first key data in the second rule input data, performing a preset cleaning operation on the first key data to obtain second key data.

[0058] In the embodiments of the present application, the key data refers to the name of each key of the rule input parameter stored in the single-level json field. For example, assuming that a rule input parameter is {"loan_amount": 50000}, the key of the rule input parameter is loan_amount, and 50000 is the value.

[0059] In specific embodiments, the first key data in the second rule input parameter data is obtained. Specifically, since the second rule input parameter data is stored in the form of json, a language suitable for processing json data, such as Python, JavaScript, etc., can be selected. These languages usually have special libraries to process json data, and all key values in the second rule input parameter data, i.e., the first key data, can be obtained by traversing the key list. Then, the first key data can be subjected to a preset cleaning operation to obtain the second key data.

[0060] Optionally, the step S203 of performing a preset cleaning operation on the first key data to obtain the second key data can include the following steps:

[0061] S31, obtaining a first array key in the first key data to obtain k first array keys; k is a natural number;

[0062] S32, replacing the array index of each first array key in the k first array keys with a preset character by using a preset replacement method to obtain k second array keys after replacement;

[0063] S33, performing a deduplication processing on the k second array keys to obtain h second array keys; h is a natural number less than or equal to k;

[0064] S34, replacing the k first array keys in the first key data with the h second array keys to obtain reference second key data;

[0065] S35, sorting the reference second key data according to a preset sorting method to obtain the second key data.

[0066] In the embodiments of the present application, the preset replacement method, the preset character, and the preset sorting method can be preset or defaulted in advance. The array key refers to the key of the data item stored in the form of an array in the rule input parameter data.

[0067] In specific embodiments, first array keys can be found from the first key data, obtaining k first array keys; then, a preset replacement method can be used to replace the array index of each first array key in the k first array keys with a preset character, obtaining k second array keys after replacement. Specifically, the preset replacement method can be a regular expression, and the preset character can be “*”. The array index in the k first array keys is replaced with “*” by using the regular expression, obtaining k second array keys. For example, assuming that a certain array key is bs_score_1[1], after replacement, it becomes bs_score_1[*].

[0068] Further, the k second array keys can be subjected to a de-duplication process to delete the duplicate array keys therefrom, obtaining h second array keys without duplicate array keys; then, the h second array keys can be used to replace the k first array keys in the first key data, obtaining reference second key data; then, the reference second key data can be sorted according to a preset sorting method, obtaining second key data. Specifically, the preset sorting method can be a natural sequence sorting method. The keys in the reference second key data are sorted according to the natural sequence sorting method, obtaining the second key data. For example, assuming that there are three keys, and their order in the reference second key data is als.score2, bs_score_[*], and als.score1, then after the preset sorting method, their order is als.score1, als.score2, and bs_score_[*].

[0069] The natural sequence sorting method (Natural Sort Order) is a method of sorting strings according to human habits, and is particularly suitable for strings containing numbers.

[0070] In this way, by obtaining the first array keys in the first key data, k first array keys are obtained; by using a preset replacement method to replace the array index of each first array key in the k first array keys with a preset character, k second array keys after replacement are obtained; by subjecting the k second array keys to a de-duplication process, h second array keys are obtained; by using the h second array keys to replace the k first array keys in the first key data, reference second key data is obtained; and by sorting the reference second key data according to a preset sorting method, second key data can be obtained.

[0071] S204, splitting the second key data according to the preferred splitting algorithm to obtain a preferred root table.

[0072] Optionally, the step S204 of splitting the second key data according to the preferred splitting algorithm to obtain the preferred root table can include the following steps:

[0073] S1, determining the keys contained in the second key data to obtain i keys, the i keys forming a set S; i is a positive integer;

[0074] S2, obtaining the word stems corresponding to the i keys to obtain m word stems; there is no repeated word stem in the m word stems; m is a positive integer less than or equal to i;

[0075] S3, determining the word stems in the m word stems that meet the target condition to obtain j word stems, the j word stems forming a set P; j is a positive integer less than or equal to m;

[0076] S4, calculating the yield coefficient of each key in the set S using the word stems in the set P according to a preset first yield calculation formula to obtain a yield coefficient; a is equal to the product of i and j;

[0077] S5, determining the yield matrix Aij corresponding to the a yield coefficients;

[0078] S6, determining all possible word stem arrangement orders of the word stems in the set P to obtain x word stem arrangement orders; m is a positive integer;

[0079] S7, splitting each key in the set S according to the x word stem arrangement orders and the j word stems to obtain m target splitting results;

[0080] S8, determining a first-level preferred root table according to the yield matrix Aij and the m target splitting results;

[0081] According to steps S1-S8, the first-level preferred root table is iteratively processed until a preset number of iterations or the number of elements in the set P is zero, and the iteration ends to obtain the preferred root table.

[0082] In the embodiments of the application, the preset number of times can be preset or defaulted in advance.

[0083] In specific embodiments, the keys included in the second key data can be determined to obtain i keys, and then the i keys can form a set S. Then, the prefixes corresponding to the i keys can be obtained to obtain m prefixes. Specifically, the prefixes corresponding to each of the i keys can be obtained to obtain w prefixes, where w is an integer greater than or equal to i. This is because one key can have multiple splitting methods, that is, one key can correspond to multiple prefixes. For example, assuming that a key is pbc_info.detail.detail_loan[*].detail_ag_begin_dt, the prefixes of the key can be one of the following: "pbc_info", "pbc_info.detail", and the like. Then, the w prefixes can be de-duplicated to remove the duplicate prefixes, thereby obtaining m prefixes. Then, the prefixes in the m prefixes that satisfy the target condition can be determined to obtain j prefixes, and the j prefixes form a set P. Further, the yield coefficient of each key in the set S when the key is split using the prefixes in the set P can be calculated according to a preset first yield calculation formula. The first yield calculation formula is specifically as follows:

[0084] c = ((k - y) * n - k) / n;

[0085] where c is the yield coefficient of the prefix c, the prefix c is any one of the j prefixes; k is the length of the prefix c; n is the number of keys split using the prefix c; y is a preset pointer length, y is an integer greater than or equal to 3, and y is used to adjust the compression rate of the data. The larger y is, the smaller the compression rate is. In embodiments of the present application, in order to maximize the compression rate, y can be set to 3. According to the first yield calculation formula, a yield coefficients can be obtained. Then, a corresponding yield matrix Aij can be constructed according to the a yield coefficients. The yield matrix Aij is specifically as follows:

[0086]

[0087] where Aij represents the yield coefficient of the i-th prefix split using the j-th prefix, and Aij satisfies the following conditions: ij ij

[0088]

[0089] Then, all possible prefix orders of the prefixes in the set P can be determined. The j prefix orders in the set P can be calculated according to a permutation combination calculation formula to obtain x prefix orders. The permutation combination calculation formula is a conventional technique, which is not limited herein.

[0090] ​​Wherein, A(n, m) represents the number of all permutations of m elements taken from n different elements; let n = j, m = j, and bring into the formula to calculate x; then, each key in the set S can be split according to the x word head permutation order and j word heads to obtain m target split results; then, the first-level preferred root table can be determined according to the profit matrix Aij and the m target split results.

[0091] Further, since the first-level preferred root table can be further split, the first-level preferred root table can be iteratively processed according to steps S1-S8 until the iteration is performed for a preset number of times, or the number of elements in the set P is zero, and the iteration is ended to obtain the preferred root table.

[0092] In this way, by determining the key in the second key data and obtaining the corresponding word head, the data can be preliminarily structured, so that the complex data set becomes clearer, facilitating subsequent data processing and analysis. In addition, the profit coefficient of splitting each key by using different word heads can quantify the value of different splitting methods, so as to select the optimal splitting scheme and improve the compression rate of data.

[0093] Optionally, step S3, the step of determining the word head in the m word heads that meets the target condition to obtain the j word heads can include the following steps:

[0094] A1, obtaining a target word head; the target word head is any one of the m word heads;

[0095] A2, determining a target word head length of the target word head;

[0096] A3, determining keys in the set S containing the target word head to obtain b keys; b is a positive integer less than or equal to i;

[0097] A4, when the target word head length is greater than a preset length and b is greater than a preset value, determining that the target word head is one of the j word heads.

[0098] In the embodiments of the present application, the preset length and the preset value can be preset or defaulted in advance.

[0099] In specific embodiments, the target word head can be obtained; then, a string processing function can be used to measure the character length of the target word head, and the character length can be used as the target word head length. For example, in Python, the length of a string can be obtained by using the len() function. Then, the keys in the set S that contain the target word head can be determined, and b keys can be obtained. Specifically, a matching rule can be defined according to the characteristics of the target word head. The matching rule can be one of the following: complete match, partial match, regular expression match, and the like, which are not limited herein. According to the matching rule, the set S is traversed to find the keys containing the target word head, and b keys are obtained. When the length of the target word head is greater than a preset length, and b is greater than a preset value, the target word head is determined to be one of the j word heads.

[0100] In this way, by obtaining the target word head, determining the target word head length of the target word head, determining the keys in the set S that contain the target word head, obtaining b keys, and determining the target word head to be one of the j word heads when the length of the target word head is greater than a preset length and b is greater than a preset value, the length of the target word head and the number of keys in the set S that contain the target word head are obtained, and double judgment is performed based on the length and the number, which excludes less important or irrelevant word heads and reduces the workload of data processing and analysis.

[0101] Optionally, in step S7, the splitting of each key in the set S according to the x word head arrangement order and the j word heads to obtain m target splitting results can include the following steps:

[0102] B1, a first word head arrangement order is obtained; the first word head arrangement order is any word head arrangement order in the x word head arrangement order;

[0103] B2, according to the first word head arrangement order, the j word heads are used in sequence to split each key in the set S to obtain a first splitting result;

[0104] B3, according to the a first splitting results, the target splitting result corresponding to the first word head arrangement order is determined.

[0105] In the embodiments of the present application, the first prefix arrangement order can be acquired first; then, each key in the set S can be split by using the prefixes in the j prefixes in turn according to the first prefix arrangement order, to obtain a first split result, for example, assuming that the first prefix arrangement order is: pbc_info, pbc_info.detail; and assuming that the set S is {pbc_info.detail.detail_loan[*].detail_ag_begin_dt, pbc_info.detail.ag_dddd}, then the set S is split according to the first prefix arrangement order, first, the set S is split by pbc_info, to obtain a first partial split result: pbc_info,.detail.detail_loan[*].detail_ag_begin_dt, pbc_info,.detail.ag_dddd, secondly, the first partial split result is continuously split by pbc_info.detail, but since pbc_info.detail contains pbc_info, if the set S is split by pbc_info first, pbc_info.detail cannot split the first partial split result, because the data in the first partial split result does not contain complete pbc_info.detail, that is, the first partial split result is the final split result; finally, the target split result corresponding to the first prefix arrangement order can be determined according to the a first split results, for example, the target split result can include the a first split results.

[0106] Optionally, in step S8, determining the first-level preferred root table according to the profit matrix Aij and the m target split results can include the following steps:

[0107] C1, determining a split matrix corresponding to each target split result in the m target split results, to obtain m split matrices; each split matrix is a matrix equal to the number of columns and the number of rows of the profit matrix Aij;

[0108] C2, multiplying each split matrix in the m split matrices with the profit matrix Aij, to obtain m target profit matrices;

[0109] C3, calculating the profit coefficient sum of each target profit matrix in the m target profit matrices according to a preset second profit calculation formula, to obtain m profit coefficient sums;

[0110] C4, determining the maximum value in the m profit coefficient sums, determining the prefix arrangement order corresponding to the maximum value in the x prefix arrangement orders, to obtain a target prefix arrangement order;

[0111] C5. determining the first-level preferred root table according to the target word head arrangement order and the set S.

[0112] In the embodiments of the present application, the benefit coefficient and are used to evaluate the compression benefit size of the split of the set S, that is, the greater the benefit coefficient and, the greater the compression rate.

[0113] In specific embodiments, the split matrix can be constructed according to the m target split results to obtain m split matrices, wherein the target split matrix is specifically:

[0114]

[0115] wherein the target split matrix is any matrix in the m split matrices, O ij indicates whether the i-th word contains the j-th word head, O ij satisfies the following conditions:

[0116]

[0117] Next, each split matrix in the m split matrices can be multiplied by the benefit matrix Aij to obtain m target benefit matrices, since the matrix multiplication is a conventional technique, it is not limited here; the benefit coefficient sum of each target benefit matrix in the m target benefit matrices is calculated according to a preset second benefit calculation formula, and the second benefit calculation formula is specifically as follows:

[0118]

[0119] wherein C1 is any split matrix in the m split matrices; Cm is the benefit coefficient sum of C1, and it can be seen from the formula that the benefit coefficient sum is the sum of all elements in the target benefit matrix; m times of calculation according to the above second benefit calculation formula can obtain m benefit coefficient sums; then, the maximum value in the m benefit coefficient sums can be found to determine the word head arrangement order corresponding to the maximum value in the x word head arrangement orders, to obtain the target word head arrangement order; the keys in the set S can be split according to the target word head arrangement order to obtain a plurality of split results, and the plurality of split results can be arranged into a table to obtain the first-level preferred root table, for example, assuming that the set S = [all.qry_date, als.score1, bs_score_1[*]], the plurality of split results are all.qry, _date, als.score, 1, bs_score, _1[*], and then the first-level preferred root table is specifically as follows:

[0120] Key Primary stem Secondary stem ······ N-stem Root all.qry_date all.qry _date als.score1 als.score 1 bs_score_1[*] bs_score _1[*]

[0121] Thus, the target profit matrix is obtained by multiplying the split matrix and the profit matrix, and the profit of each split result is quantified. The quantification method can comprehensively consider the influence of multiple factors on the split result, and provide a comprehensive evaluation index, so that the value of the split result can be more accurately evaluated.

[0122] In S205, the rule input parameter data of the financial service system in a second preset time period is obtained to obtain target rule input parameter data; the starting moment of the second preset time period is later than the ending moment of the first preset time period.

[0123] In the embodiment of the application, the second preset time period can be preset or defaulted in advance.

[0124] In the embodiment of the application, the rule input parameter data in the second preset time period in the hive can be obtained by using the hive query language to obtain the target rule input parameter data.

[0125] In S206, the target rule input parameter data is compressed according to the preferred root table to obtain a preferred root tree.

[0126] In the embodiment of the application, the key data in the target rule input parameter data can be split and compressed according to the prefixes and roots in the preferred root table to obtain the preferred root tree.

[0127] Optionally, in S206, the target rule input parameter data in the financial service system is compressed according to the preferred root table to obtain a preferred root tree, including:

[0128] D1, obtaining third key data corresponding to the target rule input parameter data;

[0129] D2, splitting each key in the third key data according to the preferred root table to obtain a plurality of second split results; each split result includes at least one prefix and one root;

[0130] D3, constructing a plurality of nodes according to the prefixes and roots in the plurality of second split results, and connecting them in the order of characters in the third key data to obtain the preferred root tree; each node corresponds to a prefix or a root.

[0131] In the embodiments of the present application, the third key data corresponding to the target rule input parameter data can be obtained, and the method for obtaining the third key data can be the same as the method for obtaining the first key data described above. Then, each key in the third key data can be split according to the preferred root table to obtain a plurality of second split results. Specifically, for each key, firstly, whether it contains a primary prefix in the preferred root table can be checked in sequence, and a string matching method can be used. If the matching is successful, the key can be split according to the matched prefix to obtain a plurality of third split results. For example, for "transaction_type_4", whether it contains the prefix "trans" can be checked. In this example, it is found that the key contains the prefix "trans", and then "transaction_type_4" can be split according to the prefix "trans" to obtain trans and action_type_4. Secondly, for each root in the plurality of third split results, whether it contains a secondary prefix in the preferred root table can be checked in sequence, and each root can be split according to the secondary prefix until all the prefixes in the preferred root table are checked to obtain a plurality of final second split results. Then, a plurality of nodes can be constructed according to the plurality of second split results, each node corresponds to a prefix or a root, and the plurality of nodes can be connected in the order of characters in the third key data to obtain a preferred root tree.

[0132] Suppose the first set is {all.qry_date, als.score1, bs_score_1[*]}, the first prefix order in the preferred root table only includes a primary prefix order, and the primary prefix order is "all.", "als.", and "bs_score". According to the first set and the first prefix order, a preferred root tree is constructed. Please refer to Figure 3 , Figure 3 is a schematic diagram of a preferred root tree provided by the embodiments of the present application. Since the first prefix order only includes a primary prefix order, the preferred root tree has only three layers. The root node of the first layer of the preferred root tree is the "Root" node, the nodes of the second layer are obtained by splitting the key data according to the first-level prefix, including the three nodes "all.", "als.", and "bs_score", and the nodes of the third layer are the roots of the key data, including the three nodes "qry_date", "score1", and "_1[*]".

[0133] Suppose the second prefix order in the preferred root table includes a primary prefix order and a secondary prefix order, wherein the primary prefix order is "all.", "als.", and "bs_score", and the secondary prefix order is "qry_" and "score". Please refer to Figure 4 ,Figure 4 is another preferred root tree provided by the embodiment of the present application. Since the second word head order includes the first word head order and the second word head order, it can be known that the preferred root tree contains four layers. The root node of the first layer of the preferred root tree is the “Root” node. The nodes of the second layer are obtained by splitting the key data according to the first word head, including three nodes of “all.”, “als.” and “bs_score”. The nodes of the third layer are obtained by splitting the key data according to the second word head, including three nodes of “qry_”, “score” and “_1[*]”. Since “bs_score_1[*]” does not contain the second word head and cannot be further split, the nodes of the third layer include the root “_1[*]” of “bs_score_1[*]”. The nodes of the fourth layer are the roots of the key data, including two nodes of “date” and “1”.

[0134] It needs to be explained that if the preferred root table still has the second word head, …, the n-th word head and the like, the key data can be further split according to these word heads to obtain a new preferred root tree. The number of layers of the preferred root tree is equal to n+1.

[0135] In this way, the nodes are constructed according to the splitting results and are connected in the character order to form the preferred root tree. This way presents the data in a tree structure. The specific word head or root corresponding to the key can be quickly located by traversing the nodes of the tree, so that targeted analysis can be performed. In addition, the preferred root tree converts the complex data into an intuitive tree structure, so that the meaning of the data is easier to understand. Each node represents a word head or root. The user can quickly understand the business concept represented by the data by viewing the name and connection relationship of the node.

[0136] Optionally, in step D2, the third key data is split according to the preferred root table to obtain a plurality of second splitting results, including:

[0137] E1, obtaining a target key; the target key is any key in the third key data;

[0138] E2, matching each word head in the preferred root table with the target key to obtain a target matching result; the target matching result includes matching success or matching failure;

[0139] E3, when the target matching result includes the matching success, splitting the target key according to the preferred root table to obtain at least one target word head and one target root;

[0140] E4, determining a second split result corresponding to the target key according to the at least one target prefix and the target root;

[0141] E5, when the target matching result comprises the matching failure, the second split result corresponding to the target key comprises the target key.

[0142] In the embodiments of the present application, the target key is obtained; then, each prefix in the preferred root table can be matched with the target key to obtain a target matching result. Specifically, the method of string matching can be used to check whether the current traversed root is contained in the target key. When the target matching result comprises the matching success, the target key can be split according to the preferred root table to obtain at least one target prefix and a target root. For example, assuming that the preferred root table comprises the first-level prefix trans, the first-level prefix loan, the first-level prefix credit, the second-level prefix action, and the target key is "transaction_type_2", then the at least one target prefix is trans and action, and the target root is_type_2; then, the second split result corresponding to the target key can also be determined according to the at least one target prefix and the target root, that is, the second split result comprises the at least one target prefix and the target root.

[0143] When the target matching result comprises the matching failure, it indicates that the target key cannot be split, and the second split result corresponding to the target key comprises the target key.

[0144] In this way, by matching the roots in the preferred root table with the target key, it can be accurately determined whether the target key can be split. If the target matching result is the matching success, the target key can be split according to the preferred root table to obtain more specific target prefixes and target roots, which improves the accuracy of data processing. When the target matching result is the matching failure, the target key is directly taken as the second split result, which ensures the integrity of data processing. Without losing or incorrectly processing data due to the failure of matching, it is ensured that all data can obtain appropriate processing results.

[0145] S207, serializing the preferred root tree to generate a compressed target json file.

[0146] In the embodiments of the present application, the preferred root tree can be serialized to generate a compressed target json file. Specifically, the preferred root tree can be serialized by the json serialization method to obtain a json file.

[0147] The implementation of the present application has the following beneficial effects:

[0148] It can be seen that the rule input parameter json file compression method described in the application is applied to a financial business system, and the method comprises the following steps: obtaining rule input parameter data of the financial business system in a first preset time period to obtain first rule input parameter data; performing data merging processing on the first rule input parameter data to obtain second rule input parameter data; obtaining first key data in the second rule input parameter data, performing a preset cleaning operation on the first key data to obtain second key data; performing splitting on the second key data according to an optimal splitting algorithm to obtain an optimal root word table; obtaining rule input parameter data of the financial business system in a second preset time period to obtain target rule input parameter data; performing compression on the target rule input parameter data according to the optimal root word table to obtain an optimal root word tree; and performing serialization on the optimal root word tree to generate a compressed target json file. According to the optimal root word table, the target rule input parameter data is compressed to obtain an optimal root word tree. The optimal root word tree is a kind of efficient data structure, can merge and compress similar data, reduce the storage space of data, at the same time, the optimal root word tree does not need to rely on the coding dictionary, can quickly perform data retrieval and query, improve the processing efficiency of data, thereby, the compression efficiency of the json file is improved.

[0149] Please refer to Figure 5 , Figure 5 is a functional unit composition block diagram of a rule input parameter json file compression device 500 provided by the embodiment of the application, which is applied to a financial business system. The rule input parameter json file compression device 500 comprises an obtaining unit 501, a control unit 502 and a splitting unit 503, wherein:

[0150] The obtaining unit 501 is configured to obtain rule input parameter data of the financial business system in a first preset time period to obtain first rule input parameter data.

[0151] The control unit 502 is configured to perform data merging processing on the first rule input parameter data to obtain second rule input parameter data.

[0152] The obtaining unit 501 is further configured to obtain first key data in the second rule input parameter data, perform a preset cleaning operation on the first key data to obtain second key data.

[0153] The splitting unit 503 is configured to perform splitting on the second key data according to an optimal splitting algorithm to obtain an optimal root word table.

[0154] The obtaining unit 501 is further configured to obtain rule input parameter data of the financial business system in a second preset time period to obtain target rule input parameter data. The starting moment of the second preset time period is later than the ending moment of the first preset time period.

[0155] The splitting unit 503 is also configured to compress the target rule input parameter data according to the preferred root table, to obtain a preferred root tree.

[0156] The control unit 502 is also configured to serialize the preferred root tree, to generate a compressed target json file.

[0157] Optionally, in the splitting of the second key data according to the preferred splitting algorithm to obtain the preferred root table, the splitting unit 503 is specifically configured to:

[0158] S1, determine the keys contained in the second key data to obtain i keys, the i keys forming a set S; i is a positive integer;

[0159] S2, obtain the word heads corresponding to the i keys to obtain m word heads; there is no repeated word head in the m word heads; m is a positive integer less than or equal to i;

[0160] S3, determine the word heads in the m word heads that meet the target condition to obtain j word heads, the j word heads forming a set P; j is a positive integer less than or equal to m;

[0161] S4, calculate the yield coefficient of each key in the set S using the word heads in the set P for splitting according to a preset first yield calculation formula, to obtain a yield coefficient; a is equal to the value of i multiplied by j;

[0162] S5, determine the yield matrix Aij corresponding to the a yield coefficients;

[0163] S6, determine all possible word head arrangement orders of the word heads in the set P to obtain x word head arrangement orders; x is a positive integer;

[0164] S7, split each key in the set S according to the x word head arrangement orders and the j word heads, to obtain m target splitting results;

[0165] S8, determine a first-level preferred root table according to the yield matrix Aij and the m target splitting results;

[0166] According to steps S1-S8, the first-level preferred root table is iteratively processed until a preset number of iterations, or the number of elements in the set P is zero, and the iteration ends, to obtain the preferred root table.

[0167] Optionally, in the determination of the word heads in the m word heads that meet the target condition to obtain the j word heads, the splitting unit 503 is specifically configured to:

[0168] obtaining a target word head; the target word head is any one of the m word heads;

[0169] determining a target word head length of the target word head;

[0170] determining keys containing the target word head in the set S, obtaining b keys; b is a positive integer less than or equal to i;

[0171] when the target word head length is greater than a preset length, and b is greater than a preset value, determining that the target word head is one of the j word heads.

[0172] Optionally, in the aspect of splitting each key in the set S according to the x word head arrangement order and the j word heads to obtain m target split results, the splitting unit 503 is specifically configured to:

[0173] obtaining a first word head arrangement order; the first word head arrangement order is any one of the x word head arrangement orders;

[0174] splitting each key in the set S by using word heads in the j word heads according to the first word head arrangement order to obtain a first split result;

[0175] determining a target split result corresponding to the first word head arrangement order according to the a first split results.

[0176] Optionally, in the aspect of determining a first-level preferred root table according to the profit matrix Aij and the m target split results, the splitting unit 503 is specifically configured to:

[0177] determining a split matrix corresponding to each target split result in the m target split results, obtaining m split matrices; each split matrix is a matrix equal in number of columns and rows to the profit matrix Aij;

[0178] multiplying each split matrix in the m split matrices with the profit matrix Aij to obtain m target profit matrices;

[0179] calculating a profit coefficient sum of each target profit matrix in the m target profit matrices according to a preset second profit calculation formula, obtaining m profit coefficient sums;

[0180] determining a maximum value in the m profit coefficient sums, determining a word head arrangement order corresponding to the maximum value in the x word head arrangement orders, obtaining a target word head arrangement order;

[0181] determining the first-level preferred root table according to the target word head arrangement order and the set S.

[0182] Optionally, in the aspect of performing a preset cleaning operation on the first key data to obtain second key data, the acquisition unit 501 is specifically configured to:

[0183] acquire a first array key in the first key data to obtain k first array keys; k is a natural number;

[0184] replace an array index of each first array key in the k first array keys with a preset character by using a preset replacement method to obtain k second array keys after replacement;

[0185] perform a deduplication processing on the k second array keys to obtain h second array keys; h is a natural number less than or equal to k;

[0186] replace the k first array keys in the first key data with the h second array keys to obtain reference second key data;

[0187] sort the reference second key data according to a preset sorting method to obtain the second key data.

[0188] Optionally, in the aspect of compressing target rule parameter data in the financial business system according to the preferred root table to obtain a preferred root tree, the splitting unit 503 is specifically configured to:

[0189] acquire third key data corresponding to the target rule parameter data;

[0190] split each key in the third key data according to the preferred root table to obtain a plurality of second splitting results; each splitting result includes at least one prefix and one root;

[0191] construct a plurality of nodes according to the prefixes and roots in the plurality of second splitting results, and connect them in the order of characters in the third key data to obtain the preferred root tree; each node corresponds to a prefix or a root.

[0192] Optionally, in the aspect of splitting each key in the third key data according to the preferred root table to obtain a plurality of second splitting results, the splitting unit 503 is specifically configured to:

[0193] acquire a target key; the target key is any key in the third key data;

[0194] match each prefix in the preferred root table with the target key to obtain a target matching result; the target matching result includes a matching success or a matching failure;

[0195] When the target matching result comprises the matching success, the target key is split according to the preferred root table, to obtain at least one target prefix and one target root;

[0196] A second split result corresponding to the target key is determined according to the at least one target prefix and the target root.

[0197] When the target matching result comprises the matching failure, the second split result corresponding to the target key comprises the target key.

[0198] In a specific implementation, the rule parameter json file compression device 500 described in the embodiments of the present application can also perform other implementation manners described in the rule parameter json file compression method provided by the embodiments of the present application, which will not be described here.

[0199] Please refer to Figure 6 , Figure 6 is a structural schematic diagram of an electronic device provided by the embodiments of the present application, which comprises a processor, a memory, a communication interface and one or more programs, and the processor, the memory and the communication interface are connected with each other through a bus. The electronic device is applied to a financial business system; the above one or more programs are stored in the above memory and are configured to be executed by the above processor; the above one or more programs comprise instructions for executing part or all steps of the rule parameter json file compression method described in the embodiments of the present application.

[0200] The embodiments of the present application further provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to execute part or all steps of any method described in the above method embodiments, and the computer comprises an electronic device.

[0201] The embodiments of the present application further provide a computer program product, wherein the computer program product comprises a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all steps of any method described in the above method embodiments. The computer program product can be a software installation package, and the computer comprises an electronic device.

[0202] It should be noted that, for each of the above method embodiments, in order to simply describe, each is described as a combination of a series of actions, but those skilled in the art should know that the present application is not limited to the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.

[0203] In the above embodiments, the description of each embodiment is focused on, and the part not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0204] In several embodiments provided in the present application, it should be understood that the disclosed apparatus can be implemented by other means. For example, the apparatus embodiments described above are only illustrative, for example, the division of the above units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical or other forms.

[0205] The units described above as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0206] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0207] The integrated unit described above, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable memory. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a memory 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 above-mentioned method of each embodiment of the present application. The aforementioned memory includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0208] The above has carried out the detailed introduction to the embodiment of the application, the principle and implementation mode of the application have been described by applying specific examples in this paper, the above embodiment explanation is only for helping understanding the method of the application and its core idea; at the same time, for the general technical personnel in the art, according to the idea of the application, there will be changes in specific implementation mode and application range, and the above-mentioned, the content of the specification should not be understood as the limitation of the application.

Claims

1. A rule input parameter json file compression method, characterized in that, The method is applied to a financial service system, and comprises the following steps: obtaining rule input data of the financial service system in a first preset time period to obtain first rule input data; performing data merging processing on the first rule input data to obtain second rule input data; obtaining first key data in the second rule input data, performing a preset cleaning operation on the first key data to obtain second key data; splitting the second key data according to a splitting algorithm to obtain a root table; obtaining rule input data of the financial service system in a second preset time period to obtain target rule input data; the starting moment of the second preset time period is later than the ending moment of the first preset time period; compressing the target rule input data according to the root table to obtain a root tree; serializing the root tree to generate a compressed target json file.

2. The method of claim 1, wherein, The splitting of the second key data according to the splitting algorithm to obtain the root table comprises the following steps: S1, determining keys contained in the second key data to obtain i keys, wherein the i keys form a set S; i is a positive integer; S2, obtaining word heads corresponding to the i keys to obtain m word heads; there is no repeated word head in the m word heads; m is a positive integer less than or equal to i; S3, determining word heads in the m word heads that meet a target condition to obtain j word heads, wherein the j word heads form a set P; j is a positive integer less than or equal to m; S4, calculating a yield coefficient of each key in the set S adopting a word head in the set P for splitting according to a preset first yield calculation formula to obtain a yield coefficient a; a is equal to the value of i multiplied by j; S5, determining a yield matrix Aij corresponding to the a yield coefficients; S6, determining all possible word head arrangement orders of the word heads in the set P to obtain x word head arrangement orders; x is a positive integer; S7, splitting each key in the set S according to the x word head arrangement orders and the j word heads to obtain m target splitting results; S8, determining a first-level root table according to the yield matrix Aij and the m target splitting results; iteratively processing the first-level root table according to steps S1-S8 until a preset iteration number, or the number of elements in the set P is zero, and the iteration ends, to obtain the root table.

3. The method of claim 2, wherein, The determination of the word heads in the m word heads that meet the target condition to obtain the j word heads comprises the following steps: obtaining a target word head; the target word head is any one of the m word heads; determining a target word head length of the target word head; determining keys in the set S containing the target word head to obtain b keys; b is a positive integer less than or equal to i; when the target word head length is greater than a preset length and b is greater than a preset value, determining that the target word head is one of the j word heads.

4. The method of claim 2, wherein, The splitting of each key in the set S according to the x word head arrangement orders and the j word heads to obtain the m target splitting results comprises the following steps: obtaining a first prefix arrangement order; the first prefix arrangement order is any prefix arrangement order in the x prefix arrangement orders; splitting each key in the set S according to the first prefix arrangement order to obtain a first split result; determining a target split result corresponding to the first prefix arrangement order according to the a first split results.

5. The method according to any one of claims 2 to 4, wherein, determining a first-level root table according to the profit matrix Aij and the m target split results, including: determining a split matrix corresponding to each target split result in the m target split results to obtain m split matrices; each split matrix is a matrix equal in number of columns and rows to the profit matrix Aij; multiplying each split matrix in the m split matrices with the profit matrix Aij to obtain m target profit matrices; calculating a profit coefficient sum of each target profit matrix in the m target profit matrices according to a preset second profit calculation formula to obtain m profit coefficient sums; determining a maximum value in the m profit coefficient sums, determining a prefix arrangement order corresponding to the maximum value in the x prefix arrangement orders to obtain a target prefix arrangement order; determining the first-level root table according to the target prefix arrangement order and the set S.

6. The method according to any one of claims 1 to 4, wherein performing a preset cleaning operation on the first key data to obtain second key data, including: obtaining a first array key in the first key data to obtain k first array keys; k is a natural number; replacing an array index of each first array key in the k first array keys with a preset character by using a preset replacement method to obtain k second array keys after replacement; performing a de-duplication processing on the k second array keys to obtain h second array keys; h is a natural number less than or equal to k; replacing the k first array keys in the first key data with the h second array keys to obtain reference second key data; sorting the reference second key data according to a preset sorting method to obtain the second key data.

7. The method according to any one of claims 1 to 4, wherein compressing the target rule parameter data according to the root table to obtain a root tree, including: obtaining third key data corresponding to the target rule parameter data; splitting each key in the third key data according to the root table to obtain a plurality of second split results; each split result includes at least one prefix and one root; constructing a plurality of nodes according to the prefixes and roots in the plurality of second split results and connecting them in the order of characters in the third key data to obtain the root tree; each node corresponds to a prefix or a root.

8. The method of claim 7, wherein, splitting each key in the third key data according to the root table to obtain a plurality of second split results, including: obtaining a target key; the target key is any key in the third key data; matching each prefix in the root table with the target key to obtain a target matching result; the target matching result includes a matching success or a matching failure; When the target matching result comprises the matching success, the target key is split according to the root table to obtain at least one target prefix and one target root; A second split result corresponding to the target key is determined according to the at least one target prefix and the target root; When the target matching result comprises the matching failure, the second split result corresponding to the target key comprises the target key.

9. A rule input parameter json file compression device, characterized in that, Applied to a financial service system, the device comprises an acquisition unit, a control unit and a splitting unit, wherein: The acquisition unit is configured to acquire rule input parameter data of the financial service system in a first preset time period to obtain first rule input parameter data; The control unit is configured to perform data merging processing on the first rule input parameter data to obtain second rule input parameter data; The acquisition unit is further configured to acquire first key data in the second rule input parameter data, perform a preset cleaning operation on the first key data, and obtain second key data; The splitting unit is configured to split the second key data according to a splitting algorithm to obtain a root table; The acquisition unit is further configured to acquire rule input parameter data of the financial service system in a second preset time period to obtain target rule input parameter data; the start time of the second preset time period is later than the end time of the first preset time period; The splitting unit is further configured to compress the target rule input parameter data according to the root table to obtain a root tree; The control unit is further configured to serialize the root tree to generate a compressed target json file.

10. A computer-readable storage medium, characterized in that, A computer program for electronic data exchange, wherein the computer program causes a computer to execute the method of any one of claims 1-8.

Citation Information

Patent Citations

  • New word determination method and device, computer equipment and storage medium

    CN117077670A

  • Compression of javascript object notation data using structure information

    US20170141791A1