A data processing method and apparatus

By generating identifiers and searching paths for data mapping, the problem of unknown errors in complex parameter scenarios of the AtlasMap open-source framework is solved, and efficient data docking and structure restoration are achieved.

CN117130990BActive Publication Date: 2026-06-16BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
Filing Date
2023-09-06
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing technologies are prone to unknown errors when using the AtlasMap open-source framework for data mapping in complex parameter scenarios, resulting in low data integration efficiency and increased server resource consumption, and failing to effectively handle parameter inconsistencies.

Method used

By acquiring business data, parsing the input parameter file and mapping code, generating identifiers and splitting them into strings, determining the search path for mapping processing, and organizing the output parameter file after mapping, accurate parameter matching and conversion are achieved.

Benefits of technology

It achieves efficient parameter matching and mapping processing in complex parameter scenarios, improves data docking efficiency, eliminates multi-level data structures, and ensures accurate data structure restoration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117130990B_ABST
    Figure CN117130990B_ABST
Patent Text Reader

Abstract

The application discloses a kind of data processing method and device, it is related to computer technical field.The specific embodiment of the method includes obtaining service data, parsing and obtaining corresponding parameter-in file and mapping code, and calling the mapping file corresponding to mapping code;Select object and array as target data in parameter-in file, and to the element of each target data: corresponding identifier is generated with and the element splicing, obtain corresponding string;With each target data is split into corresponding multiple strings;Determine the search path corresponding to each string in the parameter-in file, query the corresponding mapping result in the mapping file according to the search path, to carry out mapping processing to each string;Identify identifier in the parameter-in file after mapping processing, and according to the identification result, the parameter-in file after mapping processing is arranged, obtains parameter-out file.Therefore, the embodiment of the application can solve the technical problem of low efficiency of data docking between existing multiple platforms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a data processing method and apparatus. Background Technology

[0002] Currently, data mapping processing is widely used to facilitate the flow and connection of the same set of business data between different business groups, thereby laying the foundation for a data system that facilitates cooperation mechanisms between multiple business entities.

[0003] In the process of realizing this invention, the inventors discovered at least the following problems in the prior art:

[0004] Existing technologies use the AtlasMap open-source framework to configure data mapping protocols between different processing ends and perform corresponding data mapping processing on the acquired interface data. However, in scenarios with complex parameters, such as when the preset parameter names, parameter types, parameter structures, and number of parameters of the two processing ends are inconsistent, the AtlasMap open-source framework may encounter errors for unknown reasons, such as data file serialization anomalies, which will have a significant negative impact on data interface efficiency and server resource consumption. Therefore, a data processing method that can accurately match and transform parameters in complex parameter scenarios and can successfully call multiple existing data mapping protocols is urgently needed. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a data processing method and apparatus that can solve the technical problem of low efficiency in data interoperability between existing multi-platform systems.

[0006] To achieve the above objectives, according to one aspect of the present invention, a data processing method is provided, comprising: acquiring business data; parsing to obtain a corresponding input parameter file and mapping code; retrieving the mapping file corresponding to the mapping code; selecting objects and arrays as target data in the input parameter file; and for each element of the target data: generating a corresponding identifier and concatenating it with the element to obtain a corresponding string; splitting each target data into multiple corresponding strings; determining the search path corresponding to each string in the input parameter file; querying the corresponding mapping result in the mapping file according to the search path to perform mapping processing on each string; identifying the identifier in the mapped input parameter file; and organizing the mapped input parameter file according to the corresponding identification result to obtain an output parameter file.

[0007] Optionally, business data is obtained and parsed to obtain the corresponding input parameter file and mapping code, including:

[0008] The acquired business data is compressed to obtain a compressed file, and the compressed file is read using a specified script function to generate an input parameter file in the corresponding script format;

[0009] The business data is parsed to obtain the corresponding input parameter code and output parameter code, and the input parameter code and output parameter code are merged to obtain the mapping code.

[0010] Optionally, a corresponding identifier is generated, including:

[0011] Determine the name of the target data to which this element belongs;

[0012] Determine if the target data to which this element belongs is an array.

[0013] If so, then the preset array concatenation code and the name are concatenated to form the corresponding identifier;

[0014] If not, then the preset object concatenation code and the name are concatenated to obtain the corresponding identifier.

[0015] Optionally, before selecting objects and arrays as target data in the input parameter file, the following steps are included:

[0016] For each string in the input parameter file: concatenate the string using a preset string concatenation code.

[0017] Optionally, determine the search path corresponding to each string in the input parameter file, including:

[0018] Read the preset splitter, locate the splitter in each string, and extract the substring in each string that is before the splitter as the corresponding search path.

[0019] Optionally, each string is mapped, including:

[0020] The splitter is located in each string to map the substrings in each string that are preceding the splitter to the corresponding mapping result.

[0021] Optionally, identifiers are identified in the mapped input parameter file, and the mapped input parameter file is organized according to the corresponding identification results, including:

[0022] For each string in the input parameter file after mapping: locate the array concatenation code, object concatenation code, or string concatenation code, and read the substring between the first character of the string and the last character of the location result as the identifier corresponding to the string;

[0023] To determine the identifier corresponding to each string;

[0024] For each identifier, query the corresponding merging rule and filter to obtain multiple corresponding strings, and then merge the multiple strings according to the merging rule;

[0025] Remove the corresponding identifier from each merged string.

[0026] In addition, the present invention also provides a data processing device, including an acquisition module for acquiring business data, parsing to obtain the corresponding input parameter file and mapping code, and retrieving the corresponding mapping file of the mapping code; a tiling module for selecting objects and arrays as target data in the input parameter file, and for each element of each target data: generating a corresponding identifier and concatenating it with the element to obtain the corresponding string; thereby splitting each target data into multiple corresponding strings; a mapping module for determining the search path corresponding to each string in the input parameter file, querying the corresponding mapping result in the mapping file according to the search path, and performing mapping processing on each string; and a folding module for identifying identifiers in the input parameter file after mapping processing, and organizing the input parameter file after mapping processing according to the corresponding identification result to obtain an output parameter file.

[0027] One embodiment of the above invention has the following advantages or beneficial effects: The present invention acquires business data, parses the corresponding input parameter file and mapping code, and retrieves the corresponding mapping file of the mapping code, thereby obtaining the input parameter file to be mapped and the mapping file recording the corresponding mapping rules, thus providing a data foundation for subsequent parameter mapping processing. Simultaneously, the present invention selects objects and arrays as target data in the input parameter file, and for each element of the target data, generates a corresponding identifier and concatenates it with the element to obtain the corresponding string, thus splitting each target data into multiple corresponding strings, achieving the elimination of multiple strings in the input parameter data (i.e., the input parameter file). The hierarchical data structure facilitates subsequent processing by mapping each input parameter (i.e., string data) one-to-one. Furthermore, by determining the search path corresponding to each string in the input parameter file and querying the corresponding mapping result in the mapping file based on the search path, the invention performs mapping processing on each string, thus aligning the mapping rules for each input parameter data and performing a one-to-one mapping process. Additionally, by identifying identifiers in the mapped input parameter file and organizing the mapped input parameter file according to the corresponding identification results to obtain the output parameter file, the invention achieves the technical objective of restoring the data structure of the mapped strings.

[0028] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description

[0029] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:

[0030] Figure 1 This is a schematic diagram of the main flow of the data processing method according to the first embodiment of the present invention;

[0031] Figure 2 This is a schematic diagram of the main flow of the data processing method according to the second embodiment of the present invention;

[0032] Figure 3 This is a schematic diagram of the main flow of the data processing method according to the third embodiment of the present invention;

[0033] Figure 4 This is a schematic diagram of the main modules of a data processing apparatus according to an embodiment of the present invention;

[0034] Figure 5 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;

[0035] Figure 6 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation

[0036] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0037] Figure 1 This is a schematic diagram of the main flow of the data processing method according to the first embodiment of the present invention, as shown below. Figure 1 As shown, the data processing method includes:

[0038] Step S101: Obtain business data, parse the corresponding input parameter file and mapping code, and retrieve the corresponding mapping file of the mapping code.

[0039] In real-world business scenarios, parameter mapping is widely applicable. In almost every data exchange between two different business groups, inconsistencies in interface parameters arise. Furthermore, different data interfaces correspond to different parameter differences, meaning there's no universal solution. Different mapping protocols (i.e., mapping files) need to be configured for different data exchange processes, and then the configured mapping protocol must be aligned with the corresponding parameters to be processed, mapping them one by one. Currently, the AtlasMap open-source framework is commonly used to handle the configuration of mapping protocols and parameter mapping. However, in applications with complex parameters, AtlasMap reveals potential problems. Specifically, it is prone to unknown errors when performing basic operations (such as parameter file serialization), significantly impacting overall data exchange efficiency. Moreover, due to AtlasMap's rich functionality and complex underlying logic, focusing solely on optimizing its parameter mapping conversion algorithm is not cost-effective or meaningful. Against this technological backdrop, this technical solution has emerged. The data processing method of this technical solution can not only correctly call the multiple mapping protocols configured in the original configuration, but also replace and improve the parameter mapping conversion algorithm of the AtlasMap open source framework. In this way, it can correctly handle the corresponding parameter alignment and mapping in complex parameter scenarios where the parameter names, parameter types and number of parameters of the two interfaces are inconsistent, thus providing a high-efficiency solution for existing data docking business.

[0040] In this embodiment, after step S101, the input parameter file to be mapped and the mapping file recording the corresponding mapping rules are obtained, thus providing a data foundation for subsequent parameter mapping processing. The mapping file is pre-configured according to known parameter mapping processing requirements. For example, if this technical solution is used for data interface processing between interface A and interface B, it is necessary to pre-query the parameter formats (including the number of parameters, naming, data type, etc.) accepted by interface A (input parameter interface) and interface B (output parameter interface), and then configure the corresponding mapping protocol (i.e., mapping file) based on the differences between the two parameter formats. In a further embodiment, the mapping protocol can take the form of a MAP, which includes a set of multiple key-value pairs. In each key-value pair, the "key" records the name and data structure information of an input parameter, and the "value" records the output parameter information obtained from the mapping processing of that input parameter. Thus, the association between the corresponding input and output parameters is recorded through the matching relationship of the key-value pairs.

[0041] In some embodiments, to obtain a more practical input parameter file and a clearer, more explicit mapping code, the acquired business data can be compressed into a compressed file during the acquisition and parsing process to obtain the corresponding input parameter file and mapping code. A specified script function is then used to read the compressed file to generate an input parameter file in the corresponding script format. The business data is then parsed to obtain the corresponding input parameter code and output parameter code, which are then merged to obtain the mapping code. This process allows for the parsing of the corresponding input parameter file based on the scripting language used in the specific business scenario, ensuring that the output parameter file obtained from the mapping process also corresponds to the scripting language. This achieves the technical objective of specifying the programming language format of the output parameter file according to business requirements. For example, if the business scenario or data interface corresponding to the output parameter file is known to support a JAVA development environment, the acquired business data should be parsed into a JSON format input parameter file.

[0042] Step S102: Select objects and arrays as target data in the input parameter file, and for each element of the target data: generate a corresponding identifier and concatenate it with the element to obtain the corresponding string; so as to split each target data into multiple corresponding strings.

[0043] In this embodiment, after the processing in step S102, the relatively complex data in the input parameter file, namely object data and array data with hierarchical structure, can be flattened into corresponding strings, thereby achieving the technical effect of eliminating multi-level data in the input parameter data (i.e., the input parameter file), and converting them into single-level string data, which facilitates subsequent processing to map each input parameter (i.e., string data) one by one.

[0044] In some embodiments, before tiling the input parameter file, the multiple parameters included in the input parameter file can be traversed first, and parameters corresponding to invalid parameter values ​​and parameters corresponding to duplicate parameter names can be filtered out, thereby simplifying the scope of subsequent tiling processing of the input parameter file.

[0045] In some embodiments, to distinguish each tiled object element or array element for easy querying of corresponding mapping rules, the name of the target data to which the element belongs can be determined when generating the corresponding identifier; it can be determined whether the target data to which the element belongs is an array. If so, a preset array concatenation code and the name are concatenated to obtain the corresponding identifier; otherwise, a preset object concatenation code and the name are concatenated to obtain the corresponding identifier. For example, for the target data "ware":{"title1":"Process Arrangement Test Product 04","barCode":"222"}, it can be known that the data type of the target data is an object and the name is "ware". If the preset object concatenation code is " / -> / ", then the concatenated identifier can be " / ware-> / ", so the two strings obtained by splitting the target data can be / ware-> / "title1":"Process Arrangement Test Product 04" and

[0046] The expression ` / ware-> / "barCode":"222"` eliminates the original data structure while simultaneously recording the original data structure using an identifier, thus preserving the corresponding data structure information. In a further embodiment, the object concatenation code may differ from the array concatenation code, allowing the original data structure to be clearly distinguished by the identifier at the beginning of the corresponding string in the string representation of the corresponding element, thereby facilitating the matching of the mapping rules corresponding to the original data structure.

[0047] In a further embodiment, if the parameter data in the input parameter file is a nested structure, that is, if there is an object element or array element that is still an object structure or array structure, then the target data can be judged multiple times for each element according to the above concatenation method, and the strings concatenated multiple times can be superimposed accordingly until it is determined that the element at the current level is a string structure.

[0048] In some embodiments, to align the original string data in the input parameter file with the format of the flattened string data obtained above, before determining the search path corresponding to each string in the input parameter file, each string in the input parameter file can be concatenated with a preset string concatenation code. For such data, the concatenated string concatenation code can be regarded as the corresponding identifier. After this step, each string in the processed output parameter file is composed of an identifier and parameter data, thereby achieving the technical effect of unifying the format composition of each string. This facilitates the determination of the corresponding data hierarchy information and the restoration of the corresponding data structure after mapping processing by identifying the identifier of each string.

[0049] In a further embodiment, after concatenating each parameter in the input parameter file, redundant characters in the input parameter file can be deleted by identifying the identifier of each string. For example, for the array "skus":[{"jdPrice":0.1,"stockCount":100}], the corresponding concatenation result can be "skus":[{ / skus<> / "jdPrice":[0.1], / skus<> / "stockCount":100}]. If the corresponding concatenation rule is that the identifier is concatenated at the beginning of each array element, then the substring ""skus":[{" before the identifier in the first string should be deleted.

[0050] Step S103: Determine the search path corresponding to each string in the input parameter file, and query the corresponding mapping result in the mapping file according to the search path to perform mapping processing on each string.

[0051] In this embodiment, this step completes the process of aligning the mapping rules corresponding to each input parameter data and performing a one-to-one mapping process. The lookup path used to match the mapping rules can include the identifier of each string, thereby obtaining the original data structure information by reading the corresponding identifier and querying the corresponding mapping result in the mapping file.

[0052] In a further embodiment, when determining the search path corresponding to each string in the input parameter file, the splitter can be located in each string according to a preset splitter, so that the substring in each string before the splitter is used as the corresponding search path.

[0053] In a further embodiment, to accurately map each input parameter data to preserve part of its original appearance, the segmentation character can be located within each string during mapping processing. This allows for the extraction of the substring preceding the segmentation character, resulting in a mapping result for that string. In an even further embodiment, corresponding data format information can be determined for each mapping result, and the data format of the substring following the segmentation character within the corresponding string can be corrected based on this information.

[0054] For example, since the business parameters that need to be transferred are mostly in key-value pair form, a colon can be used as a separator. Therefore, for the string ` / ware-> / "barCode":"222"`, the search path is the substring before the colon ` / ware-> / "barCode"`, and the retained parameter value (i.e., the part not mapped) is the substring after the colon `"222"`. If the mapping result obtained according to the search path is ` / skus<> / "CodeA"`, then the result of mapping the string is ` / skus<> / "CodeA":"222"`. Therefore, as shown in the example above, after this step, the parameter `barCode` with a value of 222 in the object `ware` is mapped to the parameter `CodeA` with a value of 222 in the array `skus`. This changes both the corresponding parameter name and data structure in a single mapping process, demonstrating the accuracy and efficiency of this solution in handling complex parameter scenarios.

[0055] Step S104: Identify the identifier in the input parameter file after mapping processing, and organize the input parameter file after mapping processing according to the corresponding identification results to obtain the output parameter file.

[0056] This step reverses the process of flattening the parameter data structure in step S102, that is, restoring the data structure of the mapped string and correspondingly folding and restoring the string into object elements or array elements.

[0057] In some embodiments, to improve the accuracy of the above restoration process, for each string in the input parameter file after mapping: locate the array concatenation code, object concatenation code, or string concatenation code; read the substring between the first character of the string and the last character of the location result as the identifier corresponding to the string; determine the identifier corresponding to each string; and for each identifier: query the corresponding merging rule and filter to obtain multiple corresponding strings, and merge the multiple corresponding strings according to the merging rule; delete the corresponding identifier in each merged string. After this step, the identifier can be quickly identified in the mapped string, and the corresponding data structure of each string can be determined according to the name information and concatenation code type information included in the identifier, and the corresponding merging and sorting can be performed. For example, if the parameter corresponding to a certain mapped string is parsed as an element in array S through the identifier of a certain mapped string, other strings with the same identifier (indicating that the corresponding parameters are all elements in array S) should be placed in a pair of square brackets, and finally the identifier in each string should be deleted to restore the corresponding array element.

[0058] Figure 2This is a schematic diagram of the main flow of a data processing method according to a second embodiment of the present invention, the data processing method including:

[0059] Step S201: Obtain business data and parse it to obtain the corresponding input parameter file and mapping code.

[0060] Step S202: Retrieve the mapping file corresponding to the mapping encoding.

[0061] Step S203: For each string in the input parameter file: concatenate the string using a preset string concatenation code.

[0062] Step S204: Select objects and arrays as target data in the input parameter file.

[0063] Step S205: For each element of the target data: generate a corresponding identifier and concatenate it with the element to obtain the corresponding string.

[0064] Step S206 involves splitting each target data into multiple corresponding strings.

[0065] Step S207: Determine the search path corresponding to each string in the input parameter file.

[0066] Step S208: Query the corresponding mapping result in the mapping file for each search path.

[0067] Step S209: Perform corresponding mapping processing on each string.

[0068] Step S210: Restore the input parameter file after mapping to obtain the output parameter file.

[0069] Figure 3 This is a schematic diagram of the main flow of a data processing method according to a third embodiment of the present invention, the data processing method including:

[0070] Step S301: Obtain business data.

[0071] Step S302: Compress the acquired business data and use the specified script function to read the compressed file to generate an input parameter file in the corresponding script format.

[0072] Step S303: Parse the business data to obtain the corresponding input parameter code and output parameter code, and merge the input parameter code and the output parameter code to obtain the mapping code.

[0073] Step S304: Retrieve the mapping file corresponding to the mapping encoding.

[0074] Step S305: For each string in the input parameter file, concatenate the string using a preset string concatenation code.

[0075] Step S306: Select objects and arrays as target data in the input parameter file.

[0076] Step S307: For each element of the target data: generate a corresponding identifier based on the name and data type of the target data and concatenate it with the element to obtain the corresponding string.

[0077] Step S308 involves splitting each target data into multiple corresponding strings.

[0078] Step S309: According to the preset splitter, locate the splitter in each string, so that the substring in each string that is before the splitter is used as the corresponding search path for each string.

[0079] Step S310: Query the corresponding mapping result in the mapping file for each search path.

[0080] Step S311: Locate the splitter in each string to extract the substring before the splitter in each string, and map it to the corresponding mapping result of that string.

[0081] Step S312: Identify the identifier in the input parameter file after mapping processing, and organize the input parameter file after mapping processing according to the corresponding identification results to obtain the output parameter file.

[0082] Preferably, for each string in the input parameter file after mapping processing: locate the array concatenation code, object concatenation code, or string concatenation code; read the substring between the first character of the string and the last character of the location result as the identifier corresponding to the string; determine the identifier corresponding to each string; and for each identifier: query the corresponding merging rule and filter to obtain multiple corresponding strings, so as to merge the multiple corresponding strings according to the merging rule; delete the corresponding identifier in each merged string.

[0083] Figure 4 This is a schematic diagram of the main modules of a data processing apparatus according to an embodiment of the present invention, such as... Figure 4As shown, the data processing device 400 includes an acquisition module 401, a tiling module 402, a mapping module 403, and a folding module 404. The acquisition module 401 acquires business data, parses it to obtain the corresponding input parameter file and mapping code, and retrieves the corresponding mapping file for the mapping code. The tiling module 402 selects objects and arrays as target data in the input parameter file, and for each element of the target data, generates a corresponding identifier and concatenates it with the element to obtain the corresponding string, thus splitting each target data into multiple corresponding strings. The mapping module 403 determines the search path corresponding to each string in the input parameter file, queries the corresponding mapping result in the mapping file according to the search path, and performs mapping processing on each string. The folding module 404 identifies the identifier in the mapped input parameter file and organizes the mapped input parameter file according to the corresponding identification result to obtain the output parameter file.

[0084] In some embodiments, the acquisition module 401 is further configured to: compress the acquired business data to obtain a compressed file when acquiring business data and parsing the corresponding input parameter file and mapping code, and read the compressed file using a specified script function to generate an input parameter file in the corresponding script format; parse the business data to obtain the corresponding input parameter code and output parameter code, and merge the input parameter code and the output parameter code to obtain the mapping code.

[0085] In some embodiments, the tiling module 402 is further configured to: determine the name of the target data to which the element belongs when generating the corresponding identifier; determine whether the target data to which the element belongs is an array; if so, concatenate the name with a preset array concatenation code to obtain the corresponding identifier; if not, concatenate the name with a preset object concatenation code to obtain the corresponding identifier.

[0086] In some embodiments, the tiling module 402 is further configured to: before selecting objects and arrays as target data in the input parameter file, concatenate each string in the input parameter file using a preset string concatenation code.

[0087] In some embodiments, the mapping module 403 is further configured to: when determining the search path corresponding to each string in the input parameter file, read a preset splitter, locate the splitter in each string, and extract the substring in each string that is before the splitter as the corresponding search path.

[0088] In some embodiments, the mapping module 403 is further configured to: when performing mapping processing on each string, locate the splitter in each string so as to map the substring in each string that is located before the splitter into the corresponding mapping result.

[0089] In some embodiments, the folding module 404 is further configured to: identify identifiers in the input parameter file after mapping processing, and when organizing the input parameter file after mapping processing according to the corresponding identification results, for each string in the input parameter file after mapping processing: locate the array concatenation code, or object concatenation code, or string concatenation code, read the substring between the first character of the string and the last character of the location result as the identifier corresponding to the string; determine the identifier corresponding to each string; and for each identifier: query the corresponding merging rule and filter to obtain multiple corresponding strings, so as to merge the multiple corresponding strings according to the merging rule; and delete the corresponding identifier in each merged string.

[0090] It should be noted that the data processing method and the data processing device described in this invention have a corresponding relationship in their specific implementation, so repeated content will not be described again.

[0091] Figure 5 An exemplary system architecture 500 is shown that can be applied to the data processing method or data processing apparatus of the present invention.

[0092] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, and 503, a network 504, and a server 505. Network 504 serves as the medium for providing communication links between terminal devices 501, 502, and 503 and server 505. Network 504 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0093] Users can use terminal devices 501, 502, and 503 to interact with server 505 via network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, and 503.

[0094] Terminal devices 501, 502, and 503 can be various electronic devices with a page display processing screen that supports web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0095] Server 505 can be a server that provides various services, such as a backend management server that supports users using terminal devices 501, 502, and 503 (for example only). The backend management server can analyze and process data such as received product information query requests, and feed back the processing results (such as target push information, product information - for example only) to the terminal device.

[0096] It should be noted that the data processing method provided in the embodiments of the present invention is generally executed by server 505, and correspondingly, the computing device is generally located in server 505.

[0097] It should be understood that Figure 5 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0098] The following is for reference. Figure 6 It shows a schematic diagram of the structure of a computer system 600 suitable for implementing a terminal device of the present invention. Figure 6 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0099] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 602 or programs loaded from storage section 608 into random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of the computer system 600. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0100] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display processor (LCD), and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card and a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.

[0101] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs the functions defined above in the system of this invention.

[0102] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0103] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0104] The modules described in the embodiments of this invention can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor can be described as including an acquisition module, a tiling module, a mapping module, and a folding module. The names of these modules do not necessarily limit the functionality of the module itself.

[0105] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to: acquire business data; parse the corresponding input parameter file and mapping code; retrieve the corresponding mapping file of the mapping code; select objects and arrays as target data in the input parameter file; and for each element of the target data: generate a corresponding identifier and concatenate it with the element to obtain a corresponding string; split each target data into multiple corresponding strings; determine the search path corresponding to each string in the input parameter file; query the corresponding mapping result in the mapping file according to the search path to perform mapping processing on each string; identify the identifier in the mapped input parameter file; and organize the mapped input parameter file according to the corresponding identification result to obtain an output parameter file.

[0106] According to the technical solution of the present invention, the problem of low data connection efficiency between existing multi-platform systems can be solved.

[0107] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A data processing method, characterized in that, include: Obtain business data, parse it to get the corresponding input parameter file and mapping code, and retrieve the corresponding mapping file for the mapping code; Select objects and arrays as target data in the input parameter file, and for each element of the target data: generate a corresponding identifier and concatenate it with the element to obtain the corresponding string; To split each target data into multiple corresponding strings; wherein, before selecting objects and arrays as target data in the input parameter file, the process includes: for each string in the input parameter file: concatenating the strings using a preset string concatenation code; Determine the search path corresponding to each string in the input parameter file, and query the corresponding mapping result in the mapping file according to the search path to perform mapping processing on each string; Identify the identifiers in the mapped input parameter file, and organize the mapped input parameter file according to the corresponding identification results to obtain the output parameter file, including: For each string in the input parameter file after mapping: locate the array concatenation code, object concatenation code, or string concatenation code, and read the substring between the first character of the string and the last character of the location result as the identifier corresponding to the string; To determine the identifier corresponding to each string; For each identifier, query the corresponding merging rule and filter to obtain multiple corresponding strings, so as to merge the multiple strings according to the merging rule; Remove the corresponding identifier from each merged string.

2. The method according to claim 1, characterized in that, Obtain business data, parse it to obtain the corresponding input parameter file and mapping code, including: The acquired business data is compressed to obtain a compressed file, and the compressed file is read using a specified script function to generate an input parameter file in the corresponding script format; The business data is parsed to obtain the corresponding input parameter code and output parameter code, and the input parameter code and output parameter code are merged to obtain the mapping code.

3. The method according to claim 1, characterized in that, Generate the corresponding identifier, including: Determine the name of the target data to which this element belongs; Determine if the target data to which this element belongs is an array. If so, then the preset array concatenation code and the name are concatenated to form the corresponding identifier; If not, then the preset object concatenation code and the name are concatenated to obtain the corresponding identifier.

4. The method according to claim 1, characterized in that, Determine the search path for each string in the input parameter file, including: Read the preset splitter, locate the splitter in each string, and extract the substring in each string that is before the splitter as the corresponding search path.

5. The method according to claim 4, characterized in that, Each string is mapped, including: The splitter is located in each string to map the substrings in each string that are preceding the splitter to the corresponding mapping result.

6. A data processing apparatus, characterized in that, include: The acquisition module is used to acquire business data, parse the corresponding input parameter file and mapping code, and retrieve the corresponding mapping file of the mapping code; The tiling module is used to select objects and arrays as target data from the input parameter file, and for each element of the target data: generate a corresponding identifier and concatenate it with the element to obtain the corresponding string; To split each target data into multiple corresponding strings; wherein, before selecting objects and arrays as target data in the input parameter file, the process includes: for each string in the input parameter file: concatenating the strings using a preset string concatenation code; The mapping module is used to determine the search path corresponding to each string in the input parameter file, and query the corresponding mapping result in the mapping file according to the search path to perform mapping processing on each string; The folding module is used to identify identifiers in the mapped input parameter file and, based on the identification results, organize the mapped input parameter file to obtain the output parameter file, including: For each string in the input parameter file after mapping: locate the array concatenation code, object concatenation code, or string concatenation code, and read the substring between the first character of the string and the last character of the location result as the identifier corresponding to the string; To determine the identifier corresponding to each string; For each identifier, query the corresponding merging rule and filter to obtain multiple corresponding strings, so as to merge the multiple strings according to the merging rule; Remove the corresponding identifier from each merged string.

7. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-5.

8. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5.