Interface data generation method and device and storage medium

By obtaining and utilizing the field mapping configuration information of the interface, and automatically obtaining and mapping interface data, the problem of low hard coding efficiency caused by the differences in interface parameters of different banks is solved, and fast and efficient interface data generation is achieved.

CN119988470APending Publication Date: 2025-05-13KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411958069.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

There are differences in parameters transmitted by different banks' interfaces, resulting in the fact that every new bank connected to a bank needs to convert the data on the transaction side into the interface data of the bank through hard code, which is relatively inefficient.

Method used

By obtaining the field mapping configuration information of the interface, including the fields contained in the interface, the position of the fields in the data format of the interface, and the value path of the fields, the values ​​of the fields are obtained based on this information and the interface data are generated.

Benefits of technology

Without hard-coded the newly connected interface, the generation of interface data can be quickly achieved through field mapping, improving the efficiency of interface data generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988470A_ABST
    Figure CN119988470A_ABST
Patent Text Reader

Abstract

The invention relates to an interface data generation method and device and a storage medium, field mapping configuration information of an interface is obtained, the field mapping configuration information comprises a field contained in the interface, the position of the field in a data format of the interface and a value path of the field, and based on the value path of the field, the value of the field is obtained; and generating interface data based on the field contained in the interface and the position and the value of the field. Therefore, the interface data can be quickly generated through the field mapping method without performing hard coding on the newly docked interface, and the interface data generation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of interface data generation, and in particular to a method, device and storage medium for generating interface data. Background Art

[0002] Some commodity transactions often involve banking business. In order to improve the efficiency of banking business, reduce the information input by bank staff, and improve customer experience, it is necessary to push the existing information on the transaction side to the bank. However, there are differences in the parameters transmitted by different bank interfaces. At present, each new bank needs to be connected by hard coding to convert the data on the transaction side into the interface data of the bank, which is inefficient. Summary of the invention

[0003] In order to solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a method, device and storage medium for generating interface data.

[0004] In a first aspect, an embodiment of the present disclosure provides a method for generating interface data, the method comprising:

[0005] Acquire field mapping configuration information of the interface, wherein the field mapping configuration information includes fields included in the interface, positions of the fields in the data format of the interface, and value paths of the fields;

[0006] Based on the value path of the field, obtain the value of the field;

[0007] Interface data is generated based on the fields included in the interface, and the positions and values ​​of the fields.

[0008] In some implementations, for at least some of the fields included in the interface, the field mapping configuration information further includes default values ​​of the fields;

[0009] The method further comprises:

[0010] For each field in the at least part of the fields, in response to the value obtained based on the value path of the field being empty, the value of the field is set to a default value.

[0011] In some implementations, for at least some of the fields included in the interface, the field mapping configuration information further includes identification information of a dictionary corresponding to the field;

[0012] After obtaining the value of the field based on the value obtaining path of the field, the method further includes:

[0013] For each field in the at least part of the fields, the dictionary is obtained based on identification information of the dictionary corresponding to the field, and based on the dictionary, the value of the field is mapped to a target value.

[0014] In some embodiments,

[0015] For at least some of the fields included in the interface, the field mapping configuration information also includes a format conversion formula for the field;

[0016] After obtaining the value of the field based on the value obtaining path of the field, the method further includes:

[0017] For each field in the at least part of the fields, format conversion is performed on the value of the field based on a format conversion formula of the field.

[0018] In some embodiments,

[0019] For at least some of the fields included in the interface, the field mapping configuration information further includes a first identification bit of the field, where the first identification bit is used to indicate whether the field is a required field;

[0020] After generating the interface data based on the fields included in the interface, and the positions and values ​​of the fields, the method further includes:

[0021] For any field in the at least some of the fields, if the first identification bit of the field indicates that the field is a field that must be filled in, detecting a value of the field in the interface data;

[0022] If the value of the field in the interface data is empty, an alarm message is output.

[0023] In some implementations, the field mapping configuration information further includes information about the data type of the field. For an array type field, the field mapping configuration information includes a value path for each element in the array.

[0024] The obtaining the value of the field based on the value obtaining path of the field includes:

[0025] For a field of array type, the value of each element in the array is obtained based on the value path of each element in the array.

[0026] In some implementations, generating interface data based on the fields included in the interface, and the positions and values ​​of the fields, includes:

[0027] Determining a data format of the interface based on the fields included in the interface and the position of each field;

[0028] For each field in the interface, based on the position of the field, the value of the field is written into the data format to obtain interface data.

[0029] In a second aspect, an embodiment of the present disclosure provides a method for generating interface data, the method comprising:

[0030] Acquire field mapping configuration information of a bank interface, wherein the field mapping configuration information includes fields included in the bank interface, positions of the fields in a data format of the bank interface, and value paths of the fields;

[0031] Based on the value acquisition path of the field, obtaining the value of the field from the commodity transaction data;

[0032] Based on the fields included in the bank interface, and the positions and values ​​of the fields, interface data of the bank interface are generated.

[0033] In some implementations, the commodity transaction data includes housing transaction data.

[0034] In a third aspect, an embodiment of the present disclosure provides an interface data generating device, the device comprising:

[0035] A first acquisition module is used to acquire field mapping configuration information of an interface, wherein the field mapping configuration information includes fields included in the interface, positions of the fields in a data format of the interface, and value paths of the fields;

[0036] A second acquisition module, used for acquiring the value of the field based on the value acquisition path of the field;

[0037] The data generation module is used to generate interface data based on the fields included in the interface, and the positions and values ​​of the fields.

[0038] In some implementations, for at least some of the fields included in the interface, the field mapping configuration information further includes default values ​​of the fields;

[0039] The interface data generating device provided in the third aspect may further include:

[0040] A setting module is used for setting the value of each field in the at least part of the fields to a default value in response to the value obtained based on the value path of the field being empty.

[0041] In some implementations, for at least some of the fields included in the interface, the field mapping configuration information further includes identification information of a dictionary corresponding to the field;

[0042] The interface data generating device provided in the third aspect may further include:

[0043] A mapping module is used to obtain the dictionary for each field in the at least part of the fields based on identification information of the dictionary corresponding to the field, and map the value of the field to a target value based on the dictionary.

[0044] In some implementations, for at least some of the fields included in the interface, the field mapping configuration information further includes a format conversion formula for the field;

[0045] The interface data generating device provided in the third aspect may further include:

[0046] The format conversion module is used to perform format conversion on the value of each field in the at least part of the fields based on the format conversion formula of the field.

[0047] In some implementations, for at least some of the fields included in the interface, the field mapping configuration information further includes a first identification bit of the field, where the first identification bit is used to indicate whether the field is a required field;

[0048] The interface data generating device provided in the third aspect may further include:

[0049] a detection module, configured to detect, for any field in the at least some of the fields, a value of the field in the interface data if the first identification bit of the field indicates that the field is a field that must be filled in;

[0050] The alarm module is used to output an alarm message if the value of the field in the interface data is empty.

[0051] In some implementations, the field mapping configuration information further includes information about the data type of the field. For an array type field, the field mapping configuration information includes a value path for each element in the array.

[0052] The second acquisition module is used to acquire the value of each element in the array type field based on the value path of each element in the array.

[0053] In some embodiments, the data generation module is used to:

[0054] Determining a data format of the interface based on the fields included in the interface and the position of each field;

[0055] For each field in the interface, based on the position of the field, the value of the field is written into the data format to obtain interface data.

[0056] In a fourth aspect, an embodiment of the present disclosure provides an interface data generating device, including:

[0057] An interface configuration acquisition module, used to acquire field mapping configuration information of a bank interface, wherein the field mapping configuration information includes fields included in the bank interface, positions of the fields in the data format of the bank interface, and value paths of the fields;

[0058] A field value acquisition module, used to acquire the value of the field from the commodity transaction data based on the value acquisition path of the field;

[0059] The interface data generating module is used to generate the interface data of the bank interface based on the fields contained in the bank interface, and the positions and values ​​of the fields.

[0060] In some implementations, the commodity transaction data includes housing transaction data.

[0061] In a fifth aspect, an embodiment of the present disclosure provides a computer device, the computer device comprising:

[0062] Memory;

[0063] Processor; and

[0064] Computer programs;

[0065] The computer program is stored in the memory and is configured to be executed by the processor to implement any method as described in the first aspect or the second aspect.

[0066] In a sixth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement any of the methods described in the first aspect or the second aspect.

[0067] In a seventh aspect, an embodiment of the present disclosure provides a computer program product, comprising computer program instructions, which, when executed by a processor, can implement any of the methods described in the first aspect or the second aspect.

[0068] The method, device and storage medium for generating interface data provided by the embodiments of the present disclosure obtain field mapping configuration information of the interface, which includes fields included in the interface, the positions of the fields in the data format of the interface and the value path of the fields, obtain the value of the fields based on the value path of the fields, and generate interface data based on the fields included in the interface, the positions and values ​​of the fields. Therefore, there is no need to hard code the newly connected interface, and the interface data can be quickly generated through the field mapping method, thereby improving the efficiency of interface data generation. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0070] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0071] Figure 1 is a flow chart of a method for generating interface data provided by an embodiment of the present disclosure;

[0072] Figure 2 is a schematic diagram of source data provided by an embodiment of the present disclosure;

[0073] Figure 3 is a schematic diagram of the content of field mapping configuration information provided by an embodiment of the present disclosure;

[0074] Figure 4A is a schematic diagram of another source data provided by an embodiment of the present disclosure;

[0075] Figure 4B is based on Figure 4A A schematic diagram of interface data obtained from source data;

[0076] Figure 5 It is a schematic diagram of the content of another field mapping configuration information provided by an embodiment of the present disclosure;

[0077] Figure 6 It is a schematic diagram of the content of another field mapping configuration information provided by an embodiment of the present disclosure;

[0078] Figure 7 It is a schematic diagram of the content of another field mapping configuration information provided by an embodiment of the present disclosure;

[0079] Figure 8 is a content schematic diagram of a dictionary provided by an embodiment of the present disclosure;

[0080] Fig. 9 It is a schematic diagram of the content of another field mapping configuration information provided by an embodiment of the present disclosure;

[0081] Fig.10 is a schematic diagram of another method for generating interface data provided by an embodiment of the present disclosure;

[0082] Fig.11 is a flowchart of another method for generating interface data provided by an embodiment of the present disclosure;

[0083] Fig.12 is a structural schematic diagram of an interface data generating device provided by an embodiment of the present disclosure;

[0084] Fig.13 A schematic diagram of the structure of a computer device embodiment provided in the present disclosure. DETAILED DESCRIPTION

[0085] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0086] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0087] In the related art, source data can generally be converted into interface data of the corresponding interface through a preset object conversion method. Currently, commonly used object conversion methods include get, set, dozer, MapStruct, etc. However, these object conversion methods require hard coding to convert source data into interface data of the new interface when docking a new interface, which is inefficient.

[0088] In view of the above problems existing in the related art, the embodiments of the present disclosure provide a method, device and storage medium for generating interface data. When accessing a new interface, it is only necessary to pre-set field mapping configuration information, such as the fields included in the interface, the position of the fields in the data format of the interface and the value path of the fields, etc., and the source data can be mapped to the interface data based on the field mapping configuration information, without the need for hard coding, thereby improving efficiency.

[0089] The solutions of the embodiments of the present disclosure are described below in conjunction with exemplary embodiments.

[0090] For example, Figure 1 1 is a flow chart of a method for generating interface data provided by an embodiment of the present disclosure. The method can be exemplarily performed by a computer device. The computer device can be understood as any device with computing and processing capabilities, such as a mobile phone, a computer, a server, etc., but is not limited to the devices listed here. Figure 1 As shown, in some implementations, the method for generating interface data provided by the embodiment of the present disclosure may include steps 101 to 103.

[0091] Step 101: Obtain the field mapping configuration information of the interface. The field mapping configuration information includes the fields included in the interface, the positions of the fields in the data format of the interface, and the value extraction paths of the fields.

[0092] Among them, the interface referred to in the embodiments of the present disclosure can be understood as any data interface. This interface has the ability to transmit data. For the convenience of understanding, the interface referred to in the embodiments of the present disclosure can be specifically exemplified as a data interface for banking services, that is, a bank interface. Through this data interface, source data (such as transaction data of houses, transaction data of vehicles, etc., data on the commodity transaction side) is transmitted to the corresponding banking services.

[0093] In the embodiments of the present disclosure, the identification of the interface and the field mapping configuration information can be pre-configured, and the interface identification and the field mapping configuration information are associated.

[0094] The field mapping configuration information referred to in the embodiments of the present disclosure is used to map source data into interface data. The field mapping configuration information of the interface can at least include the fields included in the interface, the positions of the fields in the data format of the interface, and the value extraction paths of the fields. Among them, the value extraction path of the field can be understood as the acquisition path for extracting the value of the field. Based on this path, the position of the value of the field in the source data can be accurately located. For example Figure 2 is a schematic diagram of a kind of source data provided by the embodiments of the present disclosure. In Figure 2 the rectangular boxes show a hierarchical relationship of the source data, that is, in Figure 2 the first data level is "applyinfo", the second data level is "dynamicForm", and the third data level is "daiKuanZhuJieKuanRenXingMing". Assuming that the value extraction path of the field is "applyinfo.dynamicForm.daiKuanZhuJieKuanRenXingMing", the value obtained based on this value extraction path is "Xiaohua".

[0095] Exemplarily, in some embodiments, in addition to including the fields in the interface, the positions of the fields in the data format of the interface, and the value extraction paths of the fields, the field mapping configuration information of the interface can also be configured with other information as needed. For example, Figure 3 is a schematic diagram of the content of a kind of field mapping configuration information provided by the embodiments of the present disclosure. Figure 3 The content in the field mapping configuration information is exemplified with one field.

[0096] Such as Figure 3 shown, in some embodiments, the field mapping configuration information of the interface can include: the identification of the interface (that is Figure 3The content of the column where the "api_code" is located in the interface), the identifier of each field in the interface (i.e. Figure 3 The content of the column where "code" is located in the Figure 3 The content of the column where "name" is located in the interface), the position of each field in the data format of the interface (i.e. Figure 3 The content of the column where "pos" is located in the ), the value path of each field (i.e. Figure 3 In some implementations, the field mapping configuration information of the interface can be obtained according to the identifier of the interface.

[0097] It should be noted that Figure 3 This is only an example of the field mapping configuration information, not a sole limitation. In fact, in other implementations, the content of the field mapping configuration information can be set as needed, and is not limited to the above content. For example, in some implementations, the field mapping configuration information can also include information such as the data type of the field (e.g., string type and data type, etc.).

[0098] Step 102: Get the value of the field based on the value path of the field.

[0099] by Figure 2 Taking the source data shown as an example, assuming that the value path of the field is "applyinfo.dynamicForm.daiKuanZhuJieKuanRenXingMing", the value obtained based on the value path is "Xiaohua".

[0100] It should be noted that when the data type of the field is an array type, the value path of each element in the array may be included in the field mapping configuration information. In this case, the step of obtaining the value of the field based on the value path of the field may include: for each element in the array, based on the value path of the element, obtaining the value of the element. When the data type of the field is a string type, the value path of the string may be included in the field mapping configuration information, and then the corresponding string may be directly obtained according to the value path of the string.

[0101] Step 103: Generate interface data based on the fields included in the interface, as well as the positions and values ​​of the fields.

[0102] For example, in some implementations, after knowing the fields included in the interface and the position of each field in the data format of the interface, the fields included in the interface can be arranged according to the position of the field to obtain the data format of the interface. Further, after obtaining the value of the field based on the value path of the field, the value of the field can be mapped to the corresponding field of the data format according to the position of the field in the data format, thereby obtaining the interface data.

[0103] For example, in other implementations, the step of determining the data format of the interface may be omitted, and after obtaining the values ​​of each field in the interface, the values ​​of each field are directly arranged and combined according to the positions of each field in the interface to obtain the interface data. Figure 4A is a schematic diagram of another source data provided by an embodiment of the present disclosure, Figure 4B is based on Figure 4A The schematic diagram of the interface data obtained from the source data is as follows: Figure 4A and Figure 4B As shown, from Figure 4A After obtaining the values ​​of each field in the interface from the source data shown in the figure, the values ​​of each field can be arranged and combined according to the position of each field in the interface to obtain the following Figure 4B The interface data shown. Figure 4A and Figure 4B This is for illustrative purposes only and is not intended to be limiting.

[0104] The disclosed embodiment obtains the field mapping configuration information of the interface, which includes the fields included in the interface, the positions of the fields in the data format of the interface, and the value path of the fields, obtains the value of the fields based on the value path of the fields, and generates interface data based on the fields included in the interface, the positions of the fields, and the values. Therefore, there is no need to hard-code the newly connected interface, and the interface data can be quickly generated by field mapping, thereby improving the efficiency of interface data generation.

[0105] For example, Figure 5 FIG. 1 is another schematic diagram of the content of field mapping configuration information provided by an embodiment of the present disclosure. Figure 5 As shown, in some implementations, for some fields in the interface, the field mapping configuration information provided by the embodiment of the present disclosure may also include a first identification bit of the field. The first identification bit of the field is used to indicate whether the field is a required field. In this scenario, after generating interface data based on the fields included in the interface, and the positions and values ​​of the fields, the embodiment of the present disclosure may also include a step of detecting the interface data.

[0106] For example, in some detection methods, the required fields in the interface can be determined based on the values ​​of the first identification bits corresponding to the fields in the interface. For example, when the value of the first identification bit of the field is 1, the field can be determined to be a required field, and when the value of the first identification bit of the field is 0, the field can be determined to be a non-required field. Of course, this is only an example of multiple first identification bits and is not a sole limitation.

[0107] After the required fields are determined, the values ​​of the required fields may be detected based on their positions in the interface data. If the values ​​of one or more required fields in the interface data are empty, an alarm message is output.

[0108] Alternatively, in other embodiments, after the interface data is generated, all fields in the interface data can be directly traversed. When the value of a certain field is empty, the value of the first identification bit of the field can be obtained from the field mapping configuration information. If the value on the first identification bit indicates that the field is a required field, an alarm message is output.

[0109] By setting the first identification bit in the field mapping configuration information and detecting the mandatory fields in the interface data according to the first identification bit, the integrity of the interface data can be ensured and the omission of necessary data can be prevented.

[0110] For example, Figure 6 FIG. 1 is another schematic diagram of the content of field mapping configuration information provided by an embodiment of the present disclosure. Figure 6 As shown, in some implementations, for some fields in the interface, the field mapping configuration information provided by the embodiments of the present disclosure may also include default values ​​for the fields.

[0111] In some embodiments, after obtaining the value of the field based on the value path of the field in the interface, the obtained value can be judged. If the value of the field is empty, the value of the field is set to the default value, and then when generating interface data, the default value of the field is used to generate the interface data.

[0112] Alternatively, in some other implementations, after the interface data is generated, the value of each field in the interface data may be detected. If it is detected that the value of a field is empty, the default value of the field may be obtained from the field mapping configuration information and the default value may be filled into the field.

[0113] To summarize the above implementations, that is, in one exemplary statement of the embodiments of the present disclosure, the above multiple implementations can be uniformly expressed as follows: for at least some fields in the interface, in response to the value obtained based on the value path of the field being empty, the value of the field is set to the default value.

[0114] By setting the default value of the field in the field mapping configuration information, when the value of the field is empty, the value of the dictionary is set to the default value, which can ensure the integrity of the interface data and prevent data omission.

[0115] For example, Figure 7 FIG. 1 is another schematic diagram of the content of field mapping configuration information provided by an embodiment of the present disclosure. Figure 7 As shown, in some implementations, for some fields in the interface, the field mapping configuration information provided by the embodiment of the present disclosure may also include identification information of the dictionary corresponding to the field. The identification information of the dictionary is used to find the dictionary corresponding to the field.

[0116] For example, Figure 8 Schematic diagram of the contents of a dictionary provided by an embodiment of the present disclosure. Figure 8 As shown, in some embodiments, the dictionary referred to in the embodiments of the present disclosure may include the value of the field in the source data and the target value corresponding to the value. In some embodiments, for some fields in the interface, the dictionary corresponding to the field can be obtained based on the identification information of the dictionary corresponding to the field, and the value of the field in the source data can be mapped to the target value based on the dictionary corresponding to the field.

[0117] By setting the identification information of the dictionary corresponding to the field in the field mapping configuration information, obtaining the dictionary according to the identification information of the dictionary, and mapping the value of the field to the target value according to the dictionary, the conversion of the field value can be achieved, so that the value mapped to the interface data meets the requirements of the interface.

[0118] For example, Fig. 9 FIG. 1 is another schematic diagram of the content of field mapping configuration information provided by an embodiment of the present disclosure. Fig. 9 As shown, in some embodiments, for some fields in the interface, the field mapping configuration information provided by the embodiment of the present disclosure may also include a format conversion formula for the field. In some embodiments, after the value of the field is obtained based on the value path of the field, if the field mapping configuration information is configured with a format conversion formula for the field, the value of the field is format converted based on the format conversion formula to obtain a value in the target format. For example, if the value obtained from the source data is December 11, 24, the value converted based on the format conversion formula can be 12 / 11 / 24. Of course, this is only an example of format conversion, not a sole limitation.

[0119] By configuring the format conversion formula of the field in the field mapping configuration information and converting the format of the field value through the format conversion formula, the value mapped to the interface data can meet the format requirements of the interface for the field value.

[0120] For example, Fig.10FIG. 1 is a schematic diagram of another method for generating interface data provided by an embodiment of the present disclosure. Fig.10 As shown, in some implementations, the field mapping configuration information of the interface can be obtained based on the identifier of the interface to obtain the fields contained in the interface, the positions of the fields in the data format of the interface, and the value path of the fields. And according to the positions of the fields contained in the interface in the data format of the interface, the fields contained in the interface are arranged and combined to generate a template for interface data. By traversing each field in the template, the value of the field is obtained from the source data according to the value path of the field, and then the value of the field is filled into the template to obtain the interface data.

[0121] Among them, when obtaining the value of the field based on the field's value path, if the data type of the field is a string type, the corresponding string can be directly obtained based on the field's value path. If the data type of the field is an array type, each element in the array can be traversed to obtain the value of each element in the array according to the value path of each element.

[0122] Furthermore, after obtaining the value of the field based on the field's value path, data conversion can be performed on the field value. Specifically, when the value of the field is empty, the field value can be set to a default value. When the field mapping configuration information is configured with identification information of the dictionary corresponding to the field, the dictionary corresponding to the field can be obtained according to the identification information of the field, and the field value can be mapped to the target value according to the dictionary. When the field format conversion formula is configured in the field mapping configuration information, the field value can be format converted based on the format conversion formula to obtain data in the target format.

[0123] It should be noted that Fig.10 The implementation method and beneficial effects of the illustrated embodiment can be found in the above Figure 1-Figure 9 The response part in the embodiment will not be described in detail here.

[0124] Fig.11 is a flowchart of another method for generating interface data provided by an embodiment of the present disclosure, such as Fig.11 As shown, the method may exemplarily include steps 110 to 112.

[0125] Step 110: Obtain field mapping configuration information of the bank interface, where the field mapping configuration information includes fields included in the bank interface, positions of the fields in the data format of the bank interface, and value paths of the fields.

[0126] Step 111: Based on the value path of the field, obtain the value of the field from the commodity transaction data.

[0127] Step 112: Generate interface data of the bank interface based on the fields included in the bank interface, as well as the positions and values ​​of the fields.

[0128] Among them, commodity transaction data may include housing transaction data, but is not limited to housing transaction data. Commodity transaction data may include information of traders, the amount of banking transactions handled by traders, etc., but is not limited to the data listed here.

[0129] Fig.11 The implementation manner and beneficial effects of the embodiment can be found in the above method embodiment, which will not be described in detail here.

[0130] Fig.12 is a structural diagram of an interface data generating device provided by an embodiment of the present disclosure, such as Fig.12 As shown, the interface data generating device referred to in the embodiment of the present disclosure can be exemplarily understood as the computer device in the above embodiment or some functional modules in the computer device. Fig.12 As shown, the interface data generating device 1100 includes:

[0131] The first acquisition module 1101 is used to acquire field mapping configuration information of the interface, wherein the field mapping configuration information includes fields included in the interface, positions of the fields in the data format of the interface, and value paths of the fields;

[0132] A second acquisition module 1102 is used to acquire the value of the field based on the value acquisition path of the field;

[0133] The data generating module 1103 is used to generate interface data based on the fields included in the interface, and the positions and values ​​of the fields.

[0134] In some implementations, for at least some of the fields included in the interface, the field mapping configuration information further includes default values ​​of the fields;

[0135] The interface data generating device 1100 may further include:

[0136] A setting module is used for setting the value of each field in the at least part of the fields to a default value in response to the value obtained based on the value path of the field being empty.

[0137] In some implementations, for at least some of the fields included in the interface, the field mapping configuration information further includes identification information of a dictionary corresponding to the field;

[0138] The interface data generating device 1100 may further include:

[0139] A mapping module is used to obtain the dictionary for each field in the at least part of the fields based on identification information of the dictionary corresponding to the field, and map the value of the field to a target value based on the dictionary.

[0140] In some implementations, for at least some of the fields included in the interface, the field mapping configuration information further includes a format conversion formula for the field;

[0141] The interface data generating device 1100 may further include:

[0142] The format conversion module is used to perform format conversion on the value of each field in the at least part of the fields based on the format conversion formula of the field.

[0143] In some implementations, for at least some of the fields included in the interface, the field mapping configuration information further includes a first identification bit of the field, where the first identification bit is used to indicate whether the field is a required field;

[0144] The interface data generating device 1100 may further include:

[0145] a detection module, configured to detect, for any field in the at least some of the fields, a value of the field in the interface data if the first identification bit of the field indicates that the field is a field that must be filled in;

[0146] The alarm module is used to output an alarm message if the value of the field in the interface data is empty.

[0147] In some implementations, the field mapping configuration information further includes information about the data type of the field. For an array type field, the field mapping configuration information includes a value path for each element in the array.

[0148] The second acquisition module 1102 is used to acquire the value of each element in the array type field based on the value path of each element in the array.

[0149] In some implementations, the data generation module 1103 is used to:

[0150] Determining a data format of the interface based on the fields included in the interface and the position of each field;

[0151] For each field in the interface, based on the position of the field, the value of the field is written into the data format to obtain interface data.

[0152] Fig.12 The interface data generating device provided in the embodiment can execute Figure 1-Figure 10 The method of any method embodiment has similar execution methods and beneficial effects, which will not be repeated here.

[0153] In some embodiments, the present disclosure also provides an interface data generating device, which can perform the above Fig.11 The method of the embodiment has similar execution mode and beneficial effects. Specifically, the interface data generating device may exemplarily include:

[0154] An interface configuration acquisition module, used to acquire field mapping configuration information of a bank interface, wherein the field mapping configuration information includes fields included in the bank interface, positions of the fields in the data format of the bank interface, and value paths of the fields;

[0155] A field value acquisition module, used to acquire the value of the field from the commodity transaction data based on the value acquisition path of the field;

[0156] The interface data generating module is used to generate the interface data of the bank interface based on the fields contained in the bank interface, and the positions and values ​​of the fields.

[0157] In some implementations, the commodity transaction data includes housing transaction data.

[0158] It should also be noted that the division of modules in the above-mentioned interface data generating device in the embodiment of the present disclosure is schematic, which is only a logical function division, and there may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules.

[0159] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present disclosure.

[0160] Fig.13 The schematic diagram of the structure of the computer device embodiment provided by the present disclosure embodiment. Fig.13As shown, the computer device includes a memory 121 and a processor 122 .

[0161] The memory 121 is used to store programs. In addition to the above programs, the memory 121 can also be configured to store various other data to support operations on the computer device. Examples of such data include instructions for any application or method operating on the computer device, contact member data, phone book member data, messages, pictures, videos, etc.

[0162] The memory 121 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0163] In some implementations, the processor 122 is coupled to the memory 121 to execute a program stored in the memory 121 to perform the method of any of the above method embodiments.

[0164] Further, if Fig.13 As shown, the computer device may also include: a communication component 123, a power component 124, an audio component 125, a display 126 and other components. Fig.13 Only some components are shown schematically, and it does not mean that the computer equipment only includes Fig.13 Components shown.

[0165] The communication component 123 is configured to facilitate wired or wireless communication between the computer device and other devices. The computer device can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 123 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 123 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared member data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0166] The power supply component 124 provides power to various components of the computer device. The power supply component 124 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the computer device.

[0167] The audio component 125 is configured to output and / or input audio signals. For example, the audio component 125 includes a microphone (MIC), and when the computer device is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 121 or sent via the communication component 123. In some embodiments, the audio component 125 also includes a speaker for outputting audio signals.

[0168] The display 126 includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0169] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the method described in any of the above method embodiments.

[0170] In the embodiments of the present disclosure, the above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO)), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drives (SSDs)), etc.

[0171] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0172] An embodiment of the present disclosure provides a computer program product, including computer program instructions, which can implement the method described in any of the above method embodiments when executed by a processor.

[0173] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0174] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating interface data, characterized in that: The method comprises: Acquire field mapping configuration information of the interface, wherein the field mapping configuration information includes fields included in the interface, positions of the fields in the data format of the interface, and value paths of the fields; Based on the value path of the field, obtain the value of the field; Interface data is generated based on the fields included in the interface, and the positions and values ​​of the fields.

2. The method according to claim 1, characterized in that For at least some of the fields included in the interface, the field mapping configuration information also includes default values ​​of the fields; The method further comprises: For each field in the at least part of the fields, in response to the value obtained based on the value path of the field being empty, the value of the field is set to a default value.

3. The method according to claim 1, characterized in that For at least some of the fields included in the interface, the field mapping configuration information also includes identification information of the dictionary corresponding to the field; After obtaining the value of the field based on the value obtaining path of the field, the method further includes: For each field in the at least part of the fields, the dictionary is obtained based on identification information of the dictionary corresponding to the field, and based on the dictionary, the value of the field is mapped to a target value.

4. The method according to claim 1, characterized in that: For at least some of the fields included in the interface, the field mapping configuration information also includes a format conversion formula for the field; After obtaining the value of the field based on the value obtaining path of the field, the method further includes: For each field in the at least part of the fields, format conversion is performed on the value of the field based on a format conversion formula of the field.

5. The method according to claim 1, characterized in that For at least some of the fields included in the interface, the field mapping configuration information further includes a first identification bit of the field, where the first identification bit is used to indicate whether the field is a required field; After generating the interface data based on the fields included in the interface, and the positions and values ​​of the fields, the method further includes: For any field in the at least some of the fields, if the first identification bit of the field indicates that the field is a field that must be filled in, detecting a value of the field in the interface data; If the value of the field in the interface data is empty, an alarm message is output.

6. The method according to claim 1, characterized in that The field mapping configuration information also includes information about the data type of the field. For an array type field, the field mapping configuration information includes a value path for each element in the array. The obtaining the value of the field based on the value obtaining path of the field includes: For a field of array type, the value of each element in the array is obtained based on the value path of each element in the array.

7. The method according to any one of claims 1 to 6, characterized in that The generating interface data based on the fields included in the interface, and the positions and values ​​of the fields, comprises: Determining a data format of the interface based on the fields included in the interface and the position of each field; For each field in the interface, based on the position of the field, the value of the field is written into the data format to obtain interface data.

8. A method for generating interface data, characterized in that: The method comprises: Acquire field mapping configuration information of a bank interface, wherein the field mapping configuration information includes fields included in the bank interface, positions of the fields in a data format of the bank interface, and value paths of the fields; Based on the value acquisition path of the field, obtaining the value of the field from the commodity transaction data; Based on the fields included in the bank interface, and the positions and values ​​of the fields, interface data of the bank interface are generated.

9. The method according to claim 8, characterized in that The commodity transaction data includes housing transaction data.

10. A computer device, characterized in that: The computer device comprises: Memory; Processor; and Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method as claimed in any one of claims 1-7 or 8-9.

11. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 or 8 to 9 is implemented.

12. A computer program product, comprising computer program instructions, which, when executed by a processor, implement the method according to any one of claims 1-7 or 8-9.