A data processing method, electronic device and computer readable storage medium

By obtaining the third-party platform interface configuration information and the associated data interface response results to determine the initial call data and performing target data interface calls, the problem that data acquisition programs need to be modified one by one in the prior art is solved, and the data acquisition efficiency is improved.

CN119311757BActive Publication Date: 2025-04-25ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411866620.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-25
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

When obtaining big data from third-party platforms in the existing technology, data collection programs need to be customized for each interface, resulting in the need to modify the programs one by one when accessing a new third-party platform, which is less efficient.

Method used

By obtaining interface configuration information in a third-party platform, the initial call data for calling the target data interface is determined, and when there is an associated data interface in the current interface call sequence, the target data interface is called based on the response result of the associated data interface and the initial call data data.

Benefits of technology

The determination of the initial call data is simplified, the complex target data acquisition process is avoided, and the efficiency of obtaining target data from the target data interface is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311757B_ABST
    Figure CN119311757B_ABST
Patent Text Reader

Abstract

The present application discloses a data processing method, an electronic device, and a computer-readable storage medium. In response to receiving a target data acquisition instruction, the data processing platform acquires data interface information in a third-party platform, and the data interface information includes at least two data interfaces and interface configuration information of the corresponding data interfaces; in response to the existence of a target data interface for retrieving target data in the data interface, the initial call data is determined based on the interface configuration information of each data interface in the current interface call sequence; the data interface call processing is performed according to the current interface call sequence, and in response to the existence of at least one associated data interface associated with the target data interface from the first data interface to the second data interface in the current interface call sequence, the target data interface is called and processed according to the response result obtained by calling the associated data interface and the initial call data to obtain the target data. Thus, the efficiency of acquiring the target data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, an electronic device and a computer-readable storage medium. Background Art

[0002] With the rapid development of the big data era, more and more places need to use big data. Big data is usually stored on third-party platforms. Before processing big data, data processing platforms need to obtain big data from third-party platforms. The data sources of big data are complex and diverse, and the collection forms are also diverse, resulting in different data interfaces for third-party platforms.

[0003] At present, the way for data processing platforms to obtain big data from third-party platforms is usually to customize and develop a set of data collection programs for each data interface of the third-party platform. However, this method requires modifying the collection program of the data interface one by one when connecting to a new third-party platform, which is inefficient. Summary of the invention

[0004] The main technical problem solved by the present application is to provide a data processing method, an electronic device and a computer-readable storage medium, which can improve the efficiency of acquiring target data.

[0005] In order to solve the above technical problems, the present application provides a data processing method.

[0006] In one embodiment, the data processing method is applied to a data processing platform, the third-party platform includes at least two data interfaces, the data processing platform is connected to the third-party platform through the data interface in the third-party platform, and the method includes:

[0007] In response to receiving the target data acquisition instruction, the data processing platform acquires data interface information in the third-party platform, the data interface information including at least two data interfaces and interface configuration information corresponding to the data interfaces;

[0008] In response to the existence of a target data interface for retrieving target data in the data interface, initial call data is determined based on interface configuration information of each data interface in a current interface call sequence obtained, the current interface call sequence including data interfaces arranged in a call sequence, and the current interface call sequence including the target data interface;

[0009] Performing data interface call processing according to the current interface call sequence, in response to the existence of at least one associated data interface associated with the target data interface from the first data interface to the second data interface in the current interface call sequence, performing call processing on the target data interface according to a response result obtained by calling the associated data interface and the initial call data to obtain target data;

[0010] The interface call time of the second data interface in the interface call sequence is earlier than the interface call time of the target data interface in the interface call sequence, and the second data interface in the interface call sequence is adjacent to the target data interface.

[0011] In one embodiment, the initial call data includes request parameters, and the step of calling the target data interface according to the response result obtained by calling the associated data interface and the initial call data to obtain the target data includes:

[0012] Based on the response result obtained by calling the associated data interface, the request parameters in the initial call data are replaced to obtain target call data;

[0013] Performing data call processing on the target data interface based on the target call data, and obtaining a response result obtained by calling the target data interface;

[0014] The target data is determined according to the target calling data and a response result obtained by calling the target data interface.

[0015] In one embodiment, the step of replacing the request parameters in the initial call data based on the response result obtained by calling the associated data interface to obtain the target call data includes:

[0016] Replacing the request parameters in the initial call data with the response result obtained by calling the associated data interface to obtain replaced call data;

[0017] Performing text parsing on the script information in the interface configuration information of the associated data interface to obtain a parsed script and a script identifier of the script;

[0018] The script identifier is added to the replaced call data to obtain the target call data. In one embodiment, the step of determining the target data according to the target call data and the response result obtained by calling the target data interface includes:

[0019] Matching a target script from a preset script database according to the script identifier in the target call data, wherein the script database includes a correspondence between preset script identifiers and preset scripts;

[0020] According to the target script, data operation is performed on the response result obtained by calling the target data interface to obtain the target data.

[0021] In one embodiment, the step of replacing the request parameters in the initial call data based on the response result obtained by calling the associated data interface to obtain the target call data includes:

[0022] Based on the response result obtained by calling the associated data interface, the preset global parameters are assigned to obtain the target global parameters;

[0023] The request parameters in the initial call data are replaced with the target global parameters to obtain target call data.

[0024] In one embodiment, after the step of calling the target data interface according to the response result obtained by calling the associated data interface and the initial calling data to obtain the target data, the method further includes:

[0025] Performing verification processing on the target data to obtain a verification result;

[0026] In response to the verification result indicating that the data call has failed, the step of returning to the data interface call processing according to the current interface call sequence, and in response to the presence of at least one associated data interface associated with the target data interface from the first data interface to the second data interface of the current interface call sequence, the target data interface is called and processed according to the response result obtained by calling the associated data interface and the initial call data to obtain the target data.

[0027] In one embodiment, the verification result includes verification success, and the step of performing verification processing on the target data to obtain the verification result includes:

[0028] Calculating the similarity between the business field in the target data and the preset business field;

[0029] In response to the business field similarity being greater than or equal to a preset field threshold, the verification result is characterized as successful verification.

[0030] In one embodiment, the step of determining the initial call data based on the interface configuration information of each data interface in the current interface call sequence obtained includes:

[0031] Assembling the interface configuration information of each data interface according to the current interface calling order to obtain assembled interface configuration information;

[0032] The assembled interface configuration information is determined as the initial calling data.

[0033] In order to solve the above technical problems, the present application provides an electronic device, including a memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the above data processing method.

[0034] In order to solve the above technical problems, the present application provides a computer-readable storage medium, including: storing program data, and the program data is used to implement the above data processing method when executed by a processor.

[0035] The beneficial effects of the present application are as follows: on the one hand, the initial call data for calling the target data interface is determined by obtaining the interface configuration information in the third-party platform, which simplifies the determination of the initial call data and avoids the complexity of the target data acquisition caused by the program for customizing the data collection of the third-party platform interface. On the other hand, when there is at least one associated data interface associated with the target data interface in the current interface call sequence, the target data interface is called according to the response result obtained by calling the associated data interface and the initial call data, and the target data is acquired by the parameter association between the associated data interface and the target data interface, which improves the efficiency of acquiring the target data from the target data interface. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0037] Figure 1 is a flowchart of an exemplary embodiment of a data processing method shown in the present application;

[0038] Figure 2 yes Figure 1 A flow chart of an exemplary embodiment of step S130 in the data processing method is shown;

[0039] Figure 3 It is a schematic diagram of an application scenario of an embodiment of the data processing method shown in the present application;

[0040] Figure 4 is a block diagram of a data processing device shown in an exemplary embodiment of the present application;

[0041] Figure 5 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application;

[0042] Figure 6 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION

[0043] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be appreciated that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present application.

[0044] First of all, it should be noted that with the rapid development of the big data era, more and more places need to use big data. Big data is usually stored on third-party platforms. Before processing big data, the data processing platform needs to obtain big data from the third-party platform.

[0045] At present, the way for data processing platforms to obtain big data from third-party platforms is usually to customize and develop a set of data collection programs for each interface of the third-party platform. However, the data sources of big data are complex and diverse, and the collection forms are also diverse, resulting in different data interfaces for different third-party platforms. This method requires modifying the program one by one when connecting to a new third-party platform, has low scalability, and cannot flexibly adapt to multiple third-party platforms.

[0046] Based on this, this embodiment provides a data processing method, an electronic device, and a computer-readable storage medium. Figure 1 , Figure 1 It is a flowchart of an exemplary embodiment of a data processing method shown in the present application.

[0047] The execution subject of the data processing method may be a terminal device or a server or other processing device, wherein the terminal device may be a computer, a mobile device, a terminal, a computing device, a vehicle-mounted device, etc. The execution subject of the data processing method may also be a data processing device. In some possible implementations, the data processing method may be implemented by a processor calling a computer-readable instruction stored in a memory.

[0048] The data processing method is applied to a data processing platform. The third-party platform includes at least two data interfaces. The data processing platform is connected to the third-party platform through the data interface in the third-party platform.

[0049] Specifically, the data processing method provided in this embodiment includes the following steps:

[0050] Step S110: In response to receiving the target data acquisition instruction, the data processing platform acquires data interface information in the third-party platform, where the data interface information includes at least two data interfaces and interface configuration information of the corresponding data interfaces.

[0051] The target data acquisition instruction refers to an instruction for acquiring the target data. The target data acquisition instruction may include a current interface call sequence. The current interface call sequence is the current call sequence of the data interface of the third-party platform. Specifically, the data processing platform receives the input instruction and determines the input instruction as the target data acquisition instruction. For example, the target data acquisition instruction may be a subscription instruction or an unsubscription instruction.

[0052] Data interface information refers to the information of each data interface in the third-party platform. Data interface information may include at least two data interfaces and interface configuration information of the corresponding data interfaces. Among them, the data interface is a channel for data exchange and communication between the data processing platform and the third-party platform. The interface configuration information of the data interface may include interface address, port (Port), request path, request Header (request header), request parameters (Param), request Body (request body), URL (Uniform Resource Locator) parameters, request method, variables, expressions, etc. For example, the request method may include post / get / put / delete, etc. The interface configuration information may also include custom function information and script information. For example, the request body includes a signature. For example, the expression includes a data algorithm.

[0053] As an example, the data processing platform obtains data interface information in the third-party platform from the third-party platform in response to receiving the target data acquisition instruction. As another example, the data processing platform obtains data interface information in the third-party platform from the target data acquisition instruction in response to receiving the target data acquisition instruction. The target data acquisition instruction includes data interface information in the third-party platform.

[0054] Step S120, in response to the existence of a target data interface for calling target data in the data interface, the initial calling data is determined based on the interface configuration information of each data interface in the current interface calling sequence obtained, the current interface calling sequence includes data interfaces arranged in order of calling sequence, and the current interface calling sequence includes the target data interface.

[0055] The initial call data refers to the data obtained by assembling the interface configuration information in the order of interface calls.

[0056] The data processing platform determines the initial call data based on the interface configuration information of each data interface in the current interface call sequence. As an example, the data processing platform selects the configuration information required for the interface call from the interface configuration information of each data interface in accordance with the calling order of each data interface in the current interface call sequence; the selected configuration information is combined in a preset order to obtain the initial call data. As another example, the data processing platform assembles the interface configuration information of each data interface in accordance with the current interface call sequence to obtain the assembled interface configuration information; the assembled interface configuration information is determined as the initial call data. For example, the data processing platform combines the request header, URL parameters, request body, request parameters, etc. of each data interface in accordance with the current interface call sequence to obtain the initial call data.

[0057] Step S130: perform data interface call processing according to the current interface call sequence, and in response to the existence of at least one associated data interface associated with the target data interface from the first data interface to the second data interface in the current interface call sequence, perform call processing on the target data interface according to the response result obtained by calling the associated data interface and the initial call data to obtain the target data, wherein the interface call time of the second data interface in the interface call sequence is earlier than the interface call time of the target data interface in the interface call sequence, and the second data interface in the interface call sequence is adjacent to the target data interface.

[0058] The first data interface is the first data interface in the current interface call sequence, the second data interface is the second to last data interface in the current interface call sequence, and the target data interface is the last to last data interface in the current interface call sequence. The interface call time of the first data interface in the interface call sequence is earlier than the interface call time of the first data interface in the interface call sequence, the interface call time of the second data interface in the interface call sequence is earlier than the interface call time of the target data interface in the interface call sequence, and the second data interface in the interface call sequence is adjacent to the target data interface.

[0059] The associated data interface is a data interface that is associated with the target data interface. The associated data interface can be any data interface except the target data interface in the current interface call sequence. There can be one or more associated data interfaces.

[0060] The target data is the data that needs to be obtained from the third-party platform as indicated by the target data obtaining instruction.

[0061] Specifically, the data processing platform uses the initial call data to call each data interface in sequence according to the current interface call sequence to obtain the response result of the associated data interface; adds the response result of the associated data interface to the initial call data to obtain the target call data; and calls the target data interface with the target call data to obtain the target data.

[0062] It can be seen that, on the one hand, the initial call data for calling the target data interface is determined by obtaining the interface configuration information in the third-party platform, which simplifies the determination of the initial call data and avoids the complexity of target data acquisition caused by customizing the data collection program of the third-party platform interface. On the other hand, when there is at least one associated data interface associated with the target data interface in the current interface call sequence, the target data interface is called according to the response result obtained by calling the associated data interface and the initial call data, and the target data is acquired through the parameter association between the associated data interface and the target data interface, which improves the efficiency of acquiring the target data from the target data interface.

[0063] Based on the above examples, please continue to refer to Figure 2 , Figure 2 yes Figure 1 The flowchart of an exemplary embodiment of step S130 in the data processing method is shown. Specifically, in step S130, the target data interface is called and processed according to the response result obtained by calling the associated data interface and the initial call data, and the process of obtaining the target data includes the following steps:

[0064] Step S210: Replace the request parameters in the initial call data based on the response result obtained by calling the associated data interface to obtain target call data.

[0065] As an example, the data processing platform replaces the request parameters in the initial call data with the response result obtained by calling the associated data interface to obtain the target call data. As another example, the data processing platform replaces the request parameters in the initial call data with the response result obtained by calling the associated data interface to obtain the replaced call data; performs text parsing on the script information in the interface configuration information of the associated data interface to obtain the parsed script and the script identifier of the script; adds the script identifier to the replaced call data to obtain the target call data. As another example, the data processing platform replaces the request parameters in the initial call data with the response result obtained by calling the associated data interface to obtain the replaced call data; performs function parsing on the custom function information in the interface configuration information of the associated data interface to obtain the parsed custom function and the function identifier of the custom function; adds the function identifier to the replaced call data to obtain the target call data.

[0066] The script identifier may be a script name. The parsed script may be a jar package (JAR Package), a python script, a shell script, a lib library (Library), etc. The jar package includes pre-written data operation functions.

[0067] Furthermore, the parsed script and / or the parsed custom function may be packaged and stored in a cache in a data processing platform, such as an FTP (File Transfer Protocol) server.

[0068] In one embodiment, the target data interface has multiple associated data interfaces, and the data processing platform replaces the request parameters in the initial call data with the response results obtained by calling each associated data interface to obtain the target call data.

[0069] In another embodiment, the data processing platform assigns the preset global parameters based on the response result obtained by calling the associated data interface to obtain the target global parameters; the request parameters in the initial call data are replaced with the target global parameters to obtain the target call data. For example, the data processing platform updates the value of the preset global parameters with the response result obtained by calling the associated data interface to obtain the target global parameters; the request parameters in the initial call data are replaced with the target global parameters to obtain the target call data. Among them, the assignment can be through the jsonpath syntax, for example, Param1=$.data.token, $.data.token is the jsonpath syntax format, which refers to the value of the path data.token of calling the associated data interface, that is, the response result. It should be noted that the data processing platform can assign the response results of each data interface in the current interface call sequence to the preset global parameters to obtain the target global parameters corresponding to each data interface. The data processing platform can also call the target global parameters corresponding to the data interface associated with the current data interface to implement the call of the current data interface according to the response result of the data interface associated with the current data interface and the initial call data.

[0070] Step S220: Perform data call processing on the target data interface based on the target call data, and obtain a response result obtained by calling the target data interface.

[0071] As an example, the data processing platform calls the target data interface with the target call data to obtain the response result obtained by calling the target data interface. As another example, the data processing platform sends the target call data to the third-party platform through the target data interface, so that the third-party platform uses the data matched based on the target call data as the response result; and stores the response result fed back by the third-party platform through the target data interface into the data storage address corresponding to the target call data. There is a corresponding relationship between the target call data and the data storage address.

[0072] Step S230: determine the target data according to the target calling data and the response result obtained by calling the target data interface.

[0073] As an example, the data processing platform matches the target script from a preset script database according to the script identifier in the target call data, and the script database includes the correspondence between the preset script identifier and the preset script; the response result obtained by calling the target data interface is processed according to the target script to obtain the target data. As another example, the data processing platform matches the target function from a preset function database according to the function identifier in the target call data, and the function database includes the correspondence between the preset function identifier and the preset function; the response result obtained by calling the target data interface is processed according to the target function to obtain the target data.

[0074] In one embodiment, the data processing platform sends the URL (Uniform Resource Locator) in the target data acquisition instruction to the third-party platform through the target data interface to trigger the third-party platform to transfer the data corresponding to the URL in the third-party platform to the data storage address corresponding to the URL of the data processing platform; and receive the data sent by the third-party platform to the data storage address corresponding to the URL; process the data sent by the third-party platform to the data storage address corresponding to the URL through the target script to obtain the target data; cache the target data in the intermediate storage. For example, the intermediate storage can be kafka, database, cloud storage, etc. Among them, the data processing platform sets the URL in the request body of the target call data and sends it to the third-party platform together with the target call data.

[0075] In one application scenario, the script is specifically: method(calcSig,testpasswd,${token}), where calcSig is the script name, testpasswd is the parameter value, and ${token} indicates obtaining the value of the target global parameter token. The parameter value can be a fixed value.

[0076] It can be seen that the request parameters in the initial call data are replaced based on the response result obtained by calling the associated data interface to obtain the target call data; the target data interface is processed for data calling based on the target call data to obtain the response result obtained by calling the target data interface, and then the target data is determined based on the target call data and the response result obtained by calling the target data interface. In this way, the target data interface is called based on the response result obtained by calling the associated data interface and the initial call data to obtain the target data.

[0077] In an application scenario, such as Figure 3 As shown, the current interface call sequence includes data interface A, data interface B and data interface C. Among them, data interface A is a public key acquisition interface, which is acquired once every preset time period, data interface B is a login authentication interface, and data interface C is a target data interface, which is used to receive data sent by a third-party platform. Data interface A is associated with data interface C, that is, data interface A is an associated data interface of the target data interface. The data processing platform first calls data interface A at a preset interval of initial call data to obtain multiple response results of data interface A, and the response result obtained by the most recent call to data interface A overwrites the historical response result, and the response result obtained by the most recent call to data interface A is used as the target global parameter; based on the first response result of data interface A and the initial call data, data interface B is called to obtain the response result of data interface B; data interface C is called and processed with the current target global parameters and initial call data to obtain the response result sent by the third-party platform to data interface C; the response result of data interface C is processed according to the target script to obtain the target data; finally, the target data is stored to realize the storage of the target data in the intermediate storage.

[0078] In another application scenario, the current interface call sequence includes data interface E, data interface F, and data interface G. Among them, data interface E is a public key acquisition interface, data interface F is a login authentication interface, and data interface G is a subscription registration interface. Among them, data interface G is the target data interface; data interface F is the associated data interface of data interface G. The data processing platform calls data interface E with the initial call data to obtain a response result of data interface E; in response to the data path data.code in the response result of data interface E being 0, it indicates that the call is successful; the response result of data interface E is calculated using a preset script to obtain a calculation result; data interface F is called with the signature corresponding to the initial call data and the calculation result to obtain a response result of data interface F; the response result of data interface F and the preset global parameters are added to the initial call data to obtain target call data, and the target data interface is called with the target call data to obtain the first sub-data; after adding the page numbers in the first sub-data according to the preset addition operation, the sum is assigned to the preset global parameters to obtain the target global parameters; after replacing the preset global parameters in the target call data with the target global parameters, the target data interface is called with the replaced target call data to obtain the second sub-data; the above calling steps are continued to be looped until the target global parameters are greater than or equal to the preset page number threshold or the response result obtained by calling the target data interface indicates that all data have been called; the sub-data obtained by calling the target data interface are merged to obtain the target data.

[0079] Furthermore, after the data processing platform performs a call processing on the target data interface according to the response result obtained by calling the associated data interface and the initial call data to obtain the target data, it verifies the target data to obtain a verification result; in response to the verification result indicating that the data call has failed, the data processing platform returns to perform data interface call processing according to the current interface call sequence, and in response to the presence of at least one associated data interface associated with the target data interface from the first data interface to the second data interface in the current interface call sequence, the target data interface is called and processed according to the response result obtained by calling the associated data interface and the initial call data to obtain the target data.

[0080] The verification result may include verification success and verification failure, wherein verification success indicates successful data call, and verification failure indicates failed data call.

[0081] The data processing platform performs verification processing on the target data to obtain a verification result. Specifically, the data processing platform calculates the similarity between the business field in the target data and the preset business field; in response to the business field similarity being greater than or equal to the preset field threshold, the verification result is characterized as a successful verification; in response to the business field similarity being less than the preset field threshold, the verification result is characterized as a failed verification.

[0082] It should be noted that the target data interface has at least one corresponding target call data. If the response result obtained by the data processing platform in response to calling the associated data interface includes multiple request values, the request parameters in the initial call parameters are replaced with each request value to obtain the target call data corresponding to each request value, that is, multiple target call data.

[0083] Furthermore, in response to the verification result indicating that the data call has failed, the data processing platform determines whether there are other target call data in the target data interface, where the other target call data are target call data that have not been processed for calling in the target call data corresponding to the target data interface; if so, the other target call data are returned as target call data to the step of determining the target data based on the target call data and the response result obtained by calling the target data interface; until the data call of the target data interface is successful or the target call data corresponding to the target data interface have been processed for calling.

[0084] In one embodiment, the data processing platform determines that the data call is successful in response to the value corresponding to the business field in the response result of the target data interface being a preset first threshold; and determines that the data call fails in response to the value corresponding to the business field in the response result of the target data interface being a preset second threshold, and ignores the current call and makes the next call again. For example, the first threshold is 200, and the second threshold is 403. As an example, the response result of the target data interface includes {"success":true, "code":200, "data":"xxxxxx"}, where success represents the business field name, true represents the business field name as the value corresponding to success, code is the business field, 200 is the value corresponding to the business field code, and data represents data; in response to the value corresponding to the business field code being 200, the data call is determined to be successful. As another example, the response result of the target data interface includes {"success":true, "code":403, "data":"xxxxxx"}, wherein success represents the business field name, true represents the value corresponding to the business field name success, code is the business field, 403 is the value corresponding to the business field code, and data represents data; in response to the value corresponding to the business field code being 403, it is determined that the data call has failed.

[0085] Figure 4 FIG. 1 is a block diagram of a data processing device shown in an exemplary embodiment of the present application. Figure 4 As shown, the exemplary data processing device 400 includes: an acquisition module 410, an initial call data determination module 420 and a target data acquisition module 430. Specifically:

[0086] The acquisition module 410 is used for the data processing platform to acquire data interface information in the third-party platform in response to receiving the target data acquisition instruction, where the data interface information includes at least two data interfaces and interface configuration information of the corresponding data interfaces.

[0087] The initial call data is determined 420, which is used to determine the initial call data in response to the existence of a target data interface in the data interface for retrieving the target data, based on the interface configuration information of each data interface in the current interface call sequence obtained, the current interface call sequence includes data interfaces arranged in order of calling sequence, and the current interface call sequence includes the target data interface.

[0088] The target data acquisition module 430 is used to perform data interface call processing according to the current interface call sequence. In response to the existence of at least one associated data interface associated with the target data interface from the first data interface to the second data interface in the current interface call sequence, the target data interface is called and processed according to the response result obtained by calling the associated data interface and the initial call data to obtain the target data; wherein the interface call time of the second data interface in the interface call sequence is earlier than the interface call time of the target data interface in the interface call sequence, and the second data interface in the interface call sequence is adjacent to the target data interface.

[0089] In this exemplary data processing device, on the one hand, the initial call data for calling the target data interface is determined by obtaining the interface configuration information in the third-party platform, which simplifies the determination of the initial call data and avoids the complexity of target data acquisition caused by customizing the data collection program of the third-party platform interface. On the other hand, when there is at least one associated data interface associated with the target data interface in the current interface call sequence, the target data interface is called according to the response result obtained by calling the associated data interface and the initial call data, and the target data is acquired by the parameter association between the associated data interface and the target data interface, which improves the efficiency of acquiring the target data from the target data interface.

[0090] Among them, the functions of each module can be found in the data processing method embodiment, and will not be repeated here.

[0091] In order to implement the data processing method of the above embodiment, the present application proposes another electronic device, for details, please refer to Figure 5 , Figure 5 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application.

[0092] The electronic device 500 includes a memory 501 and a processor 502 , wherein the memory 501 and the processor 502 are coupled.

[0093] The memory 501 is used to store program data, and the processor 502 is used to execute the program data to implement the data processing method of the above embodiment.

[0094] In this embodiment, the processor 502 may also be referred to as a CPU (Central Processing Unit). The processor 502 may be an integrated circuit chip having signal processing capabilities. The processor 502 may also be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. A general-purpose processor may be a microprocessor or the processor 502 may also be any conventional processor, etc.

[0095] The present application also provides a computer-readable storage medium, such as Figure 6 As shown, the computer-readable storage medium 600 is used to store program data 601. When the program data 601 is executed by the processor, it is used to implement the data processing method in the method embodiment of the present application.

[0096] The method involved in the data processing method embodiment of the present application, when implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0097] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data processing method, characterized in that: The data processing method is applied to a data processing platform, the third-party platform includes at least two data interfaces, the data processing platform is connected to the third-party platform through the data interface in the third-party platform, and the method includes: In response to receiving the target data acquisition instruction, the data processing platform acquires data interface information in the third-party platform, the data interface information including at least two data interfaces and interface configuration information corresponding to the data interfaces; In response to the existence of a target data interface for retrieving target data in the data interface, initial call data is determined based on interface configuration information of each data interface in a current interface call sequence obtained, the current interface call sequence including data interfaces arranged in a call sequence, and the current interface call sequence including the target data interface; Performing data interface call processing according to the current interface call sequence, in response to the existence of at least one associated data interface associated with the target data interface from the first data interface to the second data interface in the current interface call sequence, performing call processing on the target data interface according to a response result obtained by calling the associated data interface and the initial call data to obtain target data; The interface call time of the second data interface in the interface call sequence is earlier than the interface call time of the target data interface in the interface call sequence, and the second data interface in the interface call sequence is adjacent to the target data interface; The initial call data includes request parameters, and the step of calling the target data interface according to the response result obtained by calling the associated data interface and the initial call data to obtain the target data includes: Based on the response result obtained by calling the associated data interface, the request parameters in the initial call data are replaced to obtain target call data; Performing data call processing on the target data interface based on the target call data, and obtaining a response result obtained by calling the target data interface; Determine the target data according to the target calling data and a response result obtained by calling the target data interface; The associated data interface may be at least one data interface except the target data interface in the current interface call sequence.

2. The data processing method according to claim 1, characterized in that: The step of replacing the request parameters in the initial call data based on the response result obtained by calling the associated data interface to obtain the target call data includes: Replacing the request parameters in the initial call data with the response result obtained by calling the associated data interface to obtain replaced call data; Performing text parsing on the script information in the interface configuration information of the associated data interface to obtain a parsed script and a script identifier of the script; The script identifier is added to the replaced call data to obtain the target call data.

3. The data processing method according to claim 1, characterized in that: The step of determining the target data according to the target calling data and the response result obtained by calling the target data interface comprises: Matching a target script from a preset script database according to the script identifier in the target call data, wherein the script database includes a correspondence between preset script identifiers and preset scripts; According to the target script, data operation is performed on the response result obtained by calling the target data interface to obtain the target data.

4. The data processing method according to claim 1, characterized in that: The step of replacing the request parameters in the initial call data based on the response result obtained by calling the associated data interface to obtain the target call data includes: Based on the response result obtained by calling the associated data interface, the preset global parameters are assigned to obtain the target global parameters; The request parameters in the initial call data are replaced with the target global parameters to obtain target call data.

5. The data processing method according to claim 1, characterized in that: After the step of calling the target data interface according to the response result obtained by calling the associated data interface and the initial calling data to obtain the target data, the method further includes: Performing verification processing on the target data to obtain a verification result; In response to the verification result indicating that the data call has failed, the step of returning to the data interface call processing according to the current interface call sequence, and in response to the presence of at least one associated data interface associated with the target data interface from the first data interface to the second data interface of the current interface call sequence, the target data interface is called and processed according to the response result obtained by calling the associated data interface and the initial call data to obtain the target data.

6. The data processing method according to claim 5, characterized in that: The verification result includes verification success, and the step of performing verification processing on the target data to obtain the verification result includes: Calculating the similarity between the business field in the target data and the preset business field; In response to the business field similarity being greater than or equal to a preset field threshold, the verification result is characterized as successful verification.

7. The data processing method according to claim 1, characterized in that: The step of determining the initial call data based on the interface configuration information of each data interface in the current interface call sequence obtained comprises: Assembling the interface configuration information of each data interface according to the current interface calling order to obtain assembled interface configuration information; The assembled interface configuration information is determined as the initial calling data.

8. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the data processing method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: include: Program data is stored, and when the program data is executed by a processor, it is used to implement the data processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Third-party data acquisition method, electronic equipment and computer readable storage medium

    CN117931905A