Interface field management and control method and system, electronic equipment, storage medium and product

Through the interface field management and control method, the rule field tree of the data provider is filtered according to the configuration rules of the field application side, and only the required fields are fed back, which solves the problem of unnecessary fields in data transmission and improves efficiency and security.

CN118535599APending Publication Date: 2024-08-23KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410418284.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-08
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

During the data interaction process, the service interface usually outputs a large number of fields, but in fact each caller does not need all fields, resulting in unnecessary data transmission and security issues.

Method used

Receive field requests through the preset interface, determine whether the field application side has configuration rules, filter the locally pre-stored rule field tree based on these rules, determine and feed back the required fields, and achieve targeted data feedback.

Benefits of technology

By configuring rules to provide different filtering processes for different fields on the application side, targeted feedback of required fields according to needs is achieved, improving data transmission efficiency and ensuring data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535599A
    Figure CN118535599A
Patent Text Reader

Abstract

The embodiment of the invention discloses an interface field management and control method and system, electronic equipment, a storage medium and a product, and the method comprises the steps: receiving a field request sent by a field application end through a preset interface, and determining whether the field application end has a configuration rule or not; in response to the configuration rule, carrying out filtering processing on a locally pre-stored rule field tree based on the configuration rule; according to the filtered rule field tree, determining a feedback field which corresponds to the field request and comprises at least one field; and sending the feedback field to the field application end through the preset interface. According to the embodiment of the invention, different filtering processing is provided for different field application ends through the configuration rule, so that different feedback fields are provided for different field application ends, the required fields are fed back in a targeted manner according to the requirements, and the purpose of safely transmitting data is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to an interface field management method, system, electronic device, storage medium and product. Background Art

[0002] When two systems interact with each other, they usually transfer data through interfaces. When a system makes a data request, the service interface output is usually a large interface that uniformly outputs a large number of fields. However, in reality, each caller using the interface does not need all the fields fed back by the interface. When a large number of fields are fed back uniformly, unnecessary data transmission will be generated and data security issues will arise. Summary of the invention

[0003] In order to solve the above technical problems, the present disclosure is proposed. Embodiments of the present disclosure provide an interface field management method, system, electronic device, storage medium and product.

[0004] According to one aspect of an embodiment of the present disclosure, a method for managing and controlling interface fields is provided, which is applied to a data provider and includes:

[0005] Receiving a field request sent by a field application end through a preset interface, and determining whether the field application end has a configuration rule;

[0006] In response to having the configuration rule, filtering a locally pre-stored rule field tree based on the configuration rule;

[0007] Determine, according to the filtered rule field tree, a feedback field including at least one field corresponding to the field request;

[0008] The feedback field is sent to the field application end through the preset interface.

[0009] Optionally, receiving a field request sent by a field application end through a preset interface, and determining whether the field application end has a configuration rule includes:

[0010] Receiving, through the preset interface, a field request sent by the field application end and identification information corresponding to the field application end; wherein the identification information is used to distinguish different field application ends;

[0011] Based on matching the identification information with a plurality of pre-stored preset identification information, it is determined whether the field application end has a configuration rule; wherein each of the preset identification information corresponds to a configuration rule.

[0012] Optionally, the filtering process on the locally pre-stored rule field tree based on the configuration rule includes:

[0013] Parsing the configuration rule to determine at least one field type corresponding to the configuration rule;

[0014] Matching the at least one field type with the pre-stored regular field tree; wherein the regular field tree includes at least one leaf node, and each leaf node corresponds to a field type;

[0015] The leaf nodes in the rule field tree are filtered based on the matching result to obtain at least one filtered leaf node.

[0016] Optionally, determining the feedback field of at least one field included in the field request corresponding to the field request according to the filtered rule field tree includes:

[0017] Determine at least one field type according to the filtered rule field tree;

[0018] At least one field is obtained by filtering from all fields according to the at least one field type as the feedback field.

[0019] Optionally, before sending the feedback field to the field application end through the preset interface, the method further includes:

[0020] According to the field type corresponding to the feedback field, a corresponding desensitization operation is performed on the feedback field to obtain a desensitized feedback field;

[0021] The sending the feedback field to the field application end through the preset interface includes:

[0022] The desensitized feedback field is sent to the field application end through the preset interface.

[0023] Optionally, before filtering the locally pre-stored rule field tree based on the configuration rule, the method further includes:

[0024] Obtaining the full amount of fields corresponding to the preset interface, parsing each field in the full amount of fields, and determining the field type of the field;

[0025] Determining the field as a parent node or a leaf node based on the field type;

[0026] The regular field tree is determined based on at least one of the parent nodes and at least one of the leaf nodes.

[0027] Optionally, determining the field as a parent node or a leaf node based on the field type includes:

[0028] Determine whether the field type is a preset basic type;

[0029] In response to the field being the preset basic type, taking the field as a leaf node;

[0030] In response to the field not being the preset basic type, taking the field as a parent node, determining a field value included in the field, parsing the field value as the field, and determining whether the subfield is the preset basic type until the field is the preset basic type.

[0031] Optionally, determining the rule field tree based on at least one of the parent nodes and at least one of the leaf nodes includes:

[0032] Based on the association relationship between at least one of the parent nodes and at least one of the leaf nodes, determine at least one of the parent nodes and / or at least one of the leaf nodes corresponding to each of the parent nodes to obtain a tree structure;

[0033] The tree structure is screened according to the configuration information obtained from the server to obtain the rule field tree.

[0034] Optionally, the locally pre-stored rule field tree is determined according to configuration information in the server;

[0035] The method further comprises:

[0036] Determine whether the configuration information in the server has changed by initiating a long poll to the server;

[0037] In response to a change in the configuration information, the locally pre-stored rule field tree is updated according to the updated configuration information.

[0038] Optionally, in response to the configuration information being changed, updating the locally pre-stored rule field tree according to the updated configuration information includes:

[0039] In response to a change in the configuration information, the server feeds back a configuration change notification to the data provider via a persistent connection;

[0040] Requesting the server to obtain changed configuration information according to the configuration change notification;

[0041] The locally pre-stored rule field tree is updated according to the changed configuration information.

[0042] Optionally, it also includes:

[0043] At preset intervals, the identification information and port information of the data provider are sent to the server;

[0044] A connection channel with the server is established according to the identification information and the port information.

[0045] According to another aspect of an embodiment of the present disclosure, there is provided an interface field management and control system, including: a data provider and at least one field application end;

[0046] The field application terminal sends a field request to the data provider;

[0047] The data provider receives the field request sent by the field application end through a preset interface, and determines whether the field application end has a configuration rule; in response to having the configuration rule, filters the locally pre-stored rule field tree based on the configuration rule; determines a feedback field including at least one field corresponding to the field request based on the filtered rule field tree; and sends the feedback field to the field application end through the preset interface.

[0048] Optionally, the system further includes: at least one server;

[0049] The server obtains the full field from the data provider, processes the full field according to the received configuration information, obtains a regular field tree, and sends the regular field tree to the data provider.

[0050] Optionally, the data provider includes a field tree construction module;

[0051] The field tree construction module is used to obtain the full field corresponding to the preset interface, parse each field in the full field, and determine the field type of the field; determine the field as a parent node or a leaf node based on the field type; and determine the regular field tree based on at least one parent node and at least one leaf node.

[0052] Optionally, when the field tree construction module determines the field as a parent node or a leaf node based on the field type, it is used to determine whether the field type is a preset basic type; in response to the field being the preset basic type, the field is used as a leaf node; in response to the field not being the preset basic type, the field is used as a parent node, the field value included in the field is determined, the field value is parsed as the field, and it is determined whether the subfield is the preset basic type, until the field is the preset basic type.

[0053] Optionally, when determining the rule field tree based on at least one parent node and at least one leaf node, the field tree construction module is used to determine at least one parent node and / or at least one leaf node corresponding to each parent node based on the association relationship between at least one parent node and at least one leaf node to obtain a tree structure; and filter the tree structure according to the configuration information obtained from the server to obtain the rule field tree.

[0054] Optionally, when the data provider receives a field request sent by a field application end through a preset interface and determines whether the field application end has a configuration rule, the data provider receives the field request sent by the field application end through the preset interface, and identification information corresponding to the field application end; wherein the identification information is used to distinguish different field application ends; based on matching the identification information with multiple pre-stored preset identification information, determine whether the field application end has a configuration rule; wherein each of the preset identification information corresponds to a configuration rule.

[0055] Optionally, when the data provider performs filtering processing on a locally pre-stored rule field tree based on the configuration rule, it is used to parse the configuration rule to determine at least one field type corresponding to the configuration rule; match the at least one field type with the pre-stored rule field tree; wherein the rule field tree includes at least one leaf node, each of which corresponds to a field type; and filter the leaf nodes in the rule field tree based on the matching result to obtain at least one filtered leaf node.

[0056] Optionally, when the data provider determines the feedback field of at least one field corresponding to the field request based on the filtered rule field tree, it is used to determine at least one field type based on the filtered rule field tree; and filter from all fields based on the at least one field type to obtain at least one field as the feedback field.

[0057] Optionally, the data provider also includes:

[0058] A desensitization module is used to perform a corresponding desensitization operation on the feedback field according to the field type corresponding to the feedback field to obtain a desensitized feedback field; and send the desensitized feedback field to the field application end through the preset interface.

[0059] Optionally, the locally pre-stored rule field tree is determined according to configuration information in the server;

[0060] The data provider is also used to determine whether the configuration information in the server has changed by initiating a long poll to the server; in response to the configuration information being changed, update the locally pre-stored rule field tree according to the updated configuration information.

[0061] Optionally, when the data provider updates the locally pre-stored rule field tree according to the updated configuration information in response to the change in the configuration information, the server feeds back a configuration change notification to the data provider through a long connection in response to the change in the configuration information; requests the server to obtain the changed configuration information according to the configuration change notification; and updates the locally pre-stored rule field tree according to the changed configuration information.

[0062] Optionally, the data provider is further configured to send identification information and port information of the data provider to the server at preset time intervals; and establish a connection channel with the server according to the identification information and port information.

[0063] According to another aspect of the present disclosure, there is provided an electronic device, including:

[0064] A memory for storing a computer program product;

[0065] The processor is used to execute the computer program product stored in the memory, and when the computer program product is executed, the method described in any one of the above embodiments is implemented.

[0066] According to another aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described in any of the above embodiments is implemented.

[0067] According to another aspect of the embodiments of the present disclosure, a computer program product is provided, including computer program instructions, which implement the method described in any of the above embodiments when executed by a processor.

[0068] Based on the above-mentioned embodiments of the present disclosure, an interface field management method, system, electronic device, storage medium and product are provided. A field request sent by a field application end is received through a preset interface to determine whether the field application end has a configuration rule; in response to having the configuration rule, a locally pre-stored rule field tree is filtered based on the configuration rule; based on the filtered rule field tree, a feedback field including at least one field corresponding to the field request is determined; and the feedback field is sent to the field application end through the preset interface. The embodiments of the present disclosure provide different filtering processes for different field application ends through configuration rules, so as to provide different feedback fields to different field application ends, realize targeted feedback of the required fields according to their needs, and achieve the purpose of secure data transmission.

[0069] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0071] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

[0072] Figure 1 It is a flowchart of an interface field control method provided by an exemplary embodiment of the present disclosure;

[0073] Figure 2 This disclosure Figure 1 A schematic flow chart of step 102 in the embodiment shown;

[0074] Figure 3 This disclosure Figure 1 A schematic flow chart of step 104 in the embodiment shown;

[0075] Figure 4 is a flowchart of an interface field management method provided by another exemplary embodiment of the present disclosure;

[0076] Figure 5 is a structural diagram of an interface field management and control system provided by an exemplary embodiment of the present disclosure;

[0077] Figure 6 A block diagram of an electronic device according to an embodiment of the present disclosure is illustrated. DETAILED DESCRIPTION

[0078] Below, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.

[0079] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.

[0080] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.

[0081] It should also be understood that in the embodiments of the present disclosure, “plurality” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.

[0082] It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.

[0083] In addition, the term "and / or" in this disclosure is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this disclosure generally indicates that the previous and next associated objects are in an "or" relationship. The data referred to in this disclosure may include unstructured data such as text, images, and videos, and may also be structured data.

[0084] It should also be understood that the description of the various embodiments in the present disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.

[0085] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0086] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0087] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0088] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0089] The disclosed embodiments can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.

[0090] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.

[0091] Exemplary Methods

[0092] Figure 1 This is a flow chart of an interface field control method provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to a data provider, and the data provider can be set on any electronic device, such as Figure 1 As shown, the following steps are included:

[0093] Step 102: receiving a field request sent by a field application end through a preset interface, and determining whether the field application end has a configuration rule.

[0094] Optionally, the field application end can be any client. In this embodiment, the data provider can provide different preset interfaces for different field application ends, or the same preset interface can receive field requests sent by different field application ends at different times, and the preset interface can be any service interface that can realize data transmission. The service interface provided by the prior art is usually a large interface, which uniformly provides all the same fields to all field application ends, but in actual application scenarios, each field application end has different requirements for fields, and needs to perform screening and processing by itself after receiving all fields, which generates a lot of unnecessary work. In view of the problem of service interface in the prior art, this embodiment provides different preset interfaces for different field application ends, or provides different feedback fields for different field application ends through the same preset interface based on the identification of different field application ends. In order to realize the feedback of different feedback fields for different field application ends, different configuration rules can be configured for different field application ends on the data provider, and the feedback fields required by the corresponding field application ends are configured in the configuration rules.

[0095] Step 104: In response to the configuration rule being present, filtering is performed on the locally pre-stored rule field tree based on the configuration rule.

[0096] In one embodiment, before the data provider receives a field request, it only needs to introduce an installation package from the server and configure the configuration rules corresponding to different field application ends on the server (for example, a visual console), so that field filtering for different field application ends can take effect immediately. Optionally, the configuration rules corresponding to different field application ends can be stored, and the configuration rules and the identifiers corresponding to the field application ends can be matched and stored. After identifying the identifiers corresponding to the field application ends, the corresponding configuration rules can be obtained. Based on the configuration rules, the rule field tree pre-stored by the data provider can be filtered to obtain some fields requested by the field application end, wherein the rule field tree includes multiple fields.

[0097] This embodiment may also include, in response to the absence of configuration rules, determining a feedback field according to all field types included in the above rule field tree, and feeding back the feedback field to the field application end through a preset interface.

[0098] Step 106: Determine a feedback field including at least one field corresponding to the field request according to the filtered rule field tree.

[0099] In the filtered rule field tree, the fields not needed by the field application end are filtered out, and the fields retained are the feedback fields requested by the field application end.

[0100] Step 108: Send the feedback field to the field application end through a preset interface.

[0101] The feedback field is sent to the field application end through a preset interface, thereby realizing targeted feedback to the field application end and improving data transmission efficiency.

[0102] The above-mentioned embodiment of the present disclosure provides an interface field control method, which receives a field request sent by a field application end through a preset interface, determines whether the field application end has a configuration rule; in response to having the configuration rule, filters the locally pre-stored rule field tree based on the configuration rule; determines the feedback field including at least one field corresponding to the field request according to the filtered rule field tree; and sends the feedback field to the field application end through the preset interface. The embodiment of the present disclosure provides different filtering processes for different field application ends through configuration rules, so as to provide different feedback fields for different field application ends, realize targeted feedback of the required fields according to their needs, and achieve the purpose of secure data transmission.

[0103] like Figure 2 As shown in the above Figure 1 Based on the illustrated embodiment, step 102 may include the following steps:

[0104] Step 1021: Receive a field request sent by a field application end and identification information corresponding to the field application end through a preset interface.

[0105] The identification information is used to distinguish different field application ends.

[0106] Step 1022: Determine whether the field application end has a configuration rule based on matching the identification information with a plurality of pre-stored preset identification information.

[0107] Each preset identification information corresponds to a configuration rule.

[0108] In this embodiment, while receiving the field request, in order to distinguish different field application ends, identification information is also received to determine the specific field application end; and before receiving the field request, different coordination rules are set for at least one field application end at the data provider, and the configuration rules configure the fields required by the field application end, thereby realizing personalized configuration for different field application ends.

[0109] like Figure 3 As shown in the above Figure 1 Based on the illustrated embodiment, step 104 may include the following steps:

[0110] Step 1041: parse the configuration rule to determine at least one field type corresponding to the configuration rule.

[0111] When there are configuration rules corresponding to the field request end, the configuration rules are parsed to determine the field types included in the configuration rules. The field types in the configuration rules may include: JDK non-collection types (for example, map, date, integer, etc.), collection types (for example, list, set, etc.), array types (for example, user[], int[], etc.) and custom types (for example, person, etc.).

[0112] Step 1042: Match at least one field type with a pre-stored rule field tree.

[0113] The rule field tree includes at least one leaf node, and each leaf node corresponds to a field type.

[0114] The field types included in the configuration rules and the field types included in the pre-stored rule field tree have similarities and differences. This is because the field tree parsing is static parsing with generics, while the configuration rule parsing is dynamic parsing without generics. Optionally, in an optional example, during the processing, the original return value is not destroyed, but the obtained field name and field value are stored through LinkedHashMap. The response processing adopts the ResponseBodyAdvi ce provided by Spring <object>To process, the return of the supports method indicates whether the request needs to be processed by the beforeBodyWr ite method. The configuration rule parsing can be implemented in beforeBodyWr ite.

[0115] Step 1043: filter the leaf nodes in the rule field tree based on the matching result to obtain at least one filtered leaf node.

[0116] By matching the configuration rules with the rule field tree, the matching field types in the rule field tree are retained, and other unmatched field types are hidden, thereby filtering the rule field tree. At least one field type retained after filtering is the field type of the feedback field that needs to be fed back to the field application end. This embodiment filters the rule field tree through configuration rules, thereby achieving the purpose of quickly determining the feedback field.

[0117] In some optional embodiments, after filtering the rule field tree, the following steps may also be included:

[0118] Determine at least one field type according to the filtered rule field tree;

[0119] At least one field type is selected from all fields to obtain at least one field as a feedback field.

[0120] After filtering the rule field tree, at least one field type required by the field request end is determined. At this time, based on these field types, fields that meet at least one field type can be matched from the full field. These fields are feedback fields. By determining the field type, field screening is implemented to ensure that the field types of the feedback fields meet the requirements of the field application end.

[0121] In some optional embodiments, before sending the feedback field to the field application end through the preset interface, the following may also be included:

[0122] According to the field type corresponding to the feedback field, a corresponding desensitization operation is performed on the feedback field to obtain a desensitized feedback field;

[0123] At this time, the feedback field is sent to the field application end through the preset interface, including:

[0124] The desensitized feedback field is sent to the field application end through the preset interface.

[0125] In this embodiment, since the fields provided by the data provider may involve some privacy information, desensitization operations need to be performed on these privacy information during transmission to ensure the security of the data. Optionally, this embodiment can set different desensitization rules for different field types, for example, hiding part of the content in the field, etc.; when it is identified that a certain field needs to be desensitized, the corresponding desensitization operation can be determined according to the preset desensitization configuration, and the desensitized feedback field is obtained. The desensitized feedback field is sent to the field application end, and the security of the data is guaranteed under the premise of realizing data feedback. The problem of exposing unnecessary sensitive fields during data transmission is solved.

[0126] Figure 4 FIG. 1 is a flow chart of an interface field control method provided by another exemplary embodiment of the present disclosure. Figure 4 As shown, before executing step 104, the following may also be included:

[0127] Step 401, obtain the full amount of fields corresponding to the preset interface, parse each field in the full amount of fields, and determine the field type of the field.

[0128] Step 402: determine the field as a parent node or a leaf node based on the field type.

[0129] In this embodiment, the fields are abstracted into two types: one is the basic type and the other is the non-basic type. The basic type means that recursive parsing will not continue, but will be used as a leaf node on the field tree. This design is to ensure that the algorithm can parse most of the interface fields while ensuring the simplicity of its design and improving performance. The non-basic type means that recursive parsing can continue until the field type corresponding to the field is the basic type, and then the recursive parsing can be ended. Determining whether a field is a parent node or a leaf node may include: determining whether the field type is a preset basic type; in response to the field being a preset basic type, treating the field as a leaf node; in response to the field not being a preset basic type, treating the field as a parent node, determining the field value included in the field, parsing the field value as a field, and determining whether the subfield is a preset basic type until the field is a preset basic type.

[0130] Optionally, the preset basic types may include, but are not limited to: Java basic types (e.g., int, boolean, etc.), JDK objects and non-collection types (e.g., date, map, etc.), and nested types (e.g., list, etc.). <l i st <user>>, user[][], etc.); non-basic types may include but are not limited to: collection types (for example, list <user>,set <user>, etc.), array types (for example, user[], etc.), and custom types (for example, person, person <user>etc.

[0131] Step 403: determine a rule field tree based on at least one parent node and at least one leaf node.

[0132] Optionally, based on the association relationship between at least one parent node and at least one leaf node, at least one parent node and / or at least one leaf node corresponding to each parent node is determined to obtain a tree structure;

[0133] The tree structure is screened and processed according to the configuration information obtained from the server to obtain a rule field tree.

[0134] In this embodiment, after determining whether each field and the field resolution result is a parent node or a leaf node, at least one parent node and at least one leaf node are obtained, and the association relationship between the parent node and the leaf node can be known according to the field resolution process. Based on the association relationship, each parent node can be connected with at least one parent node and / or at least one leaf node to obtain a tree structure composed of multiple fields. The construction of the tree structure can be implemented on the server. After the data provider obtains the tree structure, the field is matched with the nodes included in the tree structure to obtain a rule field tree, and the rule field tree is stored so that when a field request is received, the feedback field is determined based on the rule field tree. In addition, in addition to being implemented on the data provider, the construction of the rule field tree can also be implemented on the server. At this time, the server obtains the full amount of fields from the data provider, obtains the rule field tree based on the above steps, and sends the rule field tree to the data provider.

[0135] In some optional embodiments, the locally pre-stored rule field tree is determined according to configuration information in the server;

[0136] The method provided in this embodiment may further include:

[0137] By initiating a long poll to the server, determine whether the configuration information in the server has changed;

[0138] In response to a change in the configuration information, the locally pre-stored rule field tree is updated according to the updated configuration information.

[0139] Optionally, this embodiment may include at least one server. To ensure configuration synchronization between multiple servers, each time there is a configuration change (e.g., receiving external settings, etc.), the changed configuration is synchronized between all servers. Optionally, multiple servers may be blockchain structures. In addition, since the data provider obtains configuration information from the server to determine the rule field tree, in order to ensure that the local rule field tree matches the configuration information in the server, the data provider initiates a long round training to the server at a preset interval, and receives feedback information according to the change of the configuration information in the server. For example, in response to a change in the configuration information, the server feeds back a configuration change notification to the data provider through a long connection; requests the server to obtain the changed configuration information according to the configuration change notification; and updates the locally stored rule field tree according to the changed configuration information. In response to the configuration information not changing, no new configuration information is obtained from the server. After a preset interval, a long round training is re-initiated to determine whether the configuration information in the server has changed. In this embodiment, the updated configuration information is obtained by the data provider actively initiating a long round training, so that the data provider always locally saves the rule field tree corresponding to the latest configuration information, avoiding the problem of feedback data errors caused by configuration asynchrony.

[0140] In some optional embodiments, the method provided by the embodiment of the present disclosure may further include:

[0141] At preset intervals, the identification information and port information of the data provider are sent to the server;

[0142] Establish a connection channel with the server based on the identification information and port information.

[0143] In order to achieve data communication security between the data provider and the server, the server often needs to send configuration information to the data provider. Therefore, in order to avoid the server from sending configuration information incorrectly, the data provider reports its own identification information and port information (optionally, in the form of ip:port, for example, 192.0.0.1:8080 or 10.0.0.1:8081, etc.) to the server at a preset interval. The identification information and port information stored by the server need to be updated regularly, and the previously reported information needs to be deleted. Therefore, DeleteQueue is used to ensure that the node automatically expires after a preset time.

[0144] Any interface field control method provided in the embodiments of the present disclosure may be executed by any appropriate device with data processing capabilities, including but not limited to: terminal devices and servers, etc. Alternatively, any interface field control method provided in the embodiments of the present disclosure may be executed by a processor, such as the processor executing any interface field control method mentioned in the embodiments of the present disclosure by calling corresponding instructions stored in a memory. This will not be described in detail below.

[0145] Exemplary Systems

[0146] Figure 5 FIG. 1 is a schematic diagram of the structure of an interface field control system provided by an exemplary embodiment of the present disclosure. Figure 5 As shown, the system provided by this embodiment includes: a data provider 51 and at least one field application end 52;

[0147] The field application end 52 sends a field request to the data provider 51;

[0148] The data provider 51 receives a field request sent by the field application end 52 through a preset interface, and determines whether the field application end 52 has a configuration rule; in response to having a configuration rule, filters the locally pre-stored rule field tree based on the configuration rule; determines a feedback field including at least one field corresponding to the field request based on the filtered rule field tree; and sends the feedback field to the field application end 52 through the preset interface.

[0149] The above-mentioned embodiment of the present disclosure provides an interface field management system, which receives a field request sent by a field application end through a preset interface, determines whether the field application end has a configuration rule; in response to having the configuration rule, filters the locally pre-stored rule field tree based on the configuration rule; determines the feedback field including at least one field corresponding to the field request according to the filtered rule field tree; and sends the feedback field to the field application end through the preset interface. The embodiment of the present disclosure provides different filtering processes for different field application ends through configuration rules, so as to provide different feedback fields for different field application ends, realize targeted feedback of the required fields according to their needs, and achieve the purpose of secure data transmission.

[0150] The system provided in this embodiment provides interface-level field and data security management for services to ensure data security. Through configuration, the interface data management can be diversified, support filtering of custom fields, and configure desensitization rules for specific fields to achieve data desensitization effects.

[0151] In some optional embodiments, the system provided in this embodiment may further include: at least one server;

[0152] The server obtains the full fields from the data provider, processes the full fields according to the received configuration information, obtains the rule field tree, and sends the rule field tree to the data provider.

[0153] In this embodiment, the data provider only needs to import the corresponding client (Client) JAR package from the server and configure the management and control rules on the server (visual console), and the field filtering for different field requesters (clients) can be immediately effective. The access method is simple and the rule configuration is also simple. In addition, the system will also persist the interface rules of historical configuration to facilitate backtracking and tracing the source.

[0154] In the above-mentioned embodiment, the rule field tree is constructed on the server side. However, the configuration information can also be sent to the data provider to implement the construction of the rule field tree on the data provider. The specific method of constructing the rule field tree can be to set a field tree construction module on the data provider 51 to obtain the full field corresponding to the preset interface, parse each field in the full field, and determine the field type of the field; determine the field as a parent node or a leaf node based on the field type; and determine the rule field tree based on at least one parent node and at least one leaf node.

[0155] Optionally, when the field tree construction module determines the field as a parent node or a leaf node based on the field type, it is used to determine whether the field type is a preset basic type; in response to the field being the preset basic type, the field is used as a leaf node; in response to the field not being the preset basic type, the field is used as a parent node, the field value included in the field is determined, the field value is parsed as a field, and it is determined whether the subfield is the preset basic type, until the field is the preset basic type.

[0156] Optionally, when determining a rule field tree based on at least one parent node and at least one leaf node, the field tree construction module is used to determine at least one parent node and / or at least one leaf node corresponding to each parent node based on the association relationship between at least one parent node and at least one leaf node to obtain a tree structure; and filter the tree structure according to the configuration information obtained from the server to obtain a rule field tree.

[0157] In some optional embodiments, when the data provider 51 receives a field request sent by the field application terminal 52 through a preset interface and determines whether the field application terminal 52 has a configuration rule, it is used to receive the field request sent by the field application terminal 52 through a preset interface, as well as identification information corresponding to the field application terminal 52; wherein the identification information is used to distinguish different field application terminals; based on matching the identification information with multiple pre-stored preset identification information, it is determined whether the field application terminal 52 has a configuration rule; wherein each preset identification information corresponds to a configuration rule.

[0158] In some optional embodiments, when the data provider 51 performs filtering processing on a locally pre-stored rule field tree based on the configuration rule, it is used to parse the configuration rule to determine at least one field type corresponding to the configuration rule; match at least one field type with the pre-stored rule field tree; wherein the rule field tree includes at least one leaf node, and each leaf node corresponds to a field type; based on the matching result, the leaf nodes in the rule field tree are filtered to obtain at least one filtered leaf node.

[0159] In some optional embodiments, when the data provider 51 determines the feedback field of at least one field included in the field request corresponding to the field request according to the filtered rule field tree, it is used to determine at least one field type according to the filtered rule field tree; and filter from all fields according to the at least one field type to obtain at least one field as the feedback field.

[0160] In some optional embodiments, the data provider 51 further includes:

[0161] The desensitizing module is used to perform a corresponding desensitizing operation on the feedback field according to the field type corresponding to the feedback field to obtain a desensitized feedback field; and send the desensitized feedback field to the field application end through a preset interface.

[0162] In some optional embodiments, the locally pre-stored rule field tree is determined according to configuration information in the server;

[0163] The data provider 51 is also used to determine whether the configuration information in the server has changed by initiating a long poll to the server; in response to the configuration information being changed, the locally pre-stored rule field tree is updated according to the updated configuration information.

[0164] In some optional embodiments, when the data provider 51 updates the locally pre-stored rule field tree according to the updated configuration information in response to a change in configuration information, the server feeds back a configuration change notification to the data provider through a long connection in response to the change in configuration information; requests the server to obtain the changed configuration information according to the configuration change notification; and updates the locally pre-stored rule field tree according to the changed configuration information.

[0165] In some optional embodiments, the data provider 51 is further configured to send identification information and port information of the data provider 51 to the server at preset time intervals; and establish a connection channel with the server according to the identification information and port information.

[0166] Exemplary Electronic Devices

[0167] Below, reference Figure 6 The electronic device according to the embodiment of the present disclosure is described. The electronic device may be any one or both of the first device and the second device, or a stand-alone device independent of them, and the stand-alone device may communicate with the first device and the second device to receive the collected input signals from them.

[0168] Figure 6 A block diagram of an electronic device according to an embodiment of the present disclosure is illustrated.

[0169] like Figure 6 As shown, the electronic device includes one or more processors and memory.

[0170] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

[0171] The memory may store one or more computer program products, and the memory may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program products may be stored on the computer-readable storage medium, and the processor may run the computer program product to implement the interface field management method and / or other desired functions of the various embodiments of the present disclosure described above.

[0172] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0173] In addition, the input device may also include, for example, a keyboard, a mouse, and the like.

[0174] The output device can output various information to the outside, including determined distance information, direction information, etc. The output device can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0175] Of course, to simplify, Figure 6 Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device may further include any other appropriate components.

[0176] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the interface field management method according to various embodiments of the present disclosure described in the above part of this specification.

[0177] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0178] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the interface field control method according to various embodiments of the present disclosure described in the above part of this specification.

[0179] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0180] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0181] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0182] The block diagrams of the devices, apparatuses, equipment, and systems involved in the present disclosure are intended to be illustrative examples only and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems may be connected, arranged, and configured in any manner. Words such as "include," "comprise," "have," and the like are open words, meaning "including but not limited to," and may be used interchangeably therewith. The words "or," "and," and "as used herein refer to the words "and / or," and may be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as," as used herein, refers to the phrase "such as, but not limited to," and may be used interchangeably therewith.

[0183] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0184] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0185] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0186] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.< / user> < / user> < / user> < / user> < / object>

Claims

1. A method for controlling interface fields, characterized in that: Applied to data providers, including: Receiving a field request sent by a field application end through a preset interface, and determining whether the field application end has a configuration rule; In response to having the configuration rule, filtering a locally pre-stored rule field tree based on the configuration rule; Determine, according to the filtered rule field tree, a feedback field including at least one field corresponding to the field request; The feedback field is sent to the field application end through the preset interface.

2. The method according to claim 1, characterized in that The receiving, through a preset interface, a field request sent by a field application end, and determining whether the field application end has a configuration rule includes: Receiving, through the preset interface, a field request sent by the field application end and identification information corresponding to the field application end; wherein the identification information is used to distinguish different field application ends; Based on matching the identification information with a plurality of pre-stored preset identification information, it is determined whether the field application end has a configuration rule; wherein each of the preset identification information corresponds to a configuration rule.

3. The method according to claim 1 or 2, characterized in that: The filtering process of the locally pre-stored rule field tree based on the configuration rule includes: Parsing the configuration rule to determine at least one field type corresponding to the configuration rule; Matching the at least one field type with the pre-stored regular field tree; wherein the regular field tree includes at least one leaf node, and each leaf node corresponds to a field type; The leaf nodes in the rule field tree are filtered based on the matching result to obtain at least one filtered leaf node.

4. The method according to any one of claims 1 to 3, characterized in that: The step of determining the feedback field of at least one field included in the field request according to the filtered rule field tree comprises: Determine at least one field type according to the filtered rule field tree; At least one field is obtained by filtering from all fields according to the at least one field type as the feedback field.

5. The method according to any one of claims 1 to 4, characterized in that: Before sending the feedback field to the field application end through the preset interface, the method further includes: According to the field type corresponding to the feedback field, a corresponding desensitization operation is performed on the feedback field to obtain a desensitized feedback field; The sending the feedback field to the field application end through the preset interface includes: The desensitized feedback field is sent to the field application end through the preset interface.

6. The method according to any one of claims 1 to 5, characterized in that: Before filtering the locally pre-stored rule field tree based on the configuration rule, the method further includes: Obtaining the full amount of fields corresponding to the preset interface, parsing each field in the full amount of fields, and determining the field type of the field; Determining the field as a parent node or a leaf node based on the field type; The regular field tree is determined based on at least one of the parent nodes and at least one of the leaf nodes.

7. The method according to claim 6, characterized in that The determining the field as a parent node or a leaf node based on the field type includes: Determine whether the field type is a preset basic type; In response to the field being the preset basic type, taking the field as a leaf node; In response to the field not being the preset basic type, taking the field as a parent node, determining a field value included in the field, parsing the field value as the field, and determining whether the subfield is the preset basic type until the field is the preset basic type.

8. The method according to claim 6 or 7, characterized in that: The determining the rule field tree based on at least one of the parent nodes and at least one of the leaf nodes includes: Based on the association relationship between at least one of the parent nodes and at least one of the leaf nodes, determine at least one of the parent nodes and / or at least one of the leaf nodes corresponding to each of the parent nodes to obtain a tree structure; The tree structure is screened according to the configuration information obtained from the server to obtain the rule field tree.

9. The method according to any one of claims 1 to 8, characterized in that: The locally pre-stored rule field tree is determined according to the configuration information in the server; The method further comprises: Determine whether the configuration information in the server has changed by initiating a long poll to the server; In response to a change in the configuration information, the locally pre-stored rule field tree is updated according to the updated configuration information.

10. The method according to claim 9, characterized in that In response to the configuration information being changed, updating the locally pre-stored rule field tree according to the updated configuration information includes: In response to a change in the configuration information, the server feeds back a configuration change notification to the data provider via a persistent connection; Requesting the server to obtain changed configuration information according to the configuration change notification; The locally pre-stored rule field tree is updated according to the changed configuration information.

11. The method according to any one of claims 1 to 10, characterized in that: Also includes: Sending identification information and port information of the data provider to the server at preset intervals; A connection channel with the server is established according to the identification information and the port information.

12. An interface field management and control system, characterized in that: include: A data provider and at least one field application end; The field application terminal sends a field request to the data provider; The data provider receives the field request sent by the field application end through a preset interface, determines whether the field application end has a configuration rule; in response to having the configuration rule, performs filtering processing on a locally pre-stored rule field tree based on the configuration rule; According to the filtered rule field tree, a feedback field including at least one field corresponding to the field request is determined; and the feedback field is sent to the field application end through the preset interface.

13. The system according to claim 12, characterized in that The system further comprises: at least one server; The server obtains the full field from the data provider, processes the full field according to the received configuration information, obtains a regular field tree, and sends the regular field tree to the data provider.

14. An electronic device, characterized in that: include: a memory for storing a computer program product; A processor is used to execute the computer program product stored in the memory, and when the computer program product is executed, it implements the method described in any one of claims 1 to 11.

15. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method described in any one of claims 1 to 11 is implemented.

16. A computer program product comprising computer program instructions, characterized in that When the computer program instructions are executed by a processor, the method described in any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Data acquisition method and device, medium and electronic equipment

    CN109981619A

  • Data desensitization method and device, electronic equipment and storage medium

    CN112765658A

  • Business processing method and device, electronic equipment, and storage medium

    CN114022296A

  • Data communication method, device, equipment, storage medium and system

    CN114968621A

  • Configured data desensitization method and device

    CN116522372A