A method, apparatus and medium for data returning
By pre-configuring the correspondence between request fields and storage fields, as well as system identifiers and data configuration rules, the problems of high code development and maintenance difficulties when external systems access the international settlement system are solved, achieving fast and flexible data return and improved maintenance efficiency.
Patent Information
- Application Number
- CN202211193887.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-09-28
AI Technical Summary
In existing technologies, when external systems connect to international settlement systems, the returned data processing requires modifying the code line by line, resulting in high development workload, time and effort consumption, and difficulty in maintenance. In addition, an additional set of code is required for each external system connected.
By pre-configuring the correspondence between request fields and storage fields, and the correspondence between system identifiers and data configuration rules, target data can be flexibly and quickly read and combined from the international settlement system to generate data to be returned, reducing the workload of code development.
It enables flexible and rapid generation of data to be returned, reducing maintenance costs and development workload, and improving the system's adaptability and maintenance efficiency.
Smart Images

Figure CN115495484B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data access, in particular to a data returning method and device and medium. BACKGROUND
[0002] With the continuous expansion of online business of international trade, more and more external systems need to access the international settlement system for online trade, and obtain return data from the international settlement system by request.
[0003] However, different external systems have different requirements for return data, and different data configuration rules correspond to different external systems. In the existing processing process, return data is directly obtained from each table stored in the international settlement system through code, and when the external system changes or the data configuration rule corresponding to the external system changes, the code needs to be modified line by line. At the same time, with the access of each different external system, a set of code needs to be added accordingly, and the code development amount is extremely high, which is time-consuming and laborious and not easy to maintain. SUMMARY
[0004] The embodiments of the present application provide a data returning method, device and medium, which are used to solve the problem of time-consuming, laborious and not easy to maintain in the external system returning process.
[0005] In a first aspect, a data returning method comprises:
[0006] In response to the received first data request information, determining a first system identifier and a first request field corresponding to the first data request information;
[0007] Based on the pre-configured correspondence between the request field and the storage field, determining at least one first storage field corresponding to the first request field in the target table;
[0008] Based on the pre-configured correspondence between the system identifier and the data configuration rule, determining a target data configuration rule corresponding to the first system identifier;
[0009] Reading the first target data from the at least one first storage field, combining the first target data according to the target data configuration rule to obtain first target data to be returned, and returning the first target data to be returned to the external system sending the first data request information.
[0010] In the embodiments of the present application, in response to the received first data request information, the first system identifier and the first request field corresponding to the first data request information are determined, the at least one first storage field corresponding to the first request field in the target table is determined based on the pre-configured correspondence between the request field and the storage field, the target data configuration rule corresponding to the first system identifier is determined based on the pre-configured correspondence between the system identifier and the data configuration rule, the first target data is read from the at least one first storage field, the first target data is combined according to the target data configuration rule to obtain the first target to-be-returned data, and the first target to-be-returned data is returned to the external system sending the first data request information. Through the above-mentioned manner, the field in the stored data table can be flexibly and quickly locked, and the to-be-returned data can be generated in combination with the corresponding data configuration rule, thereby reducing the workload of code development and reducing the maintenance cost.
[0011] In a possible embodiment, after determining the first system identifier and the first request field corresponding to the first data request information in response to the received first data request information, the method further includes:
[0012] In response to the received second data request information, the second system identifier and the second request field corresponding to the second data request information are determined.
[0013] If the second system identifier is the same as the first system identifier, the second target data is determined based on the second request field, and the new first target to-be-returned data is obtained based on the first target to-be-returned data and the second target data.
[0014] If the second system identifier is different from the first system identifier, the second target to-be-returned data is determined based on the second request field, and the second target to-be-returned data is returned to the external system sending the second data request information.
[0015] In a possible embodiment, the second target data is determined based on the second request field, and the new first target to-be-returned data is obtained based on the first target to-be-returned data and the second target data, including:
[0016] The at least one second storage field corresponding to the second request field in the target table is determined based on the pre-configured correspondence between the request field and the storage field.
[0017] The second target data is read from the at least one second storage field.
[0018] The second target data is combined according to the target data configuration rule to obtain the alternative target to-be-returned data; and
[0019] The first target to-be-returned data and the alternative target to-be-returned data are spliced to obtain the new first target to-be-returned data.
[0020] In a possible embodiment, if the second system identifier is different from the first system identifier, the second target data to be returned is determined based on the second request field, including:
[0021] Based on the pre-configured correspondence between the system identifier and the data configuration rule, the second target data configuration rule corresponding to the second system identifier is determined;
[0022] Based on the pre-configured correspondence between the request field and the storage field, the at least one second target storage field corresponding to the second request field in the target table is determined;
[0023] The second target storage data is read from the at least one second target storage field, and the second target storage data is combined according to the second target data configuration rule to obtain the second target data to be returned.
[0024] In a possible embodiment, the correspondence between the request field and the storage field is pre-configured in the following manner:
[0025] The pre-set bitmap field is associated with the pre-set request field, wherein each bitmap field includes a completed state bit or an incomplete state bit;
[0026] Obtain each table stored in the database and the storage field in each table;
[0027] Establish the correspondence between the request field and each storage field.
[0028] In a possible embodiment, before the first target data to be returned is returned to the external system sending the first data request information, the method further includes:
[0029] Determine the bitmap field corresponding to the first target data to be returned, and obtain the state bit included in the bitmap field;
[0030] If the state bit is a completed state bit, the first target data to be returned is returned to the external system sending the first data request information;
[0031] If the state bit is an incomplete state bit, the state bit included in the bitmap field is re-obtained according to a pre-set interval.
[0032] In a second aspect, the application provides a data returning apparatus, including:
[0033] A response unit, configured to determine the first system identifier and the first request field corresponding to the received first data request information in response;
[0034] A field determination unit, configured to determine the at least one first storage field corresponding to the first request field in the target table based on the pre-configured correspondence between the request field and the storage field.
[0035] a rule determining unit, configured to determine a target data configuration rule corresponding to the first system identifier based on a preconfigured correspondence between system identifiers and data configuration rules;
[0036] a returning unit, configured to read the first target data from the at least one first storage field, combine the first target data according to the target data configuration rule to obtain first target to-be-returned data, and return the first target to-be-returned data to the external system that sends the first data request information.
[0037] In a possible embodiment, in response to receiving the first data request information and determining the first system identifier and the first request field corresponding to the first data request information, the apparatus further includes:
[0038] in response to receiving the second data request information, determine a second system identifier and a second request field corresponding to the second data request information;
[0039] if the second system identifier is the same as the first system identifier, determine second target data based on the second request field, and obtain new first target to-be-returned data based on the first target to-be-returned data and the second target data;
[0040] if the second system identifier is different from the first system identifier, determine second target to-be-returned data based on the second request field, and return the second target to-be-returned data to the external system that sends the second data request information.
[0041] In a possible embodiment, in response to determining the second target data based on the second request field and obtaining new first target to-be-returned data based on the first target to-be-returned data and the second target data, the apparatus includes:
[0042] determine at least one second storage field corresponding to the second request field in the target table based on a preconfigured correspondence between request fields and storage fields;
[0043] read the second target data from the at least one second storage field;
[0044] combine the second target data according to the target data configuration rule to obtain alternative target to-be-returned data; and
[0045] splice the first target to-be-returned data and the alternative target to-be-returned data to obtain new first target to-be-returned data.
[0046] In a possible embodiment, in response to determining the second target to-be-returned data based on the second request field when the second system identifier is different from the first system identifier, the apparatus includes:
[0047] determine a second target data configuration rule corresponding to the second system identifier based on a preconfigured correspondence between system identifiers and data configuration rules;
[0048] determine at least one second target storage field corresponding to the second request field in the target table based on a preconfigured correspondence between request fields and storage fields;
[0049] read second target storage data from the at least one second target storage field, and combine the second target storage data according to the second target data configuration rule to obtain second target data to be returned.
[0050] In a possible implementation, the correspondence between the request fields and the storage fields is preconfigured in the following manner:
[0051] associate a preconfigured bitmap field with a preconfigured request field, wherein each bitmap field includes a completed status bit or an uncompleted status bit;
[0052] obtain each table stored in the database and each storage field in each table;
[0053] establish a correspondence between the request field and each storage field.
[0054] In a possible implementation, before the first target data to be returned is returned to the external system that sends the first data request information, the apparatus further includes:
[0055] determine a bitmap field corresponding to the first target data to be returned, and obtain a status bit included in the bitmap field;
[0056] if the status bit is a completed status bit, return the first target data to be returned to the external system that sends the first data request information;
[0057] if the status bit is an uncompleted status bit, re-obtain the status bit included in the bitmap field at a preset interval.
[0058] In a third aspect, the present application provides an electronic device, including:
[0059] a memory configured to store program instructions;
[0060] a processor configured to invoke the program instructions stored in the memory, and perform steps included in the method according to the obtained program instructions.
[0061] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program including program instructions, and the program instructions, when executed by a computer, cause the computer to perform the method according to any one of the first aspect.
[0062] In a fifth aspect, the present application provides a computer program product, comprising computer program codes, which, when running on a computer, cause the computer to perform the method of any one of the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0063] Figure 1 A use scenario diagram of data returning provided for an embodiment of the present application;
[0064] Figure 2 A flowchart of a data returning method provided for an embodiment of the present application;
[0065] Figure 3 A flowchart of responding to and processing second data request information provided for an embodiment of the present application;
[0066] Figure 4 A flowchart of obtaining new first target data to be returned based on the first target data to be returned and second target data provided for an embodiment of the present application;
[0067] Figure 5 A flowchart of determining second target data to be returned based on a second request field provided for an embodiment of the present application;
[0068] Figure 6 A structural diagram of a data returning apparatus provided for an embodiment of the present application;
[0069] Figure 7 A structural diagram of an electronic device provided for an embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application. In the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other at will. Moreover, although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
[0071] The terms "first" and "second" in the specification and claims of the present application and the above drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product or device. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
[0072] In the technical solution of the present application, the collection, transmission and use of data comply with the requirements of relevant national laws and regulations.
[0073] Before introducing the data returning method provided by the embodiments of the present application, in order to facilitate understanding, first, the technical background of the embodiments of the present application is introduced in detail.
[0074] When an external system accesses the international settlement system and requests to obtain returning data from the international settlement system, since different external systems have different requirements for returning data, and the data configuration rules corresponding to different external systems are also different. In the existing processing process, the returning data is directly obtained from each table stored in the international settlement system through code. When the external system changes or when the data configuration rule corresponding to the external system changes, the code needs to be modified line by line. At the same time, with the access of each different external system, a set of code needs to be added accordingly, which is extremely high in code development, time-consuming and laborious, and difficult to maintain.
[0075] In order to solve the problem of time-consuming and laborious maintenance of the external system returning number, the preferred embodiments of the present application are described in detail below in combination with the drawings.
[0076] Referring to Figure 1 In the embodiments of the present application, the external system (for example, external connection platform A, external connection platform B, or external connection platform N) sends data request information to the server (for example, the server of the international settlement system 1), the server processes the above data request information, and returns the target data to be returned to the external system.
[0077] It should be noted that the external system in the embodiments of the present application can be multiple, and the execution subject is one server. In the implementation process, the server can process the data request information sent by one or more external systems respectively, which will be described in detail below.
[0078] Referring to Figure 2 In the embodiments of the present application, the specific process of the data returning method is as follows:
[0079] Step 201: in response to the received first data request information, determining the first system identifier and the first request field corresponding to the first data request information.
[0080] In view of the fact that there can be multiple external systems sending data request information to the server, in the implementation process, the external system sending the first data request information is taken as an example to be described in detail. After the external system sends the first data request information to the server, the server receives and responds to the first data request information. Specifically, the first data request information is parsed to determine the first system identifier and the first request field corresponding to the first data request information.
[0081] For example, the first data request information is XXXXXXX, the first system identifier corresponding to the first data request information is determined to be aa, and the first request field is name.
[0082] Step 202: based on the pre-configured correspondence between the request field and the storage field, determining at least one first storage field corresponding to the first request field in the target table.
[0083] The establishment process of the correspondence between the request field and the storage field will be described first. The correspondence between the request field and the storage field is pre-configured in the following manner:
[0084] (1) associate the pre-set bitmap field with the pre-set request field, wherein each bitmap field includes a completed status bit or an incomplete status bit.
[0085] In order to distinguish between various external systems and monitor the running status of different external systems, a bitmap field is pre-set in the implementation process of the present application, for example, a 10-bit bitmap field is set, each bitmap field is used to represent an external system. Generally, an external system is represented by a system identifier. Assuming that the 0th bitmap field represents external system aa, the 0th bitmap field is written into the system identifier aa of external system aa, the 1st bitmap field represents external system bb, and the 1st bitmap field is written into the system identifier bb of external system bb, and so on.
[0086] In order to uniformly identify the request fields requested by different external systems, the request field is pre-set in the embodiment of the present application, for example, the request field "name" of external system aa and the request field "name" of external system bb are associated with the request field name. In this way, when external system aa requests the field "name" and external system bb requests the field "name", the same data can be sent to external system aa and external system bb after calling the corresponding stored name field.
[0087] In addition, considering that the data involved in the return processing is relatively large, batch processing is usually used to process the data of completed services. For example, after the settlement service 1 is completed, the corresponding status bit in the bitmap field is set to the completed state. In this case, the target data corresponding to the data request information can be returned to the external system. When the corresponding status bit in the bitmap field is set to the uncompleted state, the corresponding target data is not allowed to be returned to the external system.
[0088] (2) Obtain each table stored in the database and each storage field in the table.
[0089] After the request field is configured, each table stored in the database connected to the server is further obtained, such as the settlement service sub-table and the settlement service summary table. Since at least one storage field is stored in different tables, the value of the storage field in each table is further obtained, which is the target data that needs to be returned to the external system.
[0090] (3) Establish the correspondence between the request field and each storage field.
[0091] In the implementation process, after the request field and the storage field are determined, the request field and each storage field need to be one-to-one corresponding. For example, the request field "name" of the external system aa and the request field "name" of the external system bb are both corresponding to the storage field name, the request field "age" of the external system aa and the request field "age" of the external system bb are both corresponding to the storage field age, and so on. The correspondence between the request field and each storage field is established.
[0092] Step 203: Determine the target data configuration rule corresponding to the first system identifier based on the pre-configured correspondence between the system identifier and the data configuration rule.
[0093] Considering that the data configuration rules corresponding to different external systems are different, for example, the data configuration rule of the external system aa is XXX, and the data configuration rule of the external system bb is YYY. In order to quickly return the target data to be returned to the external system, the system identifier and the data configuration rule are one-to-one corresponding, that is, after obtaining the data configuration rule XXX of the external system aa, the data configuration rule XXX is corresponding to the system identifier aa of the external system aa, and after obtaining the data configuration rule YYY of the external system bb, the data configuration rule YYY is corresponding to the system identifier bb of the external system bb. In this way, the correspondence between the system identifier and the data configuration rule is established in advance.
[0094] In the implementation process, after the first system identifier is determined according to the first data request information, the target data configuration rule corresponding to the first system identifier is determined according to the correspondence between the system identifier and the data configuration rule.
[0095] Step 204: reading the first target data from the at least one first storage field, combining the first target data according to the target data configuration rule to obtain the first target data to be returned, and returning the first target data to be returned to the external system sending the first data request information.
[0096] In the implementation process, after the at least one first storage field corresponding to the first request field in the target table is determined, the first target data in the target table stored in the at least one first storage field is read, for example, the first storage field is name, the first target data read out is Zhang San; the first storage field is age, the first target data read out is 25 years old, and the target data configuration rule is to return the age after the name. In the implementation process, the first target data is combined according to the target data configuration rule, that is, the first target data to be returned is "Zhang San 25 years old", and further, the first target data to be returned "Zhang San 25 years old" is returned to the external system sending the first data request information.
[0097] It should be noted that before the first target data to be returned is returned to the external system sending the first data request information, it further includes:
[0098] 1) determining the bitmap field corresponding to the first target data to be returned, and obtaining the state bit included in the bitmap field.
[0099] In order to ensure the integrity of the target data to be returned, in the implementation process, after the first target data to be returned is determined, the bitmap field corresponding to the first target data to be returned is further determined, and the state bit included in the bitmap field is obtained.
[0100] 2) if the state bit is a completed state bit, the first target data to be returned is returned to the external system sending the first data request information.
[0101] The first case: when the state bit in the bitmap field is a completed state bit, it means that the corresponding first target data to be returned is complete data after the business is completed. When the first target data to be returned is a data set, it means that each data in the entire data set is complete data. In this case, the first target data to be returned is returned to the external system sending the first data request information.
[0102] 3) if the state bit is an incomplete state bit, the state bit included in the bitmap field is re-obtained according to the preset interval.
[0103] The second case: when the state bit in the bitmap field is an uncompleted state bit, it means that the first target data to be returned is not the complete data after the service is completed. When the first target data to be returned is a data set, it means that not all data in the data set is complete data. In this case, the first target data to be returned is not allowed to be returned to the external system sending the first data request information, and the state bit included in the bitmap field is re-acquired according to a preset interval (for example, 2 minutes) until the state bit is a completed state bit.
[0104] In addition, it should be noted that, in response to the received first data request information, the first system identifier and the first request field corresponding to the first data request information are determined, and then Figure 3
[0105] Step 301: In response to the received second data request information, the second system identifier and the second request field corresponding to the second data request information are determined.
[0106] Since the same external system may send multiple data request information, and different external systems may send different data request information, in the implementation process, after receiving the second data request information, the second data request information is responded to, and the second system identifier and the second request field corresponding to the second data request information are further determined. The determination process is similar to that of the first system identifier and the first request field, which will not be described here.
[0107] Step 302: If the second system identifier is the same as the first system identifier, the second target data is determined based on the second request field, and the new first target data to be returned is obtained based on the first target data to be returned and the second target data.
[0108] In the implementation process, if the second system identifier is the same as the first system identifier, it means that the external system sending the second data request information is the same as the external system sending the first data request information.
[0109] The second target data is determined based on the second request field, and the new first target data to be returned is obtained based on the first target data to be returned and the second target data, as shown in Figure 4
[0110] Step 3021: Based on the correspondence between the pre-configured request field and the storage field, at least one second storage field corresponding to the second request field in the target table is determined.
[0111] Similarly, after the second request field is determined, at least one second storage field corresponding to the second request field in the target table is determined according to the correspondence between the preconfigured request field and the storage field, for example, the second request field corresponding to the second data request information sent by the external system aa is the place of origin, and at least one second storage field corresponding to the second request field place of origin in the target table is determined to be the place of residence according to the correspondence between the preconfigured request field and the storage field.
[0112] Step 3022: reading the second target data from the at least one second storage field.
[0113] After the at least one second storage field is determined, the second target data is read from the second storage field. For example, the corresponding second storage field in the target table is the place of residence, that is, the second target data is assigned to Hebei.
[0114] Step 3023: combining the second target data according to the target data configuration rule to obtain the alternative target to be returned data; and
[0115] Since the external system sending the second data request information and the external system sending the first data request information are the same external system, the target data configuration rule is the target data configuration rule corresponding to the first data request information, and in the implementation process, the second target data is combined according to the target data configuration rule to obtain the alternative target to be returned data.
[0116] It should be noted that generally, the target data configuration rule includes the data configuration rule corresponding to all request fields, and after the first target data or the second target data is obtained, the configuration item corresponding to the first target data and the configuration item corresponding to the second target data can be found in the target data configuration rule.
[0117] Step 3024: splicing the first target to be returned data and the alternative target to be returned data to obtain new first target to be returned data.
[0118] After the first target to be returned data and the alternative target to be returned data are obtained, the first target to be returned data and the alternative target to be returned data are spliced, and the specific splicing manner can refer to the target data configuration rule, so as to obtain new first target to be returned data. The above method of splicing the new first target to be returned data on the basis of the original first target to be returned data can quickly and accurately return the target to be returned data corresponding to the second data request information to the external system.
[0119] Step 303: if the second system identifier is different from the first system identifier, determining the second target to be returned data based on the second request field, and returning the second target to be returned data to the external system sending the second data request information.
[0120] In the implementation process, if the second system identifier is different from the first system identifier, it means that the external system sending the second data request information is not the same external system as the external system sending the first data request information.
[0121] If the second system identifier is different from the first system identifier, the second target data to be returned is determined based on the second request field, refer to Figure 5 As shown, comprising:
[0122] Step 3031: Based on the pre-configured correspondence between the system identifier and the data configuration rule, determine the second target data configuration rule corresponding to the second system identifier.
[0123] Since the external system sending the second data request information is not the same external system as the external system sending the first data request information, the target data configuration rule will also be different. In the implementation process, according to the pre-configured correspondence between the system identifier and the data configuration rule, the second target data configuration rule corresponding to the second system identifier is determined. The acquisition process is similar to the first target data configuration rule, and will not be repeated here.
[0124] Step 3032: Based on the pre-configured correspondence between the request field and the storage field, determine at least one second target storage field corresponding to the second request field in the target table.
[0125] After determining the second request field, according to the pre-configured correspondence between the request field and the storage field, at least one second storage field corresponding to the second request field in the target table is determined, for example, the second request field corresponding to the second data request information sent by the external system bb is gender, and according to the pre-configured correspondence between the request field and the storage field, at least one second storage field corresponding to the second request field gender in the target table is determined. The second storage field is gender.
[0126] Step 3033: Read the second target storage data from at least one second target storage field, and combine the second target storage data according to the second target data configuration rule to obtain the second target data to be returned.
[0127] After determining that the at least one second storage field is gender, the second target data is read from the second storage field. For example, the corresponding second storage field gender in the target table is male, that is, the second target data is assigned as male.
[0128] After the second target data to be returned is obtained, the second target data to be returned is returned to the external system sending the second data request information. Since the correspondence between the request fields and the storage fields, the correspondence between the system identifiers and the data configuration rules, and the like are pre-configured in the implementation process, the second target data to be returned can be quickly and flexibly obtained.
[0129] Based on the same inventive concept, an apparatus for returning data is provided. As shown in Figure 6 The apparatus includes:
[0130] The response unit 601 is configured to respond to the received first data request information, and determine a first system identifier and a first request field corresponding to the first data request information.
[0131] The field determination unit 602 is configured to determine at least one first storage field corresponding to the first request field in a target table based on a pre-configured correspondence between the request fields and the storage fields.
[0132] The rule determination unit 603 is configured to determine a target data configuration rule corresponding to the first system identifier based on a pre-configured correspondence between the system identifiers and the data configuration rules.
[0133] The return unit 604 is configured to read first target data from the at least one first storage field, combine the first target data according to the target data configuration rule to obtain first target data to be returned, and return the first target data to be returned to an external system sending the first data request information.
[0134] In a possible embodiment, after the first system identifier and the first request field corresponding to the received first data request information are determined, the apparatus further includes:
[0135] The response unit 601 is configured to respond to the received first data request information, and determine a first system identifier and a first request field corresponding to the first data request information.
[0136] If the second system identifier is the same as the first system identifier, the second target data is determined based on the second request field, and new first target data to be returned is obtained based on the first target data to be returned and the second target data.
[0137] If the second system identifier is different from the first system identifier, the second target data to be returned is determined based on the second request field, and the second target data to be returned is returned to the external system sending the second data request information.
[0138] In a possible embodiment, the second target data is determined based on the second request field, and new first target data to be returned is obtained based on the first target data to be returned and the second target data, including:
[0139] determining at least one second storage field corresponding to the second request field in the target table based on the correspondence between the preconfigured request fields and storage fields;
[0140] reading second target data from the at least one second storage field;
[0141] combining the second target data according to the target data configuration rule to obtain candidate target data to be returned; and
[0142] splicing the first target data to be returned and the candidate target data to be returned to obtain new first target data to be returned.
[0143] In a possible embodiment, if the second system identifier is different from the first system identifier, the second target data to be returned is determined based on the second request field, including:
[0144] determining a second target data configuration rule corresponding to the second system identifier based on the correspondence between the preconfigured system identifiers and data configuration rules;
[0145] determining at least one second target storage field corresponding to the second request field in the target table based on the correspondence between the preconfigured request fields and storage fields;
[0146] reading second target storage data from the at least one second target storage field, and combining the second target storage data according to the second target data configuration rule to obtain second target data to be returned.
[0147] In a possible embodiment, the correspondence between the request fields and the storage fields is preconfigured in the following manner:
[0148] associating a preconfigured bitmap field with a preconfigured request field, wherein each bitmap field includes a completed state bit or an incomplete state bit;
[0149] obtaining each table stored in the database and each storage field in the table;
[0150] establishing a correspondence between the request fields and each storage field.
[0151] In a possible embodiment, before the first target data to be returned is returned to the external system that sends the first data request information, the method further includes:
[0152] determining a bitmap field corresponding to the first target data to be returned, and obtaining a state bit included in the bitmap field;
[0153] if the state bit is a completed state bit, the first target data to be returned is returned to the external system that sends the first data request information.
[0154] If the status bit is an uncompleted status bit, the status bit included in the bitmap field is re-acquired according to a preset interval.
[0155] Based on the same inventive concept, an electronic device is provided, which can implement the function of the data returning discussed above, and the device is shown in Figure 7 The device includes a processor 701 and a memory 702, where the memory 702 stores program code, and when the program code is executed by the processor, the processor 701 performs the steps of the data returning method according to various exemplary embodiments of the present application described above in the specification.
[0156] Based on the same inventive concept, a computer readable storage medium is provided, and the computer program product includes computer program code, which, when running on a computer, causes the computer to perform the data returning method of any one of the above. Since the principle of solving the problem of the above computer readable storage medium is similar to the data returning method, the implementation of the above computer readable storage medium can be referred to the implementation of the method, and the repeated parts will not be described.
[0157] Based on the same inventive concept, the present application further provides a computer program product, which includes computer program code, and when the computer program code runs on a computer, the computer performs the data returning method of any one of the above. Since the principle of solving the problem of the above computer program product is similar to the data returning method, the implementation of the above computer program product can be referred to the implementation of the method, and the repeated parts will not be described.
[0158] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0159] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0160] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0161] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0162] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. A method of data return, characterized by, The application is applied to a server, comprising: In response to a received first data request information, determining a first system identifier and a first request field corresponding to the first data request information, and in response to a received second data request information, determining a second system identifier and a second request field corresponding to the second data request information; Based on a pre-configured correspondence between the request field and the storage field, determining at least one first storage field corresponding to the first request field in a target table, wherein the correspondence between the request field and the storage field is pre-configured by the following way: associating a pre-set bitmap field with a pre-set request field, wherein each bitmap field includes a completed state bit or an incomplete state bit, obtaining each table stored in a database and the storage field in the each table, establishing the correspondence between the request field and the each storage field, and each bitmap field is used to represent an external system, and the data of the completed business is uniformly processed in a batch processing manner; Based on a pre-configured correspondence between the system identifier and the data configuration rule, determining a target data configuration rule corresponding to the first system identifier; Reading first target data from at least one first storage field, combining the first target data according to the target data configuration rule to obtain first target data to be returned, and returning the first target data to be returned to an external system sending the first data request information, if the second system identifier is the same as the first system identifier, determining second target data based on the second request field, and obtaining new first target data to be returned based on the first target data to be returned and the second target data, if the second system identifier is different from the first system identifier, determining second target data to be returned based on the second request field, and returning the second target data to be returned to an external system sending the second data request information.
2. The method of claim 1, wherein, The method comprises: Based on a pre-configured correspondence between the request field and the storage field, determining at least one second storage field corresponding to the second request field in a target table; Reading second target data from at least one second storage field; Combining the second target data according to the target data configuration rule to obtain alternative target data to be returned; and Splicing the first target data to be returned and the alternative target data to be returned to obtain the new first target data to be returned.
3. The method of claim 1, wherein, The method comprises: Based on a pre-configured correspondence between the system identifier and the data configuration rule, determining a second target data configuration rule corresponding to the second system identifier; Based on a pre-configured correspondence between the request field and the storage field, determining at least one second target storage field corresponding to the second request field in a target table; reading second target storage data from at least one of the second target storage fields, and combining the second target storage data according to the second target data configuration rule to obtain the second target data to be returned.
4. The method of claim 3, wherein, Before the first target data to be returned is returned to the external system sending the first data request information, the method further comprises: determining the bitmap field corresponding to the first target data to be returned, and obtaining the state bit included in the bitmap field; if the state bit is a completed state bit, returning the first target data to be returned to the external system sending the first data request information; if the state bit is an incomplete state bit, re-obtaining the state bit included in the bitmap field according to a preset interval.
5. An apparatus for data return, characterized by Comprise: a response unit, configured to determine a first system identifier and a first request field corresponding to the first data request information in response to the received first data request information, and determine a second system identifier and a second request field corresponding to the second data request information in response to the received second data request information; a field determination unit, configured to determine at least one first storage field corresponding to the first request field in a target table based on a preconfigured correspondence between a request field and a storage field, wherein the correspondence between the request field and the storage field is preconfigured in the following manner: associating a preconfigured bitmap field with a preconfigured request field, wherein each bitmap field includes a completed state bit or an incomplete state bit, obtaining each table stored in a database and a storage field in the each table, establishing a correspondence between the request field and each storage field, and each bitmap field is used to represent an external system, and data of a completed business is uniformly processed in a batch processing manner; a rule determination unit, configured to determine a target data configuration rule corresponding to the first system identifier based on a preconfigured correspondence between a system identifier and a data configuration rule; a return unit, configured to read first target data from at least one of the first storage fields, combine the first target data according to the target data configuration rule to obtain first target data to be returned, and return the first target data to be returned to the external system sending the first data request information, if the second system identifier is the same as the first system identifier, determine second target data based on the second request field, and obtain new first target data to be returned based on the first target data to be returned and the second target data, if the second system identifier is different from the first system identifier, determine second target data to be returned based on the second request field, and return the second target data to be returned to the external system sending the second data request information.
6. An electronic device, comprising: Comprise: a memory, configured to store program instructions; a processor, configured to invoke the program instructions stored in the memory, and perform the steps included in the method according to the obtained program instructions. Any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method of any one of claims 1-4.
8. A computer program product, characterised in that, The computer program product comprises computer program code which, when run on a computer, causes the computer to perform the above method of any one of claims 1-4.
Citation Information
Patent Citations
Incremental data processing method and device, computer equipment and computer storage medium
CN108681590A
Data processing method, device and equipment and computer readable storage medium
CN111651494A