CN115599572A - Data acquisition method and device, electronic equipment and computer readable medium - Google Patents

Data acquisition method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN115599572A
CN115599572A CN202211354928.0A CN202211354928A CN115599572A CN 115599572 A CN115599572 A CN 115599572A CN 202211354928 A CN202211354928 A CN 202211354928A CN 115599572 A CN115599572 A CN 115599572A
Authority
CN
China
Prior art keywords
node
parameter
determining
interface
calling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211354928.0A
Other languages
Chinese (zh)
Inventor
刘鹏辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Tuoxian Technology Co Ltd
Original Assignee
Beijing Jingdong Tuoxian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Tuoxian Technology Co Ltd filed Critical Beijing Jingdong Tuoxian Technology Co Ltd
Priority to CN202211354928.0A priority Critical patent/CN115599572A/en
Publication of CN115599572A publication Critical patent/CN115599572A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a data acquisition method, a data acquisition device, electronic equipment and a computer readable medium, and relates to the technical field of e-commerce platforms, wherein one specific embodiment comprises the steps of receiving a data acquisition request and acquiring a corresponding interface calling process identifier; determining corresponding nodes and the calling sequence of the nodes according to the interface calling flow identification; instantiating a node to generate a node object; performing parameter conversion according to the node object to obtain a target parameter; and determining the type of the node, and further acquiring corresponding data according to the type, the target parameters and the calling sequence. Accurate interface data are returned through logic design and parameter conversion, and the method supports flexible acquisition of arrangement data of a plurality of interfaces in various complex scenes, improves data acquisition efficiency and improves user experience.

Description

Data acquisition method and device, electronic equipment and computer readable medium
Technical Field
The present application relates to the field of e-commerce platform technologies, and in particular, to a data acquisition method and apparatus, an electronic device, and a computer-readable medium.
Background
At present, in an e-commerce platform, some commodities, shops and the like are recommended according to the preference of a user, and when some query keywords input by the user are detected, some service functions need to be called to achieve data acquisition and display to the user. However, some service functions need to call data of multiple interfaces to be implemented, or need to determine whether to call other interfaces according to the data calling some interfaces, which greatly reduces data acquisition efficiency. For example, the conventional recommendation flow module needs to call a recommendation interface to obtain a recommended commodity ID, a recommended video ID, a recommended list ID and a recommended shop ID, and then call a plurality of interfaces such as a commodity detail interface, a commodity price interface, a recommended video interface, a list interface and a recommended shop interface according to the IDs, so that a server side needs to write logic for calling, the research and development efficiency is reduced, and the interfaces are called for many times, so that the page loading time is increased, the data obtaining efficiency is low, and the user experience is poor.
Disclosure of Invention
In view of this, embodiments of the present application provide a data acquisition method and apparatus, an electronic device, and a computer readable medium, which can solve the problems that an existing recommendation flow module calls an interface multiple times, page loading time is increased, and data acquisition efficiency is low.
To achieve the above object, according to an aspect of an embodiment of the present application, there is provided a data acquisition method, including:
receiving a data acquisition request, and acquiring a corresponding interface calling process identifier;
determining corresponding nodes and the calling sequence of the nodes according to the interface calling flow identification;
instantiating a node to generate a node object;
performing parameter conversion according to the node object to obtain a target parameter;
and determining the type of the node, and further acquiring corresponding data according to the type, the target parameters and the calling sequence.
Optionally, performing parameter conversion according to the node object to obtain a target parameter, including:
determining corresponding input-parameter conversion scripts and output-parameter conversion scripts according to the node objects;
performing parameter entering conversion based on the parameter entering conversion script to obtain a first target parameter;
and performing parameter output conversion based on the parameter output conversion script to obtain a second target parameter.
Optionally, obtaining corresponding data according to the type, the target parameter, and the call order includes:
determining a next node list according to the calling sequence in response to the type being the starting node;
determining the number of nodes in a next node list, and further determining the process type according to the number;
and calling the corresponding process according to the process type so as to obtain the corresponding data according to the target parameter.
Optionally, determining the process type according to the number includes:
in response to the number being multiple, determining the process type to be an asynchronous multi-threaded process.
Optionally, determining the process type according to the number includes:
in response to the number being one, the process type is determined to be a single threaded process.
Optionally, determining the next node list according to the call order includes:
determining each next node identification corresponding to the starting node and the node type of each next node according to the calling sequence;
and generating a next node list corresponding to the starting node according to each next node identification and the node type of each next node.
Optionally, obtaining corresponding data according to the type, the target parameter, and the call sequence includes:
in response to the type of the judgment node or the condition node, determining a target parameter corresponding to the next node according to the calling sequence, and further acquiring corresponding data according to the target parameter corresponding to the next node;
responding to the type of the interface node, calling the corresponding interface, and determining the node associated with the interface node according to the calling sequence;
and determining the interface node and a target parameter corresponding to the node associated with the interface node, and calling an interface corresponding to the interface node to acquire corresponding data.
In addition, the present application also provides a data acquisition apparatus, including:
the receiving unit is configured to receive a data acquisition request and acquire a corresponding interface calling flow identifier;
the calling sequence determining unit is configured to determine corresponding nodes and calling sequences of the nodes according to the interface calling flow identifiers;
an instantiation unit configured to instantiate a node to generate a node object;
the parameter conversion unit is configured to perform parameter conversion according to the node object to obtain a target parameter;
and the data acquisition unit is configured to determine the type of the node and further acquire corresponding data according to the type, the target parameters and the calling sequence.
Optionally, the parameter conversion unit is further configured to:
determining corresponding input-parameter conversion scripts and output-parameter conversion scripts according to the node objects;
performing parameter entering conversion based on the parameter entering conversion script to obtain a first target parameter;
and performing parameter output conversion based on the parameter output conversion script to obtain a second target parameter.
Optionally, the data acquisition unit is further configured to:
responding to the type of the starting node, and determining a next node list according to the calling sequence;
determining the number of nodes in a next node list, and further determining the process type according to the number;
and calling the corresponding process according to the process type so as to obtain the corresponding data according to the target parameter.
Optionally, the data acquisition unit is further configured to:
in response to the number being multiple, determining the process type to be an asynchronous multi-threaded process.
Optionally, the data acquisition unit is further configured to:
in response to the number being one, determining the process type as a single threaded process.
Optionally, the data acquisition unit is further configured to:
determining each next node identifier corresponding to the starting node and the node type of each next node according to the calling sequence;
and generating a next node list corresponding to the starting node according to the identifier of each next node and the node type of each next node.
Optionally, the data acquisition unit is further configured to:
in response to the type of the judgment node or the condition node, determining a target parameter corresponding to the next node according to the calling sequence, and further acquiring corresponding data according to the target parameter corresponding to the next node;
responding to the type of the interface node, calling the corresponding interface, and determining the node associated with the interface node according to the calling sequence;
and determining the interface node and a target parameter corresponding to the node associated with the interface node, and calling an interface corresponding to the interface node to acquire corresponding data.
In addition, the present application also provides a data acquisition electronic device, including: one or more processors; a storage device for storing one or more programs which, when executed by one or more processors, cause the one or more processors to implement the data acquisition method as described above.
In addition, the present application also provides a computer readable medium, on which a computer program is stored, which when executed by a processor implements the data acquisition method as described above.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps of obtaining a corresponding interface calling process identification by receiving a data obtaining request; determining corresponding nodes and the calling sequence of the nodes according to the interface calling flow identification; instantiating a node to generate a node object; performing parameter conversion according to the node object to obtain a target parameter; and determining the type of the node, and further acquiring corresponding data according to the type, the target parameters and the calling sequence. Accurate interface data are returned through logic design and parameter conversion, and the method supports flexible acquisition of arrangement data of a plurality of interfaces in various complex scenes, improves data acquisition efficiency and improves user experience.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a further understanding of the application and are not to be construed as limiting the application. Wherein:
FIG. 1 is a schematic diagram of a main flow of a data acquisition method provided according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a main flow of a data acquisition method provided according to an embodiment of the present application;
FIG. 3 is a system architecture diagram of a data acquisition method provided in accordance with one embodiment of the present application;
fig. 4 is a node data structure diagram of a data acquisition method according to an embodiment of the present application;
FIG. 5 is a node flow diagram of a data acquisition method provided in accordance with one embodiment of the present application;
FIG. 6 is a flow chart illustrating interface arrangement of a data acquisition method according to an embodiment of the present application;
FIG. 7 is a node call graph of a data acquisition method provided in accordance with an embodiment of the present application;
FIG. 8 is a schematic diagram of the main elements of a data acquisition device according to an embodiment of the present application;
FIG. 9 is an exemplary system architecture diagram to which embodiments of the present application may be applied;
fig. 10 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness. According to the technical scheme, the data acquisition, storage, use, processing and the like meet relevant regulations of national laws and regulations.
Fig. 1 is a schematic diagram of a main flow of a data acquisition method according to an embodiment of the present application, where as shown in fig. 1, the data acquisition method includes:
step S101, receiving a data acquisition request, and acquiring a corresponding interface calling process identifier.
In this embodiment, an execution main body (for example, a server) of the data obtaining method may receive a data obtaining request in a wired connection or wireless connection manner, where the request carries an interface call flow identifier, and the interface call flow identifier is used to characterize which interfaces need to be called by data to be obtained, and a sequence of the interfaces that need to be called. Each node in the interface calling flow corresponds to an interface to be called. For example, the interface call flow identifier may be assembled from identifiers of respective interfaces to be called, such as ABCD, which represents that the interfaces a, B, C, and D are to be called in sequence to obtain data.
And S102, determining corresponding nodes and the calling sequence of the nodes according to the interface calling process identification.
The node in the embodiment of the application is used for representing an interface to be called. After obtaining the interface call flow identifier, the execution body may determine each node in the corresponding flow and a call sequence of each node in the flow execution process. Specifically, the sequence of each identifier in the interface call flow identifiers may be determined as the call sequence of each node in the flow execution process.
As another implementation manner, the execution main body may also determine the priority of each identifier in the interface call flow identifiers according to the configuration information, and determine the call sequence of each node in the flow execution process according to the priority of each identifier. Parameters required by the nodes to be called can be converted in advance by determining the calling sequence of each node in the process of executing the flow, and the data acquisition efficiency and accuracy are improved.
Step S103, instantiating the node to generate a node object.
The instantiation process consists of class name object name = new class name (parameter 1, parameter 2.., parameter n). The node object includes an entry conversion script, interface information, an exit conversion script, and the like, and the content included in the node object is not specifically limited in the embodiments of the present application.
And step S104, performing parameter conversion according to the node object to obtain a target parameter.
Specifically, the parameter conversion according to the node object to obtain the target parameter includes:
determining corresponding input-parameter conversion scripts and output-parameter conversion scripts according to the node objects;
performing parameter input conversion based on the parameter input conversion script to obtain a first target parameter; the timing of the occurrence of the access parameter conversion is to perform advanced processing on the parameters to be used by the next node before the executor is called to process the node, so as to accelerate the data acquisition rate.
And performing parameter output conversion based on the parameter output conversion script to obtain a second target parameter.
The timing of occurrence of the argument conversion is after invoking the executor processing node to convert to the output data in the target format. When a next node exists, performing entry-parameter conversion according to a script type corresponding to the next node, then calling an actuator, acquiring data according to the node type of the next node, and then performing exit-parameter conversion until the last node, so as to obtain output data in the target format, namely second target parameters.
And step S105, determining the type of the node, and further acquiring corresponding data according to the type, the target parameters and the calling sequence.
Specifically, acquiring corresponding data according to the type, the target parameter and the calling sequence includes:
and responding to the type of the judgment node or the condition node, determining a target parameter corresponding to the next node according to the calling sequence, and further acquiring corresponding data according to the target parameter corresponding to the next node.
Specifically, the target parameter corresponding to the next node (e.g., node B) may be a parameter obtained by performing the parameter entry/exit conversion again on the parameter of the previous node (e.g., performing the parameter entry/exit conversion according to the parameter entry/exit conversion script corresponding to the next node B).
Specifically, when the type of the current node is the judgment node or the condition node, the execution subject may call the corresponding execution logic program B to execute the execution logic program B according to the target parameter corresponding to the next node B to obtain the corresponding data.
And responding to the type of the interface node, calling the corresponding interface to determine the node associated with the interface node (such as the interface node D) according to the calling sequence. The associated nodes may be, for example, a previous interface node C and a next interface node E of the interface node D.
And determining the interface node and a target parameter corresponding to the node associated with the interface node, and calling an interface corresponding to the interface node to acquire corresponding data.
Target parameters required when the data is acquired through the interface nodes can be obtained through the nodes associated with the interface nodes, and the target parameters can be parameters obtained after parameter conversion is carried out by calling parameter conversion scripts corresponding to the nodes associated with the interface nodes, so that the acquired data is more accurate.
In this embodiment, a corresponding interface call flow identifier is obtained by receiving a data obtaining request; determining corresponding nodes and the calling sequence of the nodes according to the interface calling flow identification; instantiating a node to generate a node object; performing parameter conversion according to the node object to obtain a target parameter; and determining the type of the node, and further acquiring corresponding data according to the type, the target parameters and the calling sequence. Accurate interface data are returned through logic design and parameter conversion, and the method supports flexible acquisition of arrangement data of a plurality of interfaces in various complex scenes, improves data acquisition efficiency and improves user experience.
Fig. 2 is a schematic main flow chart of a data acquisition method according to an embodiment of the present application, and as shown in fig. 2, the data acquisition method includes:
step S201, receiving a data obtaining request, and obtaining a corresponding interface call flow identifier.
The data acquisition request in the embodiment of the present application may be, for example, a data acquisition request in a scenario that multiple interfaces need to be called to acquire corresponding data. The execution main body can obtain an interface calling flow identifier corresponding to one interface calling flow generated by a plurality of interfaces to be called according to needs. For example, the interface call flow identifier may be obtained by numbering the interface identifiers according to the interface call sequence.
Step S202, determining corresponding nodes and the calling sequence of the nodes according to the interface calling process identification.
In step S203, a node is instantiated to generate a node object.
After the nodes are instantiated, node objects obtained after the nodes are endowed with various parameters (such as parameter 1, parameter 2, parameter 3, \8230;, and parameter n) can be obtained. Each parameter given to a node may include an entry conversion script, interface information, an exit conversion script, and the like, and the content of each parameter given to a node is not specifically limited in the embodiment of the present application.
And step S204, performing parameter conversion according to the node object to obtain a target parameter.
The node object can obtain the parameter-entering conversion script, the parameter-exiting conversion script and the like corresponding to the node, so that the parameters used by the corresponding node can be timely converted based on the parameter-entering conversion script and the parameter-exiting conversion script, and the data acquisition efficiency and accuracy are ensured.
Step S205, determine the type of the node.
The types of nodes may include start nodes, decision nodes, condition nodes, interface nodes, and the like.
In step S206, in response to the type being the start node, a next node list is determined according to the calling order.
When the type of the node is the start node, the data acquisition logic of the next node is executed.
Specifically, determining the next node list according to the calling sequence includes:
and determining the identifier of each next node corresponding to the starting node and the node type of each next node according to the calling sequence. For example, there may be one or more next nodes in the same sequential position corresponding to the start node, and the execution subject may obtain the node identifier and the node type of the one or more next nodes in the same sequential position corresponding to the start node. The node identifier may be, for example, a node number, a node name, and the like, and the node identifier is not specifically limited in this embodiment.
And generating a next node list corresponding to the starting node according to each next node identification and the node type of each next node. And forming key value pairs by each next node identification and the corresponding node type, and further generating a next node list by each key value pair.
Step S207, determining the number of nodes in the next node list, and further determining the process type according to the number.
Specifically, determining the process type according to the number includes:
in response to the number being multiple, determining the process type to be an asynchronous multi-threaded process.
When the number of the nodes in the next node list is multiple, that is, the number exceeds one, that is, there are multiple nodes in the same sequence position in the next node list, it may be determined that the process type to be invoked is an asynchronous multithread process, that is, the execution subject may asynchronously and simultaneously invoke the execution logic of the nodes in the next node list to acquire corresponding data, so as to ensure response time.
Specifically, determining the process type according to the number includes:
in response to the number being one, determining the process type as a single threaded process.
When the number of nodes in the next node list is one, the execution subject may determine that the type of the process that needs to be invoked is a single-threaded process, so as to avoid waste of process resources.
And step S208, calling the corresponding process according to the process type so as to obtain corresponding data according to the target parameters.
When the process type is asynchronous multithreading, the execution main body can asynchronously and simultaneously call the execution logic corresponding to the node in the next node list to acquire corresponding data, and when the process type is single-threaded, the execution main body can call the single-threaded process to execute the execution logic corresponding to the node in the next node list to acquire data so as to guarantee response time.
Fig. 3 is a system architecture diagram of a data acquisition method provided in accordance with one embodiment of the present application. In the data acquisition method of the embodiment of the application, as shown in fig. 3, a system architecture diagram arranged for interfaces is arranged, stored and issued for the interfaces to be called through a web page; after the layout data is released, the stored layout data returns to the final interface data through a layout analyzer and a layout executor of the layout service according to the logic call interface. The arrangement analyzer is used for analyzing data and arranging nodes according to the analyzed data. The node types comprise a start node, an interface node, a condition node, a judgment node and an end node. A start node: the entry of the interface is called. Judging nodes: inputting: and the data of the previous node is written according to the data, and the following output is output: the result is two, true or false. Condition node: inputting: and the data of the previous node is output according to the data writing logic: and entering the next node according to the conditional logic selection. And interface nodes: inputting: the data of the previous node calls an interface and outputs: and interface data. And (4) ending the node: the exit of the interface is called. The node storage structure is shown in fig. 4 and includes: node ID, node type, administrator conversion script, next node List (node ID and node type including included node)
The orchestration executor may instantiate the orchestrated node to obtain an instantiated node, instantiate a flow according to the instantiated node, and finally execute the instantiated flow. The executor for data acquisition may perform asynchronous execution, remote Procedure Call (RPC) execution, request and response information through a hypertext Transfer Protocol (HTTP), and the like. The access parameter conversion supports three scripting languages: MVEL, freeMarker, javaScript. By way of example, each node may execute with inputs and outputs, i.e., an ingress and an egress parameter. Some nodes only need certain parameters as arguments or only certain data as a final result. For example:
node A- > node B
The data output by the node A is as follows:
Figure BDA0003920701150000111
the input of the node B requires:
Figure BDA0003920701150000112
then a conversion needs to be made: for example, the MVEL syntax is:
Figure BDA0003920701150000113
fig. 5 is a flow chart of a node. The method specifically comprises the following steps: and performing input-parameter conversion on the node module based on the input-parameter conversion script and performing output-parameter conversion on the node module based on the output-parameter conversion script.
FIG. 6 is a flowchart illustrating interface arrangement of a data acquisition method according to an embodiment of the present application.
Step 1, analyzing the arranged data, and entering step 2;
step 2, arranging nodes: arranging the calling sequence of the nodes according to the arranged calling interface flow, and entering the step 3;
step 3, instantiating each node, generating a node object which comprises an input-parameter conversion script, interface information and an output-parameter conversion script, and entering step 4;
step 4, performing entry-parameter conversion according to the selected script type, and entering step 5;
step 5, calling an actuator, processing the node, and entering the next node if the node is a starting node; if the node is a judgment node and the condition node executes command processing, if the node is an interface node, calling an interface; entering step 6;
step 6: performing exit parameter conversion according to the selected script type, and entering the step 7;
step 7, if a next node exists, entering step 4, otherwise, entering step 8;
and 8, outputting the final result.
As shown in fig. 7, the call flow diagram includes all node types, where the start node is an entry, the end node is an exit, and the interface nodes call the interfaces, asynchronously and simultaneously calling at the same sequence position, so as to ensure response time.
Fig. 8 is a schematic diagram of main units of a data acquisition apparatus according to an embodiment of the present application. As shown in fig. 8, the data acquisition apparatus 800 includes a receiving unit 801, a call order determination unit 802, an instantiation unit 803, a parameter conversion unit 804, and a data acquisition unit 805.
The receiving unit 801 is configured to receive a data obtaining request, and obtain a corresponding interface call flow identifier.
The calling order determining unit 802 is configured to determine the corresponding node and the calling order of the node according to the interface calling flow identifier.
An instantiation unit 803 configured to instantiate a node to generate a node object.
And a parameter conversion unit 804 configured to perform parameter conversion according to the node object to obtain a target parameter.
The data obtaining unit 805 is configured to determine the type of the node, and further obtain corresponding data according to the type, the target parameter, and the calling order.
In some embodiments, the parameter conversion unit 804 is further configured to: determining corresponding input-parameter conversion scripts and output-parameter conversion scripts according to the node objects; performing parameter entering conversion based on the parameter entering conversion script to obtain a first target parameter; and performing parameter output conversion based on the parameter output conversion script to obtain a second target parameter.
In some embodiments, the data acquisition unit 805 is further configured to: responding to the type of the starting node, and determining a next node list according to the calling sequence; determining the number of nodes in a next node list, and further determining the process type according to the number; and calling the corresponding process according to the process type so as to obtain the corresponding data according to the target parameter.
In some embodiments, the data acquisition unit 805 is further configured to: in response to the number being multiple, determining the process type to be an asynchronous multithreaded process.
In some embodiments, the data acquisition unit 805 is further configured to: in response to the number being one, determining the process type as a single threaded process.
In some embodiments, the data acquisition unit 805 is further configured to: determining each next node identification corresponding to the starting node and the node type of each next node according to the calling sequence; and generating a next node list corresponding to the starting node according to each next node identification and the node type of each next node.
In some embodiments, the data acquisition unit 805 is further configured to: in response to the type of the judgment node or the condition node, determining a target parameter corresponding to the next node according to the calling sequence, and further acquiring corresponding data according to the target parameter corresponding to the next node; responding to the type of the interface node, calling the corresponding interface, and determining the node associated with the interface node according to the calling sequence; and determining the interface node and a target parameter corresponding to the node associated with the interface node, and then calling an interface corresponding to the interface node to acquire corresponding data.
It should be noted that the data acquisition method and the data acquisition apparatus of the present application have corresponding relation in the specific implementation content, and therefore, the repeated content is not described again.
Fig. 9 shows an exemplary system architecture 900 to which the data acquisition method or the data acquisition apparatus of the embodiments of the present application may be applied.
As shown in fig. 9, the system architecture 900 may include end devices 901, 902, 903, a network 904, and a server 905. Network 904 is the medium used to provide communication links between terminal devices 901, 902, 903 and server 905. Network 904 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 901, 902, 903 to interact with a server 905 over a network 904 to receive or send messages and the like. The terminal devices 901, 902, 903 may have installed thereon various messenger client applications such as, for example only, a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc.
The terminal devices 901, 902, 903 may be various electronic devices having data acquisition processing screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 905 may be a server providing various services, such as a background management server (for example only) providing support for data acquisition requests submitted by users using the terminal devices 901, 902, 903. The background management server can receive the data acquisition request and acquire a corresponding interface calling flow identifier; determining corresponding nodes and the calling sequence of the nodes according to the interface calling flow identification; instantiating a node to generate a node object; performing parameter conversion according to the node object to obtain a target parameter; and determining the type of the node, and further acquiring corresponding data according to the type, the target parameters and the calling sequence. Accurate interface data are returned through logic design and parameter conversion, and the method supports flexible acquisition of arrangement data of a plurality of interfaces in various complex scenes, improves data acquisition efficiency and improves user experience.
It should be noted that the data acquisition method provided in the embodiment of the present application is generally executed by the server 905, and accordingly, the data acquisition apparatus is generally disposed in the server 905.
It should be understood that the number of terminal devices, networks, and servers in fig. 9 are merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 10, shown is a block diagram of a computer system 1000 suitable for use in implementing a terminal device of an embodiment of the present application. The terminal device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 10, the computer system 1000 includes a Central Processing Unit (CPU) 1001 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage section 1008 into a Random Access Memory (RAM) 1003. In the RAM1003, various programs and data necessary for the operation of the computer system 1000 are also stored. The CPU1001, ROM1002, and RAM1003 are connected to each other via a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
The following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output section 1007 including a display such as a Cathode Ray Tube (CRT), a liquid crystal credit authorization query processor (LCD), and the like, and a speaker; a storage portion 1008 including a hard disk and the like; and a communication section 1009 including a network interface card such as a LAN card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. A drive 1010 is also connected to the I/O interface 1005 as necessary. A removable medium 1011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1010 as necessary, so that a computer program read out therefrom is mounted into the storage section 1008 as necessary.
In particular, according to embodiments disclosed herein, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments disclosed herein include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication part 1009 and/or installed from the removable medium 1011. The computer program performs the above-described functions defined in the system of the present application when executed by the Central Processing Unit (CPU) 1001.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, which may be described as: a processor includes a receiving unit, a call order determining unit, an instantiating unit, a parameter converting unit, and a data acquiring unit. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs, and when the one or more programs are executed by one device, the device receives a data acquisition request and acquires a corresponding interface call flow identifier; determining corresponding nodes and the calling sequence of the nodes according to the interface calling flow identification; instantiating a node to generate a node object; performing parameter conversion according to the node object to obtain a target parameter; and determining the type of the node, and further acquiring corresponding data according to the type, the target parameters and the calling sequence.
According to the technical scheme of the embodiment of the application, accurate interface data are returned through logic design and parameter conversion, the arrangement data of a plurality of interfaces can be flexibly acquired under various complex scenes, the data acquisition efficiency is improved, and the user experience is improved.
The above-described embodiments are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (12)

1. A method of data acquisition, comprising:
receiving a data acquisition request, and acquiring a corresponding interface calling process identifier;
determining a corresponding node and a calling sequence of the node according to the interface calling flow identification;
instantiating the node to generate a node object;
performing parameter conversion according to the node object to obtain a target parameter;
and determining the type of the node, and further acquiring corresponding data according to the type, the target parameter and the calling sequence.
2. The method of claim 1, wherein the performing parameter transformation according to the node object to obtain a target parameter comprises:
determining corresponding input-parameter conversion scripts and output-parameter conversion scripts according to the node objects;
performing parameter entering conversion based on the parameter entering conversion script to obtain a first target parameter;
and performing parameter output conversion based on the parameter output conversion script to obtain a second target parameter.
3. The method of claim 1, wherein said obtaining corresponding data according to said type, said target parameter, and said calling order comprises:
responding to the type as a starting node, and determining a next node list according to the calling sequence;
determining the number of nodes in the next node list, and further determining the process type according to the number;
and calling a corresponding process according to the process type so as to obtain corresponding data according to the target parameter.
4. The method of claim 3, wherein determining the process type based on the quantity comprises:
in response to the number being multiple, determining the process type to be an asynchronous multithreaded process.
5. The method of claim 3, wherein determining the process type based on the quantity comprises:
and in response to the number being one, determining that the process type is a single-threaded process.
6. The method of claim 3, wherein determining the next node list according to the call order comprises:
determining each next node identification corresponding to the starting node and the node type of each next node according to the calling sequence;
and generating a next node list corresponding to the starting node according to the identifiers of the next nodes and the node types of the next nodes.
7. The method of claim 1, wherein the obtaining corresponding data according to the type, the target parameter, and the calling order comprises:
responding to the type of the judgment node or the condition node, determining a target parameter corresponding to a next node according to the calling sequence, and further acquiring corresponding data according to the target parameter corresponding to the next node;
responding to the type as an interface node, calling a corresponding interface, and determining a node associated with the interface node according to the calling sequence;
and determining the interface node and a target parameter corresponding to the node associated with the interface node, and then calling an interface corresponding to the interface node to acquire corresponding data.
8. A data acquisition apparatus, comprising:
the receiving unit is configured to receive the data acquisition request and acquire a corresponding interface call flow identifier;
the calling sequence determining unit is configured to determine corresponding nodes and calling sequences of the nodes according to the interface calling flow identifiers;
an instantiation unit configured to instantiate the node to generate a node object;
the parameter conversion unit is configured to perform parameter conversion according to the node object so as to obtain a target parameter;
and the data acquisition unit is configured to determine the type of the node and further acquire corresponding data according to the type, the target parameters and the calling sequence.
9. The apparatus of claim 8, wherein the parameter conversion unit is further configured to:
determining corresponding input-parameter conversion scripts and output-parameter conversion scripts according to the node objects;
performing parameter entering conversion based on the parameter entering conversion script to obtain a first target parameter;
and performing parameter output conversion based on the parameter output conversion script to obtain a second target parameter.
10. The apparatus of claim 8, wherein the data acquisition unit is further configured to:
responding to the type as a starting node, and determining a next node list according to the calling sequence;
determining the number of nodes in the next node list, and further determining the process type according to the number;
and calling a corresponding process according to the process type so as to obtain corresponding data according to the target parameter.
11. A data acquisition electronic device, comprising:
one or more processors;
a storage device to store one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-7.
12. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202211354928.0A 2022-11-01 2022-11-01 Data acquisition method and device, electronic equipment and computer readable medium Pending CN115599572A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211354928.0A CN115599572A (en) 2022-11-01 2022-11-01 Data acquisition method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211354928.0A CN115599572A (en) 2022-11-01 2022-11-01 Data acquisition method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN115599572A true CN115599572A (en) 2023-01-13

Family

ID=84850793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211354928.0A Pending CN115599572A (en) 2022-11-01 2022-11-01 Data acquisition method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN115599572A (en)

Similar Documents

Publication Publication Date Title
US11210131B2 (en) Method and apparatus for assigning computing task
CN111338623B (en) Method, device, medium and electronic equipment for developing user interface
CN113076153B (en) Interface calling method and device
US11934287B2 (en) Method, electronic device and computer program product for processing data
CN109582317B (en) Method and apparatus for debugging hosted applications
CN109062560B (en) Method and apparatus for generating information
CN111131356A (en) Method and apparatus for generating information
CN115794262A (en) Task processing method, device, equipment, storage medium and program product
CN113760488A (en) Method, device, equipment and computer readable medium for scheduling task
CN113282444A (en) Visualization method and device for business process debugging
CN112052152A (en) Simulation test method and device
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN111125503A (en) Method and apparatus for generating information
CN108804442B (en) Serial number generation method and device
CN115599572A (en) Data acquisition method and device, electronic equipment and computer readable medium
CN115525411A (en) Method, device, electronic equipment and computer readable medium for processing service request
CN113760274B (en) Front-end assembly logic injection method and device
CN111131354B (en) Method and apparatus for generating information
CN109840073B (en) Method and device for realizing business process
CN113779018A (en) Data processing method and device
CN112765022A (en) Webshell static detection method based on data stream and electronic device
CN113760487A (en) Service processing method and device
CN112860447A (en) Interaction method and system between different applications
CN113468041A (en) Interface comparison test method and device
CN111767447A (en) Method and device for determining user traffic path

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination