Business data processing method and system of dynamic URL interface and storage medium

Through dynamic mapping and computing models, the business data returned by the dynamic URL interface is solved, and the problem of difficulty in adapting to dynamic changes is achieved. Efficient and accurate business data processing is achieved.

CN119622128APending Publication Date: 2025-03-14ANHUI HANGTIAN INFORMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411734240.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

Traditional business data processing methods rely on static data structures and pre-design computing logic, and are difficult to adapt to changes in business data structures and content returned by dynamic URL interfaces.

Method used

Provide a business data processing method for dynamic URL interface. By obtaining the pending business data returned by dynamic URL interface, performing format analysis and mapping it to the corresponding data structure model, setting a calculation model for calculation, and realizing dynamic mapping terms and calculation results.

Benefits of technology

It realizes automatic matching calculation of dynamic pending service data returned by dynamic URL interface, quickly adapts to changes in interface data structure, improves the efficiency and accuracy of service data processing, and meets complex data processing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622128A_ABST
    Figure CN119622128A_ABST
Patent Text Reader

Abstract

The invention provides a business data processing method and system of a dynamic URL interface and a storage medium, and relates to the technical field of data processing. The method comprises the steps of obtaining to-be-processed service data returned by a dynamic URL interface and performing format analysis to obtain analyzed data; mapping the analysis data to a corresponding data structure model according to the data mapping model, and performing selection processing on the analysis data to obtain at least one group of mapping items; and setting a calculation model, and calculating the mapping item according to the calculation model to obtain a processing result. According to the invention, the problem that the current static data structure and the preset calculation logic cannot adapt to the business data processing of the dynamic URL interface is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a business data processing method, system and storage medium for a dynamic URL interface. Background Art

[0002] With the rapid development of network technology, data interfaces (APIs) have become an important bridge for business data exchange between different systems. In actual applications, these data interfaces are often dynamically adjusted according to business needs, resulting in changes in the structure and content of the returned business data.

[0003] Traditional business data processing methods often rely on static data structures and preset calculation logic, and are difficult to adapt to such dynamic changes.

[0004] Therefore, how to efficiently process the business data returned by the dynamic URL (website) interface and realize automatic matching and formula calculation of data items is an urgent problem to be solved in the current field of business data processing technology. Summary of the invention

[0005] Based on this, it is necessary to provide a business data processing method, system and storage medium for a dynamic URL interface to address the above technical problems, which solves the problem that the current static data structure and preset calculation logic cannot adapt to the business data processing problem of the dynamic URL interface.

[0006] In a first aspect, the present invention provides a method for processing business data of a dynamic URL interface, the method comprising: Get the business data to be processed returned by the dynamic URL interface and parse the format to obtain the parsed data; Mapping the parsed data to a corresponding data structure model according to a data mapping model, and performing selection processing on the parsed data to obtain at least one set of mapping items; A calculation model is set, and the mapping item is calculated according to the calculation model to obtain a processing result.

[0007] Furthermore, the data mapping model includes: business data type, validity period and change time; wherein one business data type corresponds to one or more validity periods.

[0008] Furthermore, the data structure model includes at least a fixed parameter field, an interface type field, a data item name field, and an amount name field.

[0009] Furthermore, a set of mapping items includes multiple mapping layers; wherein each mapping layer includes a fixed parameter, an interface type, a data item name and an amount name.

[0010] Furthermore, a set of mapping items is obtained by: Map the parsed data to a corresponding data structure model, where the interface type field includes all interface types included in the parsed data, the data item name field includes all data item name types included in the parsed data, and the amount name field includes all amount names included in the parsed data; Selecting a target interface type from all interface types, and selecting a data item name and an amount name corresponding to the target interface type from all data item names and all amount names in turn, to obtain a first mapping layer; Different mapping layers are marked with different fixed parameters, and in this way, a set of mapping items is obtained.

[0011] Furthermore, the calculation model includes a calculation result name and a calculation formula set using the fixed parameters; wherein the calculation formula is one or more calculation logics of arithmetic operation, conditional judgment, and loop iteration.

[0012] Furthermore, the data mapping model, the data structure model and the calculation model are set on one or more interfaces through a UI interface or a configuration file.

[0013] Further, mapping the parsed data to a corresponding data structure model includes: One or more query languages ​​among regular expressions, XPath, and JSONPath are used to extract data from the parsed data, and are mapped to the data structure model accordingly.

[0014] In a second aspect, the present invention provides a computer system, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any one of the above methods.

[0015] In a third aspect, the present invention provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of any of the above-mentioned methods when executed by a processor.

[0016] In general, the present invention provides a business data processing method, system and storage medium for a dynamic URL interface, which can achieve the following beneficial effects compared with the prior art: (1) The present invention can obtain dynamic mapping items by dynamically adjusting the data mapping model, data structure model and calculation model, realize automatic matching calculation of dynamic business data to be processed returned by the dynamic URL interface, quickly adapt to changes in the interface data structure, make the business data structure more flexible and changeable, and solve the problem that the current static data structure and preset calculation logic cannot adapt to the business data processing of the dynamic URL interface.

[0017] (2) The present invention improves the efficiency and accuracy of business data processing through automated data item matching and formula calculation, making business data processing more efficient.

[0018] (3) The present invention uses a calculation formula with fixed parameter settings to support a variety of calculation logics, can meet complex data processing requirements, and has wide scalability and strong versatility.

[0019] (4) The present invention can enable users to clearly and conveniently configure data mapping models, data structure models and calculation models through a UI interface or a simple configuration file, making business data processing simpler and more convenient. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 The present invention provides a method flow diagram of a business data processing method, system and storage medium for a dynamic URL interface. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in combination with the drawings and embodiments of the present invention. Obviously, the described embodiments are partial embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0023] It should be noted that, in the description of the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method, step or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such method, step or system. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the method, step or system including the element.

[0024] In order to solve the problem that the current static data structure and preset calculation logic cannot adapt to the business data processing of the dynamic URL interface, the present invention provides a business data processing method, system and storage medium of the dynamic URL interface, such as Figure 1As shown, the specific methods include: Step 101: Obtain the business data to be processed returned by the dynamic URL interface and perform format parsing to obtain parsed data.

[0025] It should be noted that dynamic URL and static URL are two forms of web page addresses. Dynamic URL contains parameters and variables, usually with .aspx, .asp, .jsp, .php, .perl, .cgi, etc. as suffixes; while static URL does not contain these parameters and ends directly with the page file name or folder name.

[0026] Acquiring the business data to be processed may be constructing and sending an HTTP request to a specified dynamic URL interface to request the business data to be processed.

[0027] It should be noted that the business data to be processed may be various types of asset data such as balance sheets, tax statements, cash flow statements, and research and development expenses; the format types of the business data to be processed include various formats such as JSON and XML.

[0028] Format parsing is to parse the format of the business data to be processed into a data format that can be extracted and mapped to the data structure model.

[0029] Step 102: Map the parsed data to the corresponding data structure model according to the data mapping model, and perform selection processing on the parsed data to obtain at least one set of mapping items.

[0030] It should be noted that the data mapping model is used to extract the types of business data and their validity periods in case the requirements for processing business data are different in different time periods.

[0031] As an embodiment, the data mapping model includes: business data type, validity period and change time.

[0032] Through the data mapping model configuration interface, users can dynamically adjust the business data type, validity period and change time. For example, business data types include tax investigation, tax deduction voucher, tax payment business, etc.; validity period refers to the effective start and end time of business data; change time refers to the change time of business data.

[0033] Among them, one type of business data corresponds to one or more validity periods. In other words, different data structure models can be set in different validity periods to support multiple versions.

[0034] It should be noted that when extracting business data, when the extraction time is within the validity period, one type of business data corresponds to one validity period, and the current period time range is directly extracted; when the extraction time is not within the validity period time range, one type of business data corresponds to multiple validity periods, and the validity period closest to the extraction time minus one month is automatically used as the deadline for the current period.

[0035] For example, the tax amount of the passenger transport service tax deduction certificate used for deduction in this period will be first withdrawn on June 2024 and will be valid from June 2024 to June 2029.

[0036] When extracting during the validity period, the expiration date will be automatically calculated when the second period is extracted.

[0037] For example, the validity period of the first withdrawal on June 2024 ends on June 2029. When the next withdrawal is made, it will automatically determine whether the current withdrawal time is within the validity period of the previous period. For example, when the second withdrawal time is August 2024, it means it is within the validity period, then the validity period of the first period will be automatically revised to June 2024~July 2024, and the validity period of the second period will be extracted to August 2024~June 2029. When the third withdrawal time is December 2023, it means it is not within the validity period, then the validity period closest to the withdrawal time minus one month will be automatically used as the deadline of the current period, that is, the validity period of the first period will be automatically revised to June 2023~May 2024, the validity period of the second period will be extracted to June 2024~August 2029, and the validity period of the third period will be extracted to September 2024~August 2029.

[0038] It should be noted that, within each validity period, the parsed data within the current validity period is mapped to the corresponding data structure model in the same manner, and the parsed data is selectively processed.

[0039] In order to improve the accuracy and efficiency of data item matching, as an embodiment, the present invention uses one or more query languages ​​among regular expressions, XPath, and JSONPath to extract data from the parsed data and map it to the data structure model accordingly.

[0040] Through the data structure model configuration interface, users can dynamically adjust the data structure that needs to be mapped, that is, users can dynamically adjust which fields to extract from the parsed data and how to map these fields to the corresponding positions in the data structure model.

[0041] More specifically, users can select different interfaces, as well as the data item names and amount names corresponding to the interfaces. The data structure model includes at least fixed parameter fields, interface type fields, data item name fields, and amount name fields. In other words, according to the configured data structure model, the corresponding data structure is automatically extracted and matched from the current period's business data.

[0042] It should be noted that a group of mapping items includes multiple mapping layers; each mapping layer includes a fixed parameter, an interface type, a data item name and an amount name.

[0043] Fixed parameters can be letters to mark multiple mapping layers.

[0044] As an embodiment, a method of obtaining a set of mapping items includes: S201: Map the parsed data to the corresponding data structure model, where the interface type field includes all interface types included in the parsed data, the data item name field includes all data item name types included in the parsed data, and the amount name field includes all amount names included in the parsed data; For example, interface types may include account balance, balance sheet, account balance R&D expenses; data item name types may include employee salaries payable, termination benefits, employee education funds, financial expenses - fees and commissions, domestic air / train tickets, union funds, communication expenses, etc.; amount names may include credit amounts and debit amounts.

[0045] S202: Select a target interface type from all interface types, and select a data item name and an amount name corresponding to the target interface type from all data item names and all amount names in turn to obtain a first mapping layer; for example, obtain the first mapping layer: fixed parameter-a, interface type-account balance, data item name-employee salary payable termination benefits, amount name-credit amount.

[0046] S203: Different mapping layers are marked with different fixed parameters, and a set of mapping items is obtained in this way. For example, the fixed parameter of the first mapping layer is a, the fixed parameter of the second mapping layer is b, the fixed parameter of the third mapping layer is c, and so on. Different fixed parameters are used to mark different mapping layers.

[0047] In addition, the selective processing of the parsed data may also include: processing multiple data in the parsed data in steps to obtain multiple groups of mapping items. For example, balance sheet processing, account balance processing, other data processing, etc., each type of data can be divided into several groups of mapping items for processing.

[0048] For example, when processing the balance sheet, identify and process data items related to the balance sheet, such as current assets, etc. For the current assets, calculate the asset opening value and the tax amount of the passenger transportation service tax deduction certificate used for deduction in this period. The tax amount of the passenger transportation service tax deduction certificate used for deduction in this period may be a specific calculation or mapping process.

[0049] For example, when processing account balances, the account balances (such as Office Supplies Expense), the opening balance, and the balances of specific accounts (such as Account Balance - Research and Development Expense) are updated.

[0050] For example, when processing other data, other data items are processed as needed, such as data related to network equipment or credit balances.

[0051] Step 103: Set a calculation model, and calculate the mapping items according to the calculation model to obtain a processing result.

[0052] As an embodiment, the calculation model includes a calculation result name and a calculation formula set with fixed parameters.

[0053] The calculation formula is one or more calculation logics in arithmetic operations, conditional judgments, and loop iterations to meet diverse data processing needs.

[0054] For example, the tax amount of the passenger transport service tax deduction certificate used for deduction in this period may be a specific calculation or mapping process, and the calculation formula can be set to a+bc or a / 0.2+bc according to the actual situation.

[0055] If the calculation formula is a / 0.2+bc, after obtaining the pending business data returned by the dynamic URL interface, the mapping items are calculated according to the calculation model, that is, the parsed data is selected and processed, and the corresponding interface name, data item name, and amount name are obtained in sequence, and then the value path of a, b, and c is determined. For example, a corresponds to the interface balance sheet, b corresponds to the interface account balance, and c corresponds to the interface account balance research and development expenses. After selecting the data of the a, b, and c interfaces, they are stored as a / 0.2+bC: .zcfz#@#1 Current liabilities: #@#zcqm, kmye#@#7010000010#@#dffse, yffy#@#7060000050#@#jffse.

[0056] As an embodiment, one validity period may correspond to only one calculation model. For example, if the validity period of one month is divided into three periods, for example, 2024.06~2024.08 is split into 2024.06~2024.06, 2024.07~2024.07, and 2024.08~2024.08, a valid calculation model is set in each period.

[0057] Get the validity period and mapping items, where the interface name of the mapping item corresponds to the table name, the data item name and time correspond to the row, and the amount name corresponds to the column, so as to encapsulate the validity period and a group of mapping items into a mapping object for the calculation model to obtain values. For example, the calculation model a / 0.2+bc is obtained by the above values: a = 2, b=10, c=10, and 2 / 0.2+10-10 =10 is calculated; in this way, the mapping items of July and August are calculated in turn, and finally the same data items are accumulated. For example, you can set another calculation model A+B+C, set June as data item A, July as data item B, and August as data item C, and the final result is the sum of the results of each month from June 2024 to August 2024.

[0058] It should be noted that users can set calculation formulas through the UI interface according to the data items corresponding to fixed parameters and the field amounts of the interface. Therefore, the calculation formula can be dynamically calculated based on the matched data items. In other words, according to the configured calculation formula, the matched data items can be automatically calculated. In addition, calculations can be performed in real time or in batches to adapt to different application scenarios.

[0059] As an embodiment, the data mapping model, data structure model and calculation model can be set in one or more interfaces through the UI interface or configuration file, so that the user can dynamically adjust the data mapping model, data structure model and calculation model through the UI interface or configuration file to adapt to changes in the interface data structure.

[0060] In addition, the method can also store or output the processing results. The processing results can be stored in a database or file system, or output to a front-end interface or report document, so that the processing results can be recorded and traced back to facilitate subsequent data analysis and auditing.

[0061] In a second aspect, the present invention provides a computer system, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any one of the above methods.

[0062] In a third aspect, the present invention provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of any of the above-mentioned methods when executed by a processor.

[0063] The system and storage medium are consistent with the technical solutions of the above method and will not be described in detail here.

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

[0065] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. In the several embodiments provided in this application, it should be understood that the disclosed method or system can be implemented in other ways. For example, the embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0066] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0067] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0068] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

[0069] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0070] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for processing business data of a dynamic URL interface, characterized in that: The method comprises: Get the business data to be processed returned by the dynamic URL interface and parse the format to obtain the parsed data; Mapping the parsed data to a corresponding data structure model according to a data mapping model, and performing selection processing on the parsed data to obtain at least one set of mapping items; A calculation model is set, and the mapping item is calculated according to the calculation model to obtain a processing result.

2. A method for processing business data of a dynamic URL interface according to claim 1, characterized in that: The data mapping model includes: business data type, validity period and change time; wherein one business data type corresponds to one or more validity periods.

3. The method for processing business data of a dynamic URL interface according to claim 1, characterized in that: The data structure model at least includes a fixed parameter field, an interface type field, a data item name field, and an amount name field.

4. A method for processing business data of a dynamic URL interface according to claim 3, characterized in that: A set of mapping items includes multiple mapping layers; each mapping layer includes a fixed parameter, an interface type, a data item name and an amount name.

5. A method for processing business data of a dynamic URL interface according to claim 4, characterized in that: A set of mapping items is obtained by: Map the parsed data to a corresponding data structure model, where the interface type field includes all interface types included in the parsed data, the data item name field includes all data item name types included in the parsed data, and the amount name field includes all amount names included in the parsed data; Selecting a target interface type from all interface types, and selecting a data item name and an amount name corresponding to the target interface type from all data item names and all amount names in turn, to obtain a first mapping layer; Different mapping layers are marked with different fixed parameters, and in this way, a set of mapping items is obtained.

6. A method for processing business data of a dynamic URL interface according to claim 3, characterized in that: The calculation model includes a calculation result name and a calculation formula set using the fixed parameters; wherein the calculation formula is one or more calculation logics of arithmetic operation, conditional judgment, and loop iteration.

7. A method for processing business data of a dynamic URL interface according to claim 6, characterized in that: The data mapping model, the data structure model and the calculation model are set on one or more interfaces through a UI interface or a configuration file.

8. A method for processing business data of a dynamic URL interface according to claim 1, characterized in that: Mapping the parsed data to a corresponding data structure model includes: One or more query languages ​​among regular expressions, XPath, and JSONPath are used to extract data from the parsed data, and are mapped to the data structure model accordingly.

9. A computer system comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.