Data processing method and device, equipment, medium and product

By dividing the fields to be escaped in the escape dataset into sets and performing synchronous field conversion processing, the problem of low data escape efficiency is solved, achieving a more efficient data escape process and an improved user experience.

CN120724978APending Publication Date: 2025-09-30INDUSTRIAL AND COMMERCIAL BANK OF CHINA +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510811022.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

In the existing data escape process, as the number of fields to be escaped increases, efficiency decreases, causing service delays and affecting user experience.

Method used

The fields to be escaped in the intercepted escape data set are divided into multiple sets to be escaped, and the data dictionary is used to perform synchronous field conversion on the fields to be escaped in the sets to be escaped, and then the obtained target semantic fields are used for replacement processing to avoid repeated association of data dictionaries.

Benefits of technology

It improves the efficiency of data escape, reduces service delays caused by data processing, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120724978A_ABST
    Figure CN120724978A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device, equipment, a medium and a product, and relates to the field of financial science and technology or other related fields. The method comprises the following steps: intercepting an escape data set returned by a service party after receiving a service request sent by a requester, and obtaining a plurality of fields to be escaped from the data to be escaped; to-be-escaped fields in the escape dataset are divided to obtain a plurality of to-be-escaped sets, and the data dictionary is used for storing mapping relations among different fields; using the data dictionary to synchronously perform field conversion processing on each field to be escaped in the set to be escaped to obtain a target semantic field corresponding to the field to be escaped; and using the target semantic field to perform replacement processing on a field to be escaped in the data to be escaped to obtain data after escaped meaning, and sending the data after escaped meaning to the requester. The product provided by the invention can improve the efficiency of the data escape process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of financial technology or other related fields, and in particular to a data processing method, device, equipment, medium and product. Background Art

[0002] Data escaping refers to the conversion of fields during data processing based on data mappings in a data dictionary. Data escaping has a wide range of applications. For example, it can convert raw data formats recognizable by computers into human-readable representations, facilitating data processing and analysis. It can also convert incorrect symbols or terminology in data into a safe format, preventing data from being misinterpreted or unsafe operations from being performed.

[0003] When there are a large number of fields that need to be escaped in the data to be escaped, the efficiency of the data escape process is usually low, which will cause service delays and affect user experience. Summary of the Invention

[0004] The present application provides a data processing method, apparatus, device, medium and product for improving the efficiency of the data escape process.

[0005] In a first aspect, the present application provides a data processing method, comprising:

[0006] intercepting an escaped data set returned by the service provider after receiving a service request sent by the requester, wherein the escaped data set includes a plurality of data to be escaped, and obtaining a plurality of fields to be escaped from the data to be escaped;

[0007] The to-be-escaped fields in the escape data set are divided to obtain a plurality of to-be-escaped sets, wherein the to-be-escaped fields in the same to-be-escaped set have the same data dictionary corresponding to them, and the data dictionary is used to store mapping relationships between different fields;

[0008] Using the data dictionary, synchronously performing field conversion processing on each to-be-escaped field in the to-be-escaped set to obtain a target semantic field corresponding to the to-be-escaped field;

[0009] The target semantic field is used to replace the field to be escaped in the data to be escaped to obtain escaped data, and the escaped data is sent to the requesting party.

[0010] In a second aspect, the present application provides a data processing device, comprising:

[0011] An interception module is used to intercept an escaped data set returned by the service provider after receiving a service request sent by the requester, wherein the escaped data set includes multiple pieces of data to be escaped, and obtain multiple fields to be escaped from the data to be escaped;

[0012] a partitioning module, configured to partition the to-be-escaped fields in the escape data set to obtain a plurality of to-be-escaped sets, wherein the to-be-escaped fields in the same to-be-escaped set have the same data dictionary corresponding to them, and the data dictionary is configured to store mapping relationships between different fields;

[0013] A conversion module, configured to synchronously perform field conversion processing on each to-be-escaped field in the to-be-escaped set using the data dictionary to obtain a target semantic field corresponding to the to-be-escaped field;

[0014] The replacement module is used to use the target semantic field to replace the field to be escaped in the data to be escaped to obtain escaped data, and send the escaped data to the requesting party.

[0015] In a third aspect, the present application provides an electronic device comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; and the processor executes the computer-executable instructions stored in the memory to implement the above method.

[0016] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the above method.

[0017] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which is used to implement the above method when executed by a processor.

[0018] The present application provides a data processing method, apparatus, device, medium, and product that divides the to-be-escaped fields in an intercepted escaped data set into multiple to-be-escaped sets, performs synchronous field conversion processing on the to-be-escaped fields in the to-be-escaped sets using a data dictionary, and then uses the obtained target semantic field to replace the to-be-escaped fields, obtaining escaped data sent to the requester. This process synchronously performs field conversion processing on each to-be-escaped field in the escape subset, so that during the data escape process of the escaped data set, the same data dictionary only needs to be associated once, avoiding repeated association of the data dictionary, improving the efficiency of data escape, and effectively reducing service delays caused by the data processing process and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0020] Figure 1 A database table relationship diagram is exemplarily shown in FIG;

[0021] Figure 2 A schematic diagram of a process of aspect-oriented data escaping method is shown in FIG.

[0022] Figure 3 A flow chart of a data processing method is exemplarily shown in FIG.

[0023] Figure 4 A schematic diagram showing the relationship between a dictionary type table and a dictionary data table is shown as an example;

[0024] Figure 5 A schematic diagram of a process of aspect-oriented data processing method is shown in FIG.

[0025] Figure 6 exemplarily shows a schematic diagram of a management process of a data dictionary in a remote dictionary service database;

[0026] Figure 7 A schematic diagram of a process of data processing using aspect-oriented principles is shown in FIG.

[0027] Figure 8 Schematic diagram of the structure of a data processing device is shown in FIG.

[0028] Figure 9 Schematic diagram of the structure of an electronic device is shown in FIG.

[0029] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0030] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0031] 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, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data comply with the relevant laws, regulations and standards of relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0032] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings. The terms "first", "second", etc. in the specification and claims and the above-mentioned drawings in this application are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or precedence, unless otherwise indicated. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, for example, they can be implemented in an order other than those given in the diagrams or descriptions of the embodiments of this application. The terms "including" and "having" in the specification and claims and the above-mentioned drawings in this application and any of their variations are intended to cover but not exclusively include, for example, a product or device that includes a series of components is not necessarily limited to those components clearly listed, but may include other components that are not clearly listed or inherent to these products or devices. The term "module" used in this application refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic or a combination of hardware or / and software code that can perform functions related to the component.

[0033] It should be noted that the data processing methods, devices, equipment, media and products provided in this application can be used in the field of financial technology, and can also be used in any field outside of financial technology. The application fields of the data processing methods, devices, equipment, media and products in this application are not limited.

[0034] There are usually two methods for data escaping based on data dictionary:

[0035] One is to use the data escape method of multi-table association query in relational database. Figure 1 A database table relationship diagram is shown, such as Figure 1 As shown, Table A contains multiple fields with escape bits (the locations where fields can be escaped). Each escape bit requires a dictionary table to retrieve the escaped field. The disadvantage of this method is that as the number of escape bits increases, the multi-table join query statement becomes more complex and execution efficiency decreases.

[0036] The other is the aspect-oriented programming (AOP) data escape method. Figure 2 A schematic diagram of the process of a data escape method oriented to the aspect is shown. Figure 2 As shown, unlike the previous method of escaping data while querying the dictionary table, this method decouples data processing from dictionary escaping, making it easier to code. However, this method requires traversing the dataset to escape each field individually. When a single data entry has many fields that need escaping and the data volume is large, the dataset escape may encounter problems such as repeated value retrieval (i.e., different data may be repeatedly associated with the same dictionary table for retrieval) and multiple loops (i.e., each data entry will be associated with multiple dictionary tables, and the same dictionary table query operation will be repeated when switching data). This also makes data escaping inefficient.

[0037] As mentioned above, both of the above two data escaping methods have the problem of low data escaping efficiency when the number of escaped fields increases, which will cause service delays and affect user experience.

[0038] In order to better illustrate the present disclosure and highlight the main purpose of this application, the specific embodiments in this specification describe the data escape process of query statements. Those skilled in the art should understand that this specification can also be implemented for the escape process of other types of data such as natural language.

[0039] The technical content provided by this application is intended to solve the above technical problems of the prior art. In the data processing method, device, equipment, medium and product of this application, the fields to be escaped in the intercepted escape data set are divided into multiple sets to be escaped, and the fields to be escaped in the sets to be escaped are synchronously converted using a data dictionary, and then the obtained target semantic field is used to replace the fields to be escaped, and the escaped data sent to the requester is obtained. This process synchronously performs field conversion processing on each field to be escaped in the escape subset, so that in the data escape process of the escape data set, it is only necessary to associate the same data dictionary once, avoiding repeated association of the data dictionary, improving the efficiency of data escape, and thus effectively reducing the service delay caused by the data processing process and improving the user experience. .

[0040] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0041] Example 1

[0042] Figure 3 A flow chart of a data processing method is shown as an example; Figure 3 As shown, the method includes:

[0043] Step S301: intercepting an escaped data set returned by a service provider after receiving a service request sent by a requester, and obtaining a plurality of to-be-escaped fields from the to-be-escaped data;

[0044] Step S302: Divide the to-be-escaped fields in the escape data set to obtain multiple to-be-escaped sets;

[0045] Step S303: using the data dictionary, synchronously performing field conversion processing on each to-be-escaped field in the to-be-escaped set to obtain a target semantic field corresponding to the to-be-escaped field;

[0046] Step S304: Use the target semantic field to replace the field to be escaped in the data to be escaped to obtain escaped data, and send the escaped data to the requesting party.

[0047] The "escaped data set" is a data set containing multiple pieces of data to be escaped. The "escaped data" is data containing fields to be escaped. The "escaped data" can be a natural language statement or a query statement against a database. This specification does not specifically limit the type of data to be escaped and can be determined based on actual circumstances.

[0048] For the same content, the service provider and the requester may use different fields. Therefore, after the requester sends a service request to the service provider, the service provider sends the escaped dataset, but before it reaches the requester, it needs to intercept the escaped dataset. After escaping the fields in the escaped dataset, the escaped dataset is sent to the requester.

[0049] Annotations, also known as metadata, can be declared before packages, classes, fields, methods, local variables, method parameters, and other elements to describe and comment on them. In one example, annotations can be used to identify fields to be escaped, indicating that these fields require escaping. In one example, the principle of aspect-oriented programming can be used to mark the fields to be escaped. The specific steps are as follows:

[0050] (1) Define the aspect and use the @Aspect annotation to define the aspect class;

[0051] (2) Configure the pointcut to specify the execution of the aspect logic at the interface layer (controller layer). Any controller layer return value needs to be converted to a dictionary. The pointcut is a collection of connection points.

[0052] After implementing the above aspect configuration, you can use this tag to identify the escape data set and the fields to be escaped in the data to be escaped, and perform data escape operations on the fields to be escaped at the connection point.

[0053] A data dictionary is a database used for field conversion processing. It can contain multiple mapping relationships, each of which contains two fields that can be converted to each other. There are multiple ways to construct a data dictionary. For example, a data dictionary can be constructed based on data types, with different data dictionaries containing different data types; a data dictionary can be constructed based on business semantics, with different data dictionaries containing different business semantics. Therefore, based on the data dictionary construction method used, the data dictionary that matches the data to be escaped can be determined. For example, when constructing a data dictionary based on business semantics, the data dictionary that matches it can be determined based on the business logic of the data to be escaped; when constructing a data dictionary based on data types, the data dictionary that matches it can be determined based on the data type of the data to be escaped.

[0054] After obtaining the fields to be escaped, you can divide them into multiple sets based on how the data dictionary corresponding to the fields to be escaped is constructed. Each set contains multiple fields to be escaped, and these fields to be escaped use the same data dictionary. In this way, you can use the set as the data escape unit and use the data dictionary to escape the fields to be escaped separately.

[0055] The target semantic field is the field obtained after the field to be escaped is converted. Specifically, for one of the sets to be escaped, a data dictionary that matches the data to be escaped contained in the set to be escaped can be used to synchronously perform field conversion operations on each data to be escaped. Specifically, the mapping relationship containing each data to be escaped can be found from the data dictionary to implement the field conversion operation. In one example, the mapping relationship can be a key-value pair (key-value), the data to be escaped can be used as the key (key), and another field in the mapping relationship can be used as the value (value), and the value (value) is the target semantic field.

[0056] After obtaining the target semantic field, the target semantic field can be used to replace the field to be escaped in the data to be escaped to obtain escaped data, which can be sent to the requester.

[0057] In an embodiment of the present specification, the fields to be escaped in an intercepted escape data set are divided into multiple sets to be escaped. A data dictionary is used to perform synchronous field conversion processing on the fields to be escaped in the sets to be escaped. The obtained target semantic field is then used to replace the fields to be escaped, resulting in escaped data sent to the requester. This process synchronously performs field conversion processing on each field to be escaped in the escape subset, so that during the data escape process of the escape data set, the same data dictionary only needs to be associated once, avoiding repeated association of the data dictionary, improving the efficiency of data escape, and effectively reducing service delays caused by the data processing process, thereby improving the user experience.

[0058] As mentioned above, a data dictionary can be constructed based on the data type. The construction of a data dictionary requires a dictionary type table and a dictionary data table. Figure 4 A schematic diagram showing the relationship between a dictionary type table and a dictionary data table is shown. Figure 4 As shown, the data relationship diagram includes multiple data tables (data tables A, B, etc.). Data table A corresponds to a dictionary type table, which contains multiple types. The data type table has a dictionary data table under it. Table 1 shows a dictionary type table that includes multiple dictionary types. Table 2 shows a dictionary data table that includes multiple values ​​under each dictionary type. The values ​​are of two types: dictionary codes and dictionary values. Escape operations can be performed between dictionary codes and dictionary names.

[0059] Table 1 Dictionary type table

[0060] Dictionary type ID Dictionary type encoding Dictionary type name 1 payStatus Payment Status 2 userStatus User Status ...... ...... ......

[0061] Table 2 Dictionary data table

[0062] Dictionary ID Dictionary Type Dictionary encoding Dictionary Name 1 payStatus 0 Not paid 2 payStatus 1 Paid 3 userStatus 0 Enable 4 userStatus 1 Deactivate ...... ...... ...... ......

[0063] The above dictionary type facilitates dictionary classification and management, and dictionary data is used to store dictionary codes and dictionary values. In one example, the construction of the set to be escaped can be achieved by classifying the fields. Specifically, the types of the fields in the different data dictionaries are different, and the fields to be escaped in the escape data set are divided and processed to obtain multiple sets to be escaped, including:

[0064] Constructing an initial set of fields to be escaped according to the types of the fields to be escaped in the escape data set, wherein the number of the initial sets of fields to be escaped is the same as the number of types of the fields to be escaped, and different initial sets of fields to be escaped correspond to different types;

[0065] The to-be-escaped field in the escape data set is stored in an initial to-be-escaped set corresponding to the type of the to-be-escaped field to obtain the to-be-escaped set.

[0066] Specifically, the type of each field to be escaped in the escape data set can be determined first, the total number of types in the escape data set can be counted, and an initial set to be escaped can be constructed based on the total number. The initial set to be escaped is an empty set, and each initial set to be escaped corresponds to a different type.

[0067] Furthermore, the fields to be escaped in the escape dataset can be divided into initial sets of fields to be escaped, each of which has the same type. This process constructs sets of fields to be escaped based on field type. During the data escape process, this set of fields to be escaped can be used to perform batch conversions on the fields to be escaped, improving the efficiency of data escape.

[0068] The escape bit is the position of the field to be escaped in the data to be escaped. In the query statement waiting for escape data for the database, the types of the fields to be escaped in different escape bits are usually different. In one implementation, when the types of the data to be escaped in the escape data set are the same, constructing the initial set to be escaped based on the types of the fields to be escaped in the escape data set includes:

[0069] Constructing an initial set of bits to be escaped for each of the escaped bits in the data to be escaped;

[0070] The step of storing the to-be-escaped field in the escape data set in an initial to-be-escaped set corresponding to the type of the to-be-escaped field to obtain the to-be-escaped set includes:

[0071] The field to be escaped is stored in an initial set to be escaped corresponding to the escape position where the field to be escaped is located, to obtain the set to be escaped.

[0072] When the types of the fields to be escaped are different for different escape bits in the data to be escaped, and the types of the data to be escaped in the escape data set are the same, an initial set to be escaped can be constructed directly based on the escape bits. Specifically, an initial set to be escaped can be constructed for each escape bit in the data to be escaped. In this case, the number of escape bits in the data to be escaped, the number of types of the fields to be escaped, the initial set to be escaped, and the number of sets to be escaped are the same.

[0073] Since the initial set to be escaped corresponds to the escape bit one-to-one, the fields to be escaped in the data to be escaped can be sequentially put into the initial set to be escaped corresponding to the escape bit where the field to be escaped is located to obtain the set to be escaped.

[0074] Figure 5 The process diagram of the aspect-oriented data processing method is shown in FIG. Figure 5As shown, first obtain the escape data set, and then obtain the fields annotated by @Dict in the entity class of each data to be escaped in the escape data set according to the reflection mechanism. These fields are generally more than 1 and form a list structure. Figure 5 Status 0, status 1, etc. are fields to be escaped annotated with @Dict. Item 1, item 2, etc. represent the numbers of the data to be escaped in the escape data set. Fields with the same status number under different item numbers have the same field type. Fields with the same status number can be considered to constitute a set to be escaped.

[0075] Among them, when defining the @Dict annotation, the annotation object @Target is set to ElementType.FIELD, indicating that the annotation can only be applied to field; @Retention is set to RetentionPolicy.RUNTIME, indicating that the annotation takes effect at runtime; the member variable in the annotation is of data dictionary type, which is used to obtain the data dictionary list.

[0076] In the above process, when the types of the fields to be escaped are different in different escape bits and the types of the data to be escaped in the escape data set are the same, an escape subset can be constructed based on the escape bit. This process does not require determining the types of each field to be escaped, and can improve the efficiency of constructing the escape subset without reducing the accuracy of the escape subset division.

[0077] Similar to the method of constructing the initial set to be escaped, field conversion processing can be performed on the fields to be escaped in sequence based on the escape bit. In one implementation, using the data dictionary to synchronously perform field conversion processing on each field to be escaped in the set to be escaped to obtain the target semantic field corresponding to the field to be escaped includes:

[0078] Reading each of the to-be-escaped sets in sequence based on the order of the escaped bits in the to-be-escaped data;

[0079] When the to-be-escaped set corresponding to the target escape bit is read, the to-be-escaped fields contained in the to-be-escaped set are synchronously converted using the data dictionary corresponding to the target escape bit to obtain the target semantic field.

[0080] Specifically, the set to be escaped can be read sequentially according to the order of the escape bits in the data to be escaped. When the set to be escaped corresponding to any escape bit (i.e., the target escape bit) is read, the mapping relationship corresponding to each field to be escaped in the set to be escaped can be determined in sequence from the data dictionary corresponding to the target escape bit, and another field in the mapping relationship other than the field to be escaped is used as the target semantic field.

[0081] like Figure 5As shown, escapes can be performed in a loop from left to right based on the state number. Each escape process simultaneously escapes all fields to be escaped under the same state number. Specifically, within the loop body, the member variable dictionary type (DictType) of the annotation @Dict of the field to be escaped is read, and the dictionary key / dictionary value list corresponding to the dictionary type in Redis (i.e., the DictKey / DictValue list) is obtained and stored in the in-memory mapping structure (Map) to reduce Redis access.

[0082] The dictionary escape operation of the fields to be escaped within this loop body is executed concurrently. The dictionary value (DictValue) in the current mapping (Map) structure is obtained according to the dictionary key (DictKey) and assigned to the escape field (status_dictText) corresponding to the status field in the result set.

[0083] In the case where the data to be escaped contains N data to be escaped, and the field to be escaped in each data to be escaped contains M states, if each data to be escaped is escaped in turn (such as Figure 2 The vertical loop escape of each data item shown in ), the number of times the data dictionary needs to be obtained is M*N times; if the data processing method described in this specification (such as Figure 5 ), escaping N fields to be escaped concurrently with the same escape bit requires accessing the data dictionary N times. Clearly, the data processing method described in this specification can significantly reduce the number of associated data dictionaries and improve data escaping efficiency. The greater the amount of data to be escaped contained in the dataset, the more significant the improvement. This can effectively reduce service delays caused by the data processing process and improve user experience.

[0084] In this way, by sequentially traversing the field conversion processing of the to-be-escaped set, omissions and confusion in the escaping process can be avoided, and the efficiency and accuracy of the escaping process can be improved.

[0085] As mentioned above, the data to be escaped within the same escaped dataset may be of different types. For example, if the data to be escaped within the escaped dataset is a database query statement, the query statement may have multiple query types, such as conditional filtering, sorting, and deduplication. The grammatical structure of each query type is different, which means that the types of the fields to be escaped at the same escape position in the data to be escaped for different query types may be different.

[0086] At this time, if the same method is used to perform operations such as partitioning the to-be-escaped set and field conversion on each to-be-escaped data in the escape data set, incorrect escaped data may be obtained. In one implementation, the to-be-escaped data is a query statement for a database, and the to-be-escaped fields in the escape data set are partitioned to obtain multiple to-be-escaped sets, including:

[0087] Based on the query type of each query statement in the escaped data set, the escaped data set is divided and processed to obtain multiple escaped data subsets, and the query types of the query data in different escaped data subsets are the same;

[0088] The to-be-escaped fields in the escaped data subset are divided to obtain a plurality of to-be-escaped sets corresponding to the escaped data subset.

[0089] The escaped data subset is a data set containing to-be-escaped data of the same query type.

[0090] Specifically, the escaped data set can be first divided based on the type of each query statement in the escaped data set to obtain multiple escaped data subsets, where the query type of the data to be escaped (i.e., the query statement) in each escaped data subset is the same. For example, in the same escaped data subset, the query type of the query statement is a conditional filter statement. Subsequently, each escaped data subset can be divided according to the field to be escaped to obtain multiple sets of fields to be escaped corresponding to the escaped data subset.

[0091] In one example, an escape bit and a data dictionary corresponding to each escape bit can be preset for each type of query statement. Thus, after obtaining an escape data subset corresponding to each type of query statement, the data dictionary corresponding to that type of query statement can be directly used to perform field conversion processing on multiple to-be-escaped sets within the escape data subset. The escape bit can be a status bit used to identify and process the status of a processor or program.

[0092] In this example, by constructing the initial set to be escaped through query types, it is possible to achieve fine division of the escape subsets and improve the accuracy of the data escape process.

[0093] When intercepting an escaped data set sent to a user, if the data escape process takes too long, it will affect the user experience. In one implementation, when the escaped data set is intercepted, the method includes:

[0094] Determine the target database targeted by the query statement in the escaped data set, and cache the data dictionary corresponding to the target database in a remote dictionary service database;

[0095] The step of using the data dictionary to synchronously perform field conversion processing on each to-be-escaped field in the to-be-escaped set to obtain a target semantic field corresponding to the to-be-escaped field includes:

[0096] Using the data dictionary in the remote dictionary service database, field conversion processing is synchronously performed on each to-be-escaped field in the to-be-escaped set to obtain the target semantic field.

[0097] Specifically, if an escaped dataset is intercepted, the target database targeted by the escaped dataset can be determined. The escaped dataset contains query statements for the target database. Furthermore, the target database's data dictionary can be retrieved from the server storing the target database and cached in a remote dictionary service database (Remote Dictionary Server, Redis). This remote dictionary service database is a memory-based database that provides extremely high read and write speeds.

[0098] In this way, when using the data dictionary, the data dictionary can be directly read from Redis to implement field conversion processing and obtain the target semantic field.

[0099] In this example, a remote dictionary service database is used to store the data dictionary. In this way, during the data escape process, the data dictionary can be read directly from the remote dictionary service database, which can reduce the frequent access to the target database. At the same time, the efficient reading and writing speed of the remote dictionary service database can further improve the speed of the data escape process.

[0100] When the data dictionary in the server is updated, the remote dictionary service database can synchronously update the data dictionary therein. Figure 6 The diagram shows the management process of the data dictionary in the remote dictionary service database. Figure 6 As shown, the management of the data dictionary in the remote dictionary service database may include the following:

[0101] (1) Data initialization: When the service starts, it reads the relational database (i.e., the target database mentioned above) and loads the data dictionary into the Redis cache;

[0102] (2) Active data update: When the data dictionary in the relational database is updated, the Redis dictionary cache is updated synchronously;

[0103] (3) Passive data update: When the Redis cache data dictionary does not exist, read the relational database and load the data dictionary into the Redis cache.

[0104] Under special circumstances, the data dictionary in the remote dictionary service database may be out of sync with the data dictionary in the server. In one implementation, using the data dictionary in the remote dictionary service database to synchronously perform field conversion processing on each to-be-escaped field in the to-be-escaped set to obtain the target semantic field includes:

[0105] Detecting whether a data dictionary in the remote dictionary service database contains a mapping relationship corresponding to the field to be escaped;

[0106] If the detection result is that the data is not included, reading the mapping relationship from the server storing the data dictionary;

[0107] The data dictionary of the remote dictionary service database is updated using the mapping relationship, and the field corresponding to the field to be escaped in the mapping relationship is used as the target semantic field.

[0108] Specifically, in the process of using the data dictionary to perform field conversion processing, the data dictionary of the remote dictionary service database is first checked to see whether it contains the mapping relationship corresponding to the field to be escaped. If the detection result is that it is contained, the mapping relationship is directly used. If the detection result is that it is not contained, the mapping relationship needs to be read from the server that stores the data dictionary.

[0109] After reading the mapping relationship from the server storing the data dictionary, the mapping relationship is used to perform field conversion while updating the data dictionary in the remote dictionary service database. To avoid missing other mapping relationships after the update, the data dictionary corresponding to the mapping relationship in the server can be directly reloaded into the remote dictionary service database during the update process.

[0110] In this example, for mapping relationships not included in the data dictionary of the remote dictionary service database, the data dictionary of the remote dictionary service database is obtained from the server and updated, so that when the data dictionary is used subsequently, the more complete data dictionary can be used to reduce frequent access to the data dictionary in the server, thereby improving the efficiency of the data escape process.

[0111] Figure 7 The schematic diagram of the process of data processing using aspect-oriented principles is shown as follows: Figure 7 As shown, the data processing process at least includes:

[0112] (1) Establish a data dictionary. Collect the mapping relationships between existing fields and build a data dictionary based on the types of the fields in these mapping relationships. When these mapping relationships are updated, the data dictionary is also updated.

[0113] (2) Implement automatic loading and updating of the Redis data dictionary. When the data dictionary is used, read the relational database and load the data dictionary into the Redis cache.

[0114] (3) Define annotations to mark escaped fields. In the dataset to be escaped, use the @Dict annotation to mark the fields that need to be escaped by dictionary.

[0115] (4) Define aspects and implement the connection point method. Obtain the fields identified by @Dict in the entity class based on the reflection mechanism, and build multiple list structures based on the status bits of the fields. The status bits of the fields in different list structures are different, while the status bits of the fields in the same list structure are the same. Field escape is performed on each list structure.

[0116] The specific steps of this process can be referred to the above embodiment and will not be described in detail here.

[0117] Example 2

[0118] Figure 8 A structural diagram of a data processing device is shown as an example; Figure 8 As shown, the device includes:

[0119] The interception module 81 is used to intercept the escaped data set returned by the service provider after receiving the service request sent by the requester, wherein the escaped data set includes multiple pieces of data to be escaped, and obtain multiple fields to be escaped from the data to be escaped;

[0120] a partitioning module 82 for partitioning the to-be-escaped fields in the escape data set to obtain a plurality of to-be-escaped sets, wherein the to-be-escaped fields in the same to-be-escaped set have the same data dictionary corresponding to them, and the data dictionary is used to store mapping relationships between different fields;

[0121] A conversion module 83 is configured to use the data dictionary to synchronously perform field conversion processing on each to-be-escaped field in the to-be-escaped set to obtain a target semantic field corresponding to the to-be-escaped field;

[0122] The replacement module 84 is configured to use the target semantic field to replace the field to be escaped in the data to be escaped to obtain escaped data, and send the escaped data to the requesting party.

[0123] The "escaped data set" is a data set containing multiple pieces of data to be escaped. The "escaped data" is data containing fields to be escaped. The "escaped data" can be a natural language statement or a query statement against a database. This specification does not specifically limit the type of data to be escaped and can be determined based on actual circumstances.

[0124] For the same content, the service provider and the requester may use different fields. Therefore, after the requester sends a service request to the service provider, the service provider sends the escaped dataset, but before it reaches the requester, it needs to intercept the escaped dataset. After escaping the fields in the escaped dataset, the escaped dataset is sent to the requester.

[0125] Annotations, also known as metadata, can be declared before packages, classes, fields, methods, local variables, method parameters, and other elements to describe and comment on them. In one example, annotations can be used to identify fields to be escaped, indicating that these fields require escaping. In one example, the principle of aspect-oriented programming can be used to mark the fields to be escaped. The specific steps are as follows:

[0126] (1) Define the aspect and use the @Aspect annotation to define the aspect class;

[0127] (2) Configure the pointcut to specify the execution of the aspect logic at the interface layer (controller layer). Any controller layer return value needs to be converted to a dictionary. The pointcut is a collection of connection points.

[0128] After implementing the above aspect configuration, you can use this tag to identify the escape data set and the fields to be escaped in the data to be escaped, and perform data escape operations on the fields to be escaped at the connection point.

[0129] A data dictionary is a database used for field conversion processing. It can contain multiple mapping relationships, each of which contains two fields that can be converted to each other. There are multiple ways to construct a data dictionary. For example, a data dictionary can be constructed based on data types, with different data dictionaries containing different data types; a data dictionary can be constructed based on business semantics, with different data dictionaries containing different business semantics. Therefore, based on the data dictionary construction method used, the data dictionary that matches the data to be escaped can be determined. For example, when constructing a data dictionary based on business semantics, the data dictionary that matches it can be determined based on the business logic of the data to be escaped; when constructing a data dictionary based on data types, the data dictionary that matches it can be determined based on the data type of the data to be escaped.

[0130] After obtaining the fields to be escaped, you can divide them into multiple sets based on how the data dictionary corresponding to the fields to be escaped is constructed. Each set contains multiple fields to be escaped, and these fields to be escaped use the same data dictionary. In this way, you can use the set as the data escape unit and use the data dictionary to escape the fields to be escaped separately.

[0131] The target semantic field is the field obtained after the field to be escaped is converted. Specifically, for one of the sets to be escaped, a data dictionary that matches the data to be escaped contained in the set to be escaped can be used to synchronously perform field conversion operations on each data to be escaped. Specifically, the mapping relationship containing each data to be escaped can be found from the data dictionary to implement the field conversion operation. In one example, the mapping relationship can be a key-value pair (key-value), the data to be escaped can be used as the key (key), and another field in the mapping relationship can be used as the value (value), and the value (value) is the target semantic field.

[0132] After obtaining the target semantic field, the target semantic field can be used to replace the field to be escaped in the data to be escaped to obtain escaped data, which can be sent to the requester.

[0133] In an embodiment of the present specification, the fields to be escaped in an intercepted escape data set are divided into multiple sets to be escaped. A data dictionary is used to perform synchronous field conversion processing on the fields to be escaped in the sets to be escaped. The obtained target semantic field is then used to replace the fields to be escaped, resulting in escaped data sent to the requester. This process synchronously performs field conversion processing on each field to be escaped in the escape subset, so that during the data escape process of the escape data set, the same data dictionary only needs to be associated once, avoiding repeated association of the data dictionary, improving the efficiency of data escape, and effectively reducing service delays caused by the data processing process, thereby improving the user experience.

[0134] As mentioned above, a data dictionary can be constructed based on the data type. The construction of a data dictionary requires a dictionary type table and a dictionary data table. Figure 4 A schematic diagram showing the relationship between a dictionary type table and a dictionary data table is shown. Figure 4 As shown, the data relationship diagram includes multiple data tables (data tables A, B, etc.). Data table A corresponds to a dictionary type table, which contains multiple types. The data type table has a dictionary data table under it. Table 1 shows a dictionary type table that includes multiple dictionary types. Table 2 shows a dictionary data table that includes multiple values ​​under each dictionary type. The values ​​are of two types: dictionary codes and dictionary values. Escape operations can be performed between dictionary codes and dictionary names.

[0135] The above dictionary type facilitates dictionary classification and management, and dictionary data is used to store dictionary codes and dictionary values. In one example, the construction of the set to be escaped can be achieved by classifying the fields. Specifically, the types of the fields in the different data dictionaries are different, and the fields to be escaped in the escape data set are divided and processed to obtain multiple sets to be escaped, including:

[0136] Constructing an initial set of fields to be escaped according to the types of the fields to be escaped in the escape data set, wherein the number of the initial sets of fields to be escaped is the same as the number of types of the fields to be escaped, and different initial sets of fields to be escaped correspond to different types;

[0137] The to-be-escaped field in the escape data set is stored in an initial to-be-escaped set corresponding to the type of the to-be-escaped field to obtain the to-be-escaped set.

[0138] Specifically, the type of each field to be escaped in the escape data set can be determined first, the total number of types in the escape data set can be counted, and an initial set to be escaped can be constructed based on the total number. The initial set to be escaped is an empty set, and each initial set to be escaped corresponds to a different type.

[0139] Furthermore, the fields to be escaped in the escape dataset can be divided into initial sets of fields to be escaped, each of which has the same type. This process constructs sets of fields to be escaped based on field type. During the data escape process, this set of fields to be escaped can be used to perform batch conversions on the fields to be escaped, improving the efficiency of data escape.

[0140] The escape bit is the position of the field to be escaped in the data to be escaped. In the query statement waiting for escape data for the database, the types of the fields to be escaped in different escape bits are usually different. In one implementation, when the types of the data to be escaped in the escape data set are the same, constructing the initial set to be escaped based on the types of the fields to be escaped in the escape data set includes:

[0141] Constructing an initial set of bits to be escaped for each of the escaped bits in the data to be escaped;

[0142] The step of storing the to-be-escaped field in the escape data set in an initial to-be-escaped set corresponding to the type of the to-be-escaped field to obtain the to-be-escaped set includes:

[0143] The field to be escaped is stored in an initial set to be escaped corresponding to the escape position where the field to be escaped is located, to obtain the set to be escaped.

[0144] When the types of the fields to be escaped are different for different escape bits in the data to be escaped, and the types of the data to be escaped in the escape data set are the same, an initial set to be escaped can be constructed directly based on the escape bits. Specifically, an initial set to be escaped can be constructed for each escape bit in the data to be escaped. In this case, the number of escape bits in the data to be escaped, the number of types of the fields to be escaped, the initial set to be escaped, and the number of sets to be escaped are the same.

[0145] Since the initial set to be escaped corresponds to the escape bit one-to-one, the fields to be escaped in the data to be escaped can be sequentially put into the initial set to be escaped corresponding to the escape bit where the field to be escaped is located to obtain the set to be escaped.

[0146] Figure 5 The process diagram of the aspect-oriented data processing method is shown in FIG. Figure 5 As shown, first obtain the escape data set, and then obtain the fields annotated by @Dict in the entity class of each data to be escaped in the escape data set according to the reflection mechanism. These fields are generally more than 1 and form a list structure. Figure 5 Status 0, status 1, etc. are fields to be escaped annotated with @Dict. Item 1, item 2, etc. represent the numbers of the data to be escaped in the escape data set. Fields with the same status number under different item numbers have the same field type. Fields with the same status number can be considered to constitute a set to be escaped.

[0147] Among them, when defining the @Dict annotation, the annotation object @Target is set to ElementType.FIELD, indicating that the annotation can only be applied to field; @Retention is set to RetentionPolicy.RUNTIME, indicating that the annotation takes effect at runtime; the member variable in the annotation is of data dictionary type, which is used to obtain the data dictionary list.

[0148] In the above process, when the types of the fields to be escaped are different in different escape bits and the types of the data to be escaped in the escape data set are the same, an escape subset can be constructed based on the escape bit. This process does not require determining the types of each field to be escaped, and can improve the efficiency of constructing the escape subset without reducing the accuracy of the escape subset division.

[0149] Similar to the method of constructing the initial set to be escaped, field conversion processing can be performed on the fields to be escaped in sequence based on the escape bit. In one implementation, using the data dictionary to synchronously perform field conversion processing on each field to be escaped in the set to be escaped to obtain the target semantic field corresponding to the field to be escaped includes:

[0150] Reading each of the to-be-escaped sets in sequence based on the order of the escaped bits in the to-be-escaped data;

[0151] When the to-be-escaped set corresponding to the target escape bit is read, the to-be-escaped fields contained in the to-be-escaped set are synchronously converted using the data dictionary corresponding to the target escape bit to obtain the target semantic field.

[0152] Specifically, the set to be escaped can be read sequentially according to the order of the escape bits in the data to be escaped. When the set to be escaped corresponding to any escape bit (i.e., the target escape bit) is read, the mapping relationship corresponding to each field to be escaped in the set to be escaped can be determined in sequence from the data dictionary corresponding to the target escape bit, and another field in the mapping relationship other than the field to be escaped is used as the target semantic field.

[0153] like Figure 5 As shown, escapes can be performed in a loop from left to right based on the state number. Each escape process simultaneously escapes all fields to be escaped under the same state number. Specifically, within the loop body, the member variable dictionary type (DictType) of the annotation @Dict of the field to be escaped is read, and the dictionary key / dictionary value list corresponding to the dictionary type in Redis (i.e., the DictKey / DictValue list) is obtained and stored in the in-memory mapping structure (Map) to reduce Redis access.

[0154] The dictionary escape operation of the fields to be escaped within this loop body is executed concurrently. The dictionary value (DictValue) in the current mapping (Map) structure is obtained according to the dictionary key (DictKey) and assigned to the escape field (status_dictText) corresponding to the status field in the result set.

[0155] exist Figure 5 If the data to be escaped contains N data items, and each data item contains M states of the fields to be escaped, then if each data item is escaped sequentially, the data dictionary needs to be retrieved M*N times; if the data processing method described in this specification is used to concurrently escape N fields to be escaped with the same escape position, the data dictionary needs to be retrieved N times. Clearly, the data processing method described in this specification can significantly reduce the number of associated data dictionaries and improve the efficiency of data escaping. The greater the amount of data to be escaped contained in the data set, the more significant the improvement. This can effectively reduce service delays caused by the data processing process and improve user experience.

[0156] In this way, by sequentially traversing the field conversion processing of the to-be-escaped set, omissions and confusion in the escaping process can be avoided, and the efficiency and accuracy of the escaping process can be improved.

[0157] As mentioned above, the data to be escaped within the same escaped dataset may be of different types. For example, if the data to be escaped within the escaped dataset is a database query statement, the query statement may have multiple query types, such as conditional filtering, sorting, and deduplication. The grammatical structure of each query type is different, which means that the types of the fields to be escaped at the same escape position in the data to be escaped for different query types may be different.

[0158] At this time, if the same method is used to perform operations such as partitioning the to-be-escaped set and field conversion on each to-be-escaped data in the escape data set, incorrect escaped data may be obtained. In one implementation, the to-be-escaped data is a query statement for a database, and the to-be-escaped fields in the escape data set are partitioned to obtain multiple to-be-escaped sets, including:

[0159] Based on the query type of each query statement in the escaped data set, the escaped data set is divided and processed to obtain multiple escaped data subsets, and the query types of the query data in different escaped data subsets are the same;

[0160] The to-be-escaped fields in the escaped data subset are divided to obtain a plurality of to-be-escaped sets corresponding to the escaped data subset.

[0161] The escaped data subset is a data set containing to-be-escaped data of the same query type.

[0162] Specifically, the escaped data set can be first divided based on the type of each query statement in the escaped data set to obtain multiple escaped data subsets, where the query type of the data to be escaped (i.e., the query statement) in each escaped data subset is the same. For example, in the same escaped data subset, the query type of the query statement is a conditional filter statement. Subsequently, each escaped data subset can be divided according to the field to be escaped to obtain multiple sets of fields to be escaped corresponding to the escaped data subset.

[0163] In one example, an escape bit and a data dictionary corresponding to each escape bit can be preset for each type of query statement. Thus, after obtaining an escape data subset corresponding to each type of query statement, the data dictionary corresponding to that type of query statement can be directly used to perform field conversion processing on multiple to-be-escaped sets within the escape data subset. The escape bit can be a status bit used to identify and process the status of a processor or program.

[0164] In this example, by constructing the initial set to be escaped through query types, it is possible to achieve fine division of the escape subsets and improve the accuracy of the data escape process.

[0165] When intercepting an escaped data set sent to a user, if the data escape process takes too long, it will affect the user experience. In one implementation, when the escaped data set is intercepted, the method includes:

[0166] Determine the target database targeted by the query statement in the escaped data set, and cache the data dictionary corresponding to the target database in a remote dictionary service database;

[0167] The step of using the data dictionary to synchronously perform field conversion processing on each to-be-escaped field in the to-be-escaped set to obtain a target semantic field corresponding to the to-be-escaped field includes:

[0168] Using the data dictionary in the remote dictionary service database, field conversion processing is synchronously performed on each to-be-escaped field in the to-be-escaped set to obtain the target semantic field.

[0169] Specifically, if an escaped dataset is intercepted, the target database targeted by the escaped dataset can be determined. The escaped dataset contains query statements for the target database. Furthermore, the target database's data dictionary can be retrieved from the server storing the target database and cached in a remote dictionary service database (Remote Dictionary Server, Redis). This remote dictionary service database is a memory-based database that provides extremely high read and write speeds.

[0170] In this way, when using the data dictionary, the data dictionary can be directly read from Redis to implement field conversion processing and obtain the target semantic field.

[0171] In this example, a remote dictionary service database is used to store the data dictionary. In this way, during the data escape process, the data dictionary can be read directly from the remote dictionary service database, which can reduce the frequent access to the target database. At the same time, the efficient reading and writing speed of the remote dictionary service database can further improve the speed of the data escape process.

[0172] When the data dictionary in the server is updated, the remote dictionary service database can synchronously update the data dictionary therein. Figure 6 The diagram shows the management process of the data dictionary in the remote dictionary service database. Figure 6 As shown, the management of the data dictionary in the remote dictionary service database may include the following:

[0173] (1) Data initialization: When the service starts, it reads the relational database (i.e., the target database mentioned above) and loads the data dictionary into the Redis cache;

[0174] (2) Active data update: When the data dictionary in the relational database is updated, the Redis dictionary cache is updated synchronously;

[0175] (3) Passive data update: When the Redis cache data dictionary does not exist, read the relational database and load the data dictionary into the Redis cache.

[0176] Under special circumstances, the data dictionary in the remote dictionary service database may be out of sync with the data dictionary in the server. In one implementation, using the data dictionary in the remote dictionary service database to synchronously perform field conversion processing on each to-be-escaped field in the to-be-escaped set to obtain the target semantic field includes:

[0177] Detecting whether a data dictionary in the remote dictionary service database contains a mapping relationship corresponding to the field to be escaped;

[0178] If the detection result is that the data is not included, reading the mapping relationship from the server storing the data dictionary;

[0179] The data dictionary of the remote dictionary service database is updated using the mapping relationship, and the field corresponding to the field to be escaped in the mapping relationship is used as the target semantic field.

[0180] Specifically, in the process of using the data dictionary to perform field conversion processing, the data dictionary of the remote dictionary service database is first checked to see whether it contains the mapping relationship corresponding to the field to be escaped. If the detection result is that it is contained, the mapping relationship is directly used. If the detection result is that it is not contained, the mapping relationship needs to be read from the server that stores the data dictionary.

[0181] After reading the mapping relationship from the server storing the data dictionary, the mapping relationship is used to perform field conversion while updating the data dictionary in the remote dictionary service database. To avoid missing other mapping relationships after the update, the data dictionary corresponding to the mapping relationship in the server can be directly reloaded into the remote dictionary service database during the update process.

[0182] In this example, for mapping relationships not included in the data dictionary of the remote dictionary service database, the data dictionary of the remote dictionary service database is obtained from the server and updated, so that when the data dictionary is used subsequently, the more complete data dictionary can be used to reduce frequent access to the data dictionary in the server, thereby improving the efficiency of the data escape process.

[0183] Example 3

[0184] Figure 9 A schematic diagram of the structure of an electronic device is shown in FIG. Figure 9 As shown, the device includes:

[0185] The device includes a processor 991 and a memory 992; a communication interface 993, and a bus 994. The processor 991, memory 992, and communication interface 993 can communicate with each other via bus 994. Communication interface 993 can be used for information transmission. Processor 991 can invoke logic instructions in memory 992 to execute the method described above.

[0186] In addition, the logic instructions in the memory 992 can be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as an independent product.

[0187] Memory 992, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present application. Processor 991 executes the software programs, instructions, and modules stored in memory 992 to execute functional applications and data processing, that is, to implement the methods in the above method examples.

[0188] The memory 992 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function, while the data storage area may store data generated based on the use of the terminal device. Furthermore, the memory 992 may include high-speed random access memory and non-volatile memory.

[0189] An embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method in any embodiment.

[0190] An embodiment of the present application further provides a computer program product, including a computer program, which is used to implement the method in any embodiment when executed by a processor.

[0191] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required by this application.

[0192] It should be further noted that, although the various steps in the flowchart are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps may be performed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but may be performed at different times. The execution order of these sub-steps or stages is not necessarily to be performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0193] It should be understood that the above-described device embodiments are merely illustrative, and the device of the present application may also be implemented in other ways. For example, the division of units / modules in the above-described embodiments is merely a logical functional division, and actual implementations may employ other division methods. For example, multiple units, modules, or components may be combined or integrated into another system, or some features may be omitted or not implemented.

[0194] In addition, unless otherwise specified, the functional units / modules in the various embodiments of the present application may be integrated into a single unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The aforementioned integrated units / modules may be implemented in the form of hardware or software program modules.

[0195] If the integrated unit / module is implemented in hardware, the hardware may be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor may be any appropriate hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC. Unless otherwise specified, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), etc.

[0196] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0197] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a particular embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined in any way. To keep the description concise, 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.

[0198] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0199] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A data processing method, characterized in that: include: intercepting an escaped data set returned by the service provider after receiving a service request sent by the requester, wherein the escaped data set includes a plurality of data to be escaped, and obtaining a plurality of fields to be escaped from the data to be escaped; The to-be-escaped fields in the escape data set are divided to obtain a plurality of to-be-escaped sets, wherein the to-be-escaped fields in the same to-be-escaped set have the same data dictionary corresponding to them, and the data dictionary is used to store mapping relationships between different fields; Using the data dictionary, synchronously performing field conversion processing on each to-be-escaped field in the to-be-escaped set to obtain a target semantic field corresponding to the to-be-escaped field; The target semantic field is used to replace the field to be escaped in the data to be escaped to obtain escaped data, and the escaped data is sent to the requesting party.

2. The method according to claim 1, characterized in that The types of the fields in the different data dictionaries are different, and the fields to be escaped in the escape data set are divided and processed to obtain multiple sets to be escaped, including: Constructing an initial set of fields to be escaped according to the types of the fields to be escaped in the escape data set, wherein the number of the initial sets of fields to be escaped is the same as the number of types of the fields to be escaped, but different initial sets of fields to be escaped correspond to different types; The to-be-escaped field in the escape data set is stored in an initial to-be-escaped set corresponding to the type of the to-be-escaped field to obtain the to-be-escaped set.

3. The method according to claim 2, characterized in that In the data to be escaped, the types of the fields to be escaped in different escape positions are different. When the types of the data to be escaped in the escape data set are the same, constructing the initial set to be escaped according to the types of the fields to be escaped in the escape data set includes: Constructing an initial set of bits to be escaped for each of the escaped bits in the data to be escaped; The step of storing the to-be-escaped field in the escape data set in an initial to-be-escaped set corresponding to the type of the to-be-escaped field to obtain the to-be-escaped set includes: The field to be escaped is stored in an initial set to be escaped corresponding to the escape bit of the field to be escaped, to obtain the set to be escaped.

4. The method according to claim 3, characterized in that The step of using the data dictionary to synchronously perform field conversion processing on each to-be-escaped field in the to-be-escaped set to obtain a target semantic field corresponding to the to-be-escaped field includes: Reading each of the to-be-escaped sets in sequence based on the order of the escaped bits in the to-be-escaped data; When the to-be-escaped set corresponding to the target escape bit is read, the to-be-escaped fields included in the to-be-escaped set are synchronously converted using the data dictionary corresponding to the target escape bit to obtain the target semantic field.

5. The method according to claim 3, characterized in that The data to be escaped is a query statement for a database, and the fields to be escaped in the escape data set are divided and processed to obtain multiple sets to be escaped, including: Based on the query type of each query statement in the escaped data set, the escaped data set is divided and processed to obtain multiple escaped data subsets, and the query types of the query data in different escaped data subsets are the same; The to-be-escaped fields in the escaped data subset are divided to obtain a plurality of to-be-escaped sets corresponding to the escaped data subset.

6. The method according to claim 5, characterized in that In the case where the escaped data set is intercepted, the method includes: Determine the target database targeted by the query statement in the escaped data set, and cache the data dictionary corresponding to the target database in a remote dictionary service database; The step of using the data dictionary to synchronously perform field conversion processing on each to-be-escaped field in the to-be-escaped set to obtain a target semantic field corresponding to the to-be-escaped field includes: Using the data dictionary in the remote dictionary service database, field conversion processing is synchronously performed on each to-be-escaped field in the to-be-escaped set to obtain the target semantic field.

7. The method according to claim 6, characterized in that The method of using the data dictionary in the remote dictionary service database to synchronously perform field conversion processing on each to-be-escaped field in the to-be-escaped set to obtain the target semantic field includes: Detecting whether a data dictionary in the remote dictionary service database contains a mapping relationship corresponding to the field to be escaped; If the detection result is that the data is not included, reading the mapping relationship from the server storing the data dictionary; The data dictionary of the remote dictionary service database is updated using the mapping relationship, and the field corresponding to the field to be escaped in the mapping relationship is used as the target semantic field.

8. A data processing device, characterized in that: The device comprises: An interception module is used to intercept an escaped data set returned by the service provider after receiving a service request sent by the requester, wherein the escaped data set includes multiple pieces of data to be escaped, and obtain multiple fields to be escaped from the data to be escaped; a partitioning module, configured to partition the to-be-escaped fields in the escape data set to obtain a plurality of to-be-escaped sets, wherein the to-be-escaped fields in the same to-be-escaped set have the same data dictionary corresponding to them, and the data dictionary is configured to store mapping relationships between different fields; A conversion module, configured to synchronously perform field conversion processing on each to-be-escaped field in the to-be-escaped set using the data dictionary to obtain a target semantic field corresponding to the to-be-escaped field; The replacement module is used to use the target semantic field to replace the field to be escaped in the data to be escaped to obtain escaped data, and send the escaped data to the requesting party.

9. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.