CN117472430A - Data acquisition method, device, equipment and computer storage medium - Google Patents

Data acquisition method, device, equipment and computer storage medium Download PDF

Info

Publication number
CN117472430A
CN117472430A CN202311575965.9A CN202311575965A CN117472430A CN 117472430 A CN117472430 A CN 117472430A CN 202311575965 A CN202311575965 A CN 202311575965A CN 117472430 A CN117472430 A CN 117472430A
Authority
CN
China
Prior art keywords
interface
target
configuration file
parameter
data
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
CN202311575965.9A
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202311575965.9A priority Critical patent/CN117472430A/en
Publication of CN117472430A publication Critical patent/CN117472430A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a data acquisition method, a device, equipment and a computer storage medium. Relates to the technical field of big data, and the method comprises the following steps: receiving first call request information of a target interface sent by a front end; acquiring a configuration file corresponding to the configuration file identifier; if the configuration file is detected to comprise the parameter processing information of the first interface parameter, the first interface parameter is processed according to the parameter processing information to obtain a second interface parameter; calling a target interface according to an interface calling path by using the second interface parameter to acquire first target data; if the configuration file is detected to comprise data processing information of the first target data, the first target data is processed according to the data processing information to obtain second target data; and sending the second target data to the front end. Each call only needs to detect whether the configuration file comprises processing information, so that excessive resources are not wasted, codes are not required to be written for each interface, redundancy of the codes is avoided, and maintenance cost is reduced.

Description

Data acquisition method, device, equipment and computer storage medium
Technical Field
The application belongs to the technical field of big data, and particularly relates to a data acquisition method, a device, equipment and a computer storage medium.
Background
The digital real estate channel service module is an application for providing data interface support for the applet and the public platform website, and the data come from a plurality of different applications, and a large number of interface calls are needed to realize the acquisition of the data.
In the prior art, codes are required to be developed for each interface, so that not only is the waste of resources caused, but also a large amount of code redundancy is caused, and the maintenance cost is high.
Disclosure of Invention
The embodiment of the application provides a data acquisition method, device, equipment and computer storage medium, which acquire data required by a user by detecting whether a configuration file of a target interface comprises parameter processing information of the interface and data processing information of the acquired data, and the data are not required to be modified by developing codes for each interface, and only whether the configuration file comprises the processing information is required to be detected for each call, so that excessive resources are not wasted, codes are not required to be written for each interface, redundancy of the codes is avoided, and maintenance cost is reduced.
In a first aspect, an embodiment of the present application provides a method for acquiring data, where the method includes:
receiving first call request information of a target interface sent by a front end, wherein the first call request information comprises first interface parameters and configuration file identifiers of the target interface;
acquiring a configuration file corresponding to the configuration file identifier, wherein the configuration file comprises an interface calling path of a target interface;
detecting whether the configuration file comprises parameter processing information of a first interface parameter of the target interface, and if the configuration file is detected to comprise the parameter processing information of the first interface parameter, processing the first interface parameter according to the parameter processing information to obtain a second interface parameter, wherein the second interface parameter is an interface parameter applicable to the target interface;
calling a target interface according to an interface calling path by using the second interface parameter to acquire first target data;
detecting whether the configuration file comprises data processing information of the first target data, and if so, processing the first target data according to the data processing information to obtain second target data;
and sending the second target data to the front end.
In one possible implementation embodiment, receiving first call request information of a target interface sent by a front end includes:
receiving second call request information of a target interface sent by a front end, wherein the second call request information comprises an interface identifier and a configuration file identifier of the target interface;
and acquiring a first interface parameter corresponding to the interface identifier.
In one possible implementation embodiment, before receiving the first call request information of the target interface sent by the front end, the method further includes:
acquiring configuration information;
and writing the configuration information into the configuration file.
In one possible implementation embodiment, the method further includes:
if the configuration file is detected to not comprise the parameter processing information of the first interface parameter, the first interface parameter is utilized to call the target interface according to the interface call path, and the first target data is obtained.
In one possible implementation embodiment, the method further includes:
and if the configuration file is detected to not comprise the data processing information of the first target data, sending the first target data to the front end.
In a second aspect, an embodiment of the present application provides a data acquisition apparatus, including:
the receiving module is used for receiving first call request information of the target interface sent by the front end, wherein the first call request information comprises first interface parameters and configuration file identifiers of the target interface;
the acquisition module is used for acquiring a configuration file corresponding to the configuration file identifier, wherein the configuration file comprises an interface calling path of the target interface;
the detection module is used for detecting whether the configuration file comprises parameter processing information of a first interface parameter of the target interface, if the configuration file is detected to comprise the parameter processing information of the first interface parameter, the first interface parameter is processed according to the parameter processing information to obtain a second interface parameter, and the second interface parameter is an interface parameter applicable to the target interface;
the calling module is used for calling the target interface according to the interface calling path by using the second interface parameters to acquire first target data;
the detection module is further used for detecting whether the configuration file comprises data processing information of the first target data, and if the configuration file is detected to comprise the data processing information of the first target data, the first target data is processed according to the data processing information to obtain second target data;
and the sending module is used for sending the second target data to the front end.
In one possible implementation, the receiving module is specifically configured to:
receiving second call request information of a target interface sent by a front end, wherein the second call request information comprises an interface identifier and a configuration file identifier of the target interface;
and acquiring a first interface parameter corresponding to the interface identifier.
In one possible implementation embodiment, the apparatus further includes:
the acquisition module is also used for acquiring configuration information before receiving the first call request information of the target interface sent by the front end;
and the writing module is used for writing the configuration information into the configuration file.
In one possible implementation embodiment, the method further includes:
and the calling module is also used for calling the target interface by using the first interface parameter according to the interface calling path to acquire the first target data if the configuration file is detected to not comprise the parameter processing information of the first interface parameter.
In one possible implementation embodiment, the method further includes:
and the sending module is also used for sending the first target data to the front end if the configuration file is detected to not comprise the data processing information of the first target data.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the method for acquiring data according to any one of the above.
In a fourth aspect, embodiments of the present application provide a computer storage medium having stored thereon computer program instructions that when executed by a processor implement a method for acquiring data according to any one of the above.
In a fifth aspect, embodiments of the present application provide a computer program product, where instructions in the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the method for acquiring data according to any one of the above.
The data acquisition method, device, equipment and computer storage medium of the embodiment of the application comprise the following steps: receiving first call request information of a target interface sent by a front end, wherein the first call request information comprises first interface parameters and configuration file identifiers of the target interface; acquiring a configuration file corresponding to the configuration file identifier, wherein the configuration file comprises an interface calling path of a target interface; detecting whether the configuration file comprises parameter processing information of a first interface parameter of the target interface, and if the configuration file is detected to comprise the parameter processing information of the first interface parameter, processing the first interface parameter according to the parameter processing information to obtain a second interface parameter, wherein the second interface parameter is an interface parameter applicable to the target interface; calling a target interface according to an interface calling path by using the second interface parameter to acquire first target data; detecting whether the configuration file comprises data processing information of the first target data, and if so, processing the first target data according to the data processing information to obtain second target data; and sending the second target data to the front end. Therefore, whether the configuration file of the target interface comprises the parameter processing information of the interface and the data processing information of the acquired data are detected, the data required by the user are acquired, the code is not required to be developed for each interface for modification, whether the configuration file comprises the processing information or not is only required to be detected for each call, excessive resources are not wasted, the code is not required to be written for each interface, the redundancy of the code is avoided, and the maintenance cost is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described, and it is possible for a person skilled in the art to obtain other drawings according to these drawings without inventive effort.
FIG. 1 is a flow chart of a method for acquiring data according to one embodiment of the present application;
FIG. 2 is a flow chart of a method for acquiring data according to another embodiment of the present application;
fig. 3 is a flowchart of a method for acquiring data according to another embodiment of the present application;
FIG. 4 is a schematic structural diagram of a data acquisition device according to still another embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to still another embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application are described in detail below to make the objects, technical solutions and advantages of the present application more apparent, and to further describe the present application in conjunction with the accompanying drawings and the detailed embodiments. It should be understood that the specific embodiments described herein are intended to be illustrative of the application and are not intended to be limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by showing examples of the present application.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It should be noted that, in the embodiment of the present application, the data acquisition, storage, use, processing, etc. all conform to relevant regulations of national laws and regulations.
The digital real estate channel service module is an application for providing data interface support for the applet and the public platform website, and the data come from a plurality of different applications, and a large number of interface calls are needed to realize the acquisition of the data.
In the prior art, codes are required to be developed for each interface, redundant codes are added for each new interface, and the interface is called through updating the interface, so that time and labor are wasted, resource waste is caused, system paralysis is possibly caused when the resource waste is serious, and a large amount of code redundancy is caused. In addition, as interfaces are increased, more codes need to be maintained, a great deal of time and resources are needed to be input for the maintenance of the codes, the maintenance cost is high, and more unstable factors exist in the system.
In order to solve the problems in the prior art, embodiments of the present application provide a method, an apparatus, a device, and a computer storage medium for acquiring data. The method for acquiring data provided in the embodiments of the present application will be described first.
Fig. 1 is a flow chart illustrating a method for acquiring data according to an embodiment of the present application.
As shown in fig. 1, the method for acquiring data provided in the embodiment of the present application includes the following steps.
S110, receiving first call request information of a target interface sent by a front end, wherein the first call request information comprises first interface parameters and a configuration file identifier of the target interface.
In some embodiments, the front end may acquire data through the target interface, and the first call request information of the target interface sent by the front end includes a first interface parameter and a configuration file identifier of the target interface. Here, the first interface parameter is an interface parameter of the target interface in the front end, and the configuration file identifier is an identifier of the configuration file. The configuration file comprises configuration information required by calling the target interface. The profile identification uniquely identifies a profile.
In some embodiments, the first call request information of the target interface sent by the front end is received via a hypertext transfer protocol (HyperText Transfer Protocol, HTTP).
S120, acquiring a configuration file corresponding to the configuration file identifier, wherein the configuration file comprises an interface calling path of the target interface.
In some embodiments, the corresponding profile is obtained from the profile identification. Wherein the configuration file is stored in the data storage module.
In some embodiments, a profile acquisition request is sent to the data storage module, the acquisition request including a profile identification, and the data storage module returns a profile corresponding to the profile identification.
In some embodiments, the configuration file includes an interface call path of the target interface, and may further include processing information and data processing information of the first interface parameter. Here, the profile is determined in advance, and may be a profile input by a user.
S130, detecting whether the configuration file comprises parameter processing information of a first interface parameter of the target interface, and if the configuration file is detected to comprise the parameter processing information of the first interface parameter, processing the first interface parameter according to the parameter processing information to obtain a second interface parameter, wherein the second interface parameter is an interface parameter applicable to the target interface.
In some embodiments, whether the configuration file includes parameter processing information of a first interface parameter of the target interface is detected, if the configuration file is detected to include the parameter processing information of the first interface parameter, it is indicated that the first interface parameter cannot call the target interface correctly, the first interface parameter needs to be processed according to the parameter processing information, and the obtained second interface parameter is the interface parameter used by the target interface. The parameter processing information may include processing information of parameter specifications, compiling processing information, parameter format processing information, or the like, and is not particularly limited herein. The parameter processing information may be a filter attribute and may include at least one piece of processing information.
In some embodiments, the first interface parameter is processed using a code file corresponding to the parameter processing information. The code file may be, but is not limited to, a java class.
S140, calling a target interface according to the interface calling path by using the second interface parameters to acquire first target data.
In some embodiments, using the second interface parameter obtained after processing, according to the interface call path, initiating HTTP protocol call, and calling the target interface to obtain the first target data. For example, the first target data includes json-format data. Here, the second interface parameter is an interface parameter to which the target interface is applicable.
S150, detecting whether the configuration file comprises data processing information of the first target data, and if the configuration file is detected to comprise the data processing information of the first target data, processing the first target data according to the data processing information to obtain second target data.
In some embodiments, whether the configuration file includes data processing information of the first target data is detected, if the configuration file is detected to include the data processing information of the first target data, it is indicated that the first target data is not data required by a user, the first target data needs to be processed, and the first target data is processed according to the data processing information to obtain the second target data. The data processing information may include calculation rules such as mean, variance, etc., substitution rules, deletion rules, etc., and is not particularly limited herein. The data processing information may be a filter attribute and may include at least one piece of processing information.
S160, sending the second target data to the front end.
In some embodiments, the second target data is sent to the front end via the HTTP protocol.
Therefore, whether the configuration file of the target interface comprises the parameter processing information of the interface and the data processing information of the acquired data are detected, the data required by a user are acquired, the code is not required to be developed for each interface for modification, whether the configuration file comprises the processing information or not is only required to be detected for each call, excessive resources are not wasted, the code is not required to be written for each interface, the redundancy of the code is avoided, and the maintenance cost is reduced.
Based on this, in some embodiments, as shown in fig. 2, the S110 may specifically include:
s111, receiving second call request information of a target interface sent by a front end, wherein the second call request information comprises an interface identifier and a configuration file identifier of the target interface;
s112, acquiring a first interface parameter corresponding to the interface identifier.
In some embodiments, the second call request information of the target interface sent by the front end is received through an HTTP protocol.
In some embodiments, the data storage module stores a first interface parameter corresponding to the interface identifier sent by the front end. And under the condition that second call request information of the target interface sent by the front end is received, acquiring a first interface parameter corresponding to the interface identifier.
Therefore, the interface parameter is not required to be sent again when the interface is called each time, and the interface parameter is acquired through the interface identifier sent by the front end, so that the transmission pressure of data is reduced.
Based on this, in some embodiments, before the above S110, the method may further include:
acquiring configuration information;
and writing the configuration information into the configuration file.
In some embodiments, an interface call path of an interface to be invoked is written in a configuration file in advance, configuration information is received, and the configuration information may include the interface call path. If the interface parameters of the interface need to be modified, the configuration information may further include parameter processing information of the interface parameters. The parameter processing information is information input by a user and can be set according to the needs of the user. For example, the parameter processing information includes setting the interface parameter to be an interface parameter satisfying an interface parameter specification, modifying the interface parameter by using the interface parameter specification, wherein the modified interface parameter is an interface parameter to which the interface can be applied; alternatively, the parameter processing information may be an interface parameter that processes an interface parameter into a target format, the processed interface parameter being an interface parameter to which the interface is applicable, and so on. If the acquired data needs to be processed, the configuration information may further include data processing information. The data processing information is information input by a user and can be set according to the needs of the user. For example, the data processing information includes calculating the mean, variance, sum, etc. of the target line data; or replacing the data of the target location with the target field; or delete data of the target location, etc.
In some embodiments, configuration information entered by a user is received and written to a configuration file.
In some embodiments, after the target system is started, the configuration file is read, and the configuration information in the configuration file is stored in the data storage module.
In this way, the configuration information in the configuration file can be customized or modified according to the requirements of the user, so that the requirements of the user are met, and the experience of the user is improved; and the data required by the user can be obtained by modifying the configuration file, so that the redundancy of the setting codes when each interface is called is avoided, and the later maintenance cost is reduced.
Based on this, in some embodiments, the method may further comprise:
if the configuration file is detected to not comprise the parameter processing information of the first interface parameter, the first interface parameter is utilized to call the target interface according to the interface call path, and the first target data is obtained.
In some embodiments, if it is detected that the configuration file does not include the parameter processing information of the first interface parameter, which indicates that the configuration file does not include the filter attribute, and the first interface parameter does not need to be processed, the first interface parameter is utilized to call the target interface according to the interface call path, so as to obtain the first target data.
In some embodiments, if the first target data cannot be acquired using the first interface parameter, the target information is sent to the front end for notifying the user of the failure to acquire the data.
Thus, the target interface can be called based on the first interface parameter, and the first target data can be acquired.
Based on this, in some embodiments, the method may further comprise:
and if the configuration file is detected to not comprise the data processing information of the first target data, sending the first target data to the front end.
In some embodiments, if the configuration file is detected to not include the data processing information of the first target data, which indicates that the acquisition of the large first target data does not need to be processed, the first target data may be directly sent to the front end.
In this way, the first target data can be directly acquired without the user having to process the first target data.
In the embodiment provided in the present application, as shown in fig. 3, configuration information of an interface to be invoked is written in a configuration file in advance. After the target system is started, the configuration file is read, configuration information in the configuration file is all stored in the data storage module, and the starting success is indicated under the condition that the configuration information is all stored in the data storage module. And under the condition that the first interface parameter and the configuration file identifier sent by the front end are received through the HTTP protocol, acquiring configuration information in the configuration file corresponding to the configuration file identifier. The configuration file includes an interface call path of the target interface. Detecting whether the configuration file comprises parameter processing information of a first interface parameter of the target interface, if the configuration file is detected to comprise the parameter processing information of the first interface parameter, processing the first interface parameter according to the parameter processing information to obtain a second interface parameter, and calling the target interface to obtain first target data by using the second interface parameter according to an interface calling path and initiating HTTP (hyper text transport protocol) protocol; if the configuration file is detected to not comprise the parameter processing information of the first interface parameter, the first interface parameter is utilized to initiate HTTP protocol call according to the interface call path, and a target interface is called to acquire first target data. Detecting whether the configuration file comprises data processing information of the first target data, if so, processing the first target data according to the data processing information to obtain second target data, and transmitting the second target data to the front end; and if the configuration file is detected to not comprise the data processing information of the first target data, sending the first target data to the front end. The data needed by the user is acquired by detecting whether the configuration file of the target interface comprises the parameter processing information of the interface and the data processing information of the acquired data, the code is not required to be developed for each interface for modification, and each call only needs to detect whether the configuration file comprises the processing information, so that excessive resources are not wasted, the code is not required to be written for each interface, the redundancy of the code is avoided, and the maintenance cost is reduced.
Based on the data acquisition method provided by the embodiment, correspondingly, the application also provides a specific implementation mode of the data acquisition device. Please refer to the following examples.
Referring to fig. 4, a data acquisition apparatus 400 provided in an embodiment of the present application includes:
a receiving module 410, configured to receive first call request information of a target interface sent by a front end, where the first call request information includes a first interface parameter and a configuration file identifier of the target interface;
the obtaining module 420 is configured to obtain a configuration file corresponding to the configuration file identifier, where the configuration file includes an interface call path of the target interface;
the detection module 430 is configured to detect whether the configuration file includes parameter processing information of a first interface parameter of the target interface, and if it is detected that the configuration file includes parameter processing information of the first interface parameter, process the first interface parameter according to the parameter processing information to obtain a second interface parameter, where the second interface parameter is an interface parameter applicable to the target interface;
a calling module 440, configured to call the target interface according to the interface call path by using the second interface parameter, so as to obtain first target data;
the detection module 430 is further configured to detect whether the configuration file includes data processing information of the first target data, and if it is detected that the configuration file includes the data processing information of the first target data, process the first target data according to the data processing information to obtain second target data;
and a sending module 450, configured to send the second target data to the front end.
Based on this, in some embodiments, the receiving module 410 is specifically configured to:
receiving second call request information of a target interface sent by a front end, wherein the second call request information comprises an interface identifier and a configuration file identifier of the target interface;
and acquiring a first interface parameter corresponding to the interface identifier.
Based on this, in some embodiments, the apparatus 400 may further include:
the obtaining module 420 is further configured to obtain configuration information before receiving the first call request information of the target interface sent by the front end;
and the writing module is used for writing the configuration information into the configuration file.
Based on this, in some embodiments, the apparatus 400 may further include:
the calling module 440 is further configured to, if it is detected that the configuration file does not include the parameter processing information of the first interface parameter, call the target interface according to the interface call path by using the first interface parameter, and obtain the first target data.
Based on this, in some embodiments, the apparatus 400 may further include:
the sending module 450 is further configured to send the first target data to the front end if it is detected that the configuration file does not include the data processing information of the first target data.
The modules of the data acquisition device provided in the embodiment of the present application may implement the functions of the steps of the data acquisition method provided in the foregoing, and may achieve the corresponding technical effects, which are not described herein for brevity.
Based on the same inventive concept, the embodiment of the application also provides electronic equipment.
Fig. 5 shows a schematic hardware structure of an electronic device according to an embodiment of the present application.
A processor 501 and a memory 502 storing computer program instructions may be included in an electronic device.
In particular, the processor 501 may include a central processing unit (Central Processing Unit, CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits of embodiments of the present application.
Memory 502 may include mass storage for data or instructions. By way of example, and not limitation, memory 502 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. Memory 502 may include removable or non-removable (or fixed) media, where appropriate. Memory 502 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 502 is a non-volatile solid state memory.
The Memory may include Read Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk storage media devices, optical storage media devices, flash Memory devices, electrical, optical, or other physical/tangible Memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors) it is operable to perform the operations described with reference to methods in accordance with aspects of the present disclosure.
The processor 501 implements the method of acquiring data according to any one of the above embodiments by reading and executing the computer program instructions stored in the memory 502.
In one example, the electronic device may also include a communication interface 503 and a bus 510. As shown in fig. 5, the processor 501, the memory 502, and the communication interface 503 are connected to each other by a bus 510 and perform communication with each other.
The communication interface 503 is mainly used to implement communication between each module, apparatus, unit and/or device in the embodiments of the present application.
Bus 510 includes hardware, software, or both that couple components of the electronic device to one another. By way of example, and not limitation, the buses may include an accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics Bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) Bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (Industry Standard Architecture, ISA) Bus, an Infiniband interconnect, a low pin count (Linear Predictive Coding, LPC) Bus, a memory Bus, a micro channel architecture (MicroChannel Architecture, MCa) Bus, a peripheral component interconnect (Peripheral Component Interconnect, PCI) Bus, a PCI-Express (Peripheral Component Interconnect-X, PCI-X) Bus, a serial advanced technology attachment (Serial Advanced Technology Attachment, SATA) Bus, a video electronics standards association Local Bus (VLB) Bus, or other suitable Bus, or a combination of two or more of these. Bus 510 may include one or more buses, where appropriate. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect. The electronic device can execute the data acquisition method in the embodiment of the invention, thereby realizing the data acquisition method.
In addition, in combination with the data acquisition method in the above embodiment, the embodiment of the application may be implemented by providing a computer storage medium. The computer storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement a method of acquiring data according to any of the above embodiments.
The present application also provides a computer program product, where instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform various processes for implementing any one of the data acquisition method embodiments described above.
It should be clear that the present application is not limited to the particular arrangements and processes described above and illustrated in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps, after appreciating the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transfer information. Examples of machine-readable media include electronic circuitry, semiconductor Memory devices, read-Only Memory (ROM), flash Memory, erasable Read-Only Memory (Erasable Read Only Memory, EROM), floppy disks, compact discs (Compact Disc Read-Only Memory, CD-ROM), optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and the like. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be different from the order in the embodiments, or several steps may be performed simultaneously.
Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to being, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware which performs the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the foregoing, only the specific embodiments of the present application are described, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, which are intended to be included in the scope of the present application.

Claims (13)

1. A method of obtaining data, comprising:
receiving first call request information of a target interface sent by a front end, wherein the first call request information comprises first interface parameters and a configuration file identifier of the target interface;
acquiring a configuration file corresponding to the configuration file identifier, wherein the configuration file comprises an interface calling path of a target interface;
detecting whether the configuration file comprises parameter processing information of the first interface parameter of the target interface or not, and if the configuration file is detected to comprise the parameter processing information of the first interface parameter, processing the first interface parameter according to the parameter processing information to obtain a second interface parameter, wherein the second interface parameter is an interface parameter applicable to the target interface;
calling the target interface according to the interface calling path by using the second interface parameter to acquire first target data;
detecting whether the configuration file comprises data processing information of the first target data, and if the configuration file is detected to comprise the data processing information of the first target data, processing the first target data according to the data processing information to obtain second target data;
and sending the second target data to the front end.
2. The method of claim 1, wherein the receiving the first call request information of the target interface sent by the front end includes:
receiving second call request information of a target interface sent by a front end, wherein the second call request information comprises an interface identifier and a configuration file identifier of the target interface;
and acquiring a first interface parameter corresponding to the interface identifier.
3. The method for acquiring data according to claim 1, wherein before receiving the first call request information of the target interface sent by the front end, the method further comprises:
acquiring configuration information;
and writing the configuration information into the configuration file.
4. The method for acquiring data according to claim 1, further comprising:
and if the configuration file is detected to not comprise the parameter processing information of the first interface parameter, calling the target interface according to the interface calling path by utilizing the first interface parameter to acquire first target data.
5. The method for acquiring data according to claim 1, further comprising:
and if the configuration file is detected to not comprise the data processing information of the first target data, sending the first target data to the front end.
6. A data acquisition apparatus, comprising:
the receiving module is used for receiving first call request information of a target interface sent by the front end, wherein the first call request information comprises first interface parameters and a configuration file identifier of the target interface;
the acquisition module is used for acquiring a configuration file corresponding to the configuration file identifier, wherein the configuration file comprises an interface calling path of a target interface;
the detection module is used for detecting whether the configuration file comprises parameter processing information of the first interface parameter of the target interface, if so, processing the first interface parameter according to the parameter processing information to obtain a second interface parameter, wherein the second interface parameter is an interface parameter applicable to the target interface;
the calling module is used for calling the target interface according to the interface calling path by utilizing the second interface parameter to acquire first target data;
the detection module is further configured to detect whether the configuration file includes data processing information of the first target data, and if it is detected that the configuration file includes the data processing information of the first target data, process the first target data according to the data processing information to obtain second target data;
and the sending module is used for sending the second target data to the front end.
7. The apparatus according to claim 6, wherein the receiving module is specifically configured to:
receiving second call request information of a target interface sent by a front end, wherein the second call request information comprises an interface identifier and a configuration file identifier of the target interface;
and acquiring a first interface parameter corresponding to the interface identifier.
8. The apparatus for acquiring data according to claim 6, wherein the apparatus further comprises:
the acquisition module is further used for acquiring configuration information before receiving the first call request information of the target interface sent by the front end;
and the writing module is used for writing the configuration information into the configuration file.
9. The apparatus for acquiring data according to claim 6, further comprising:
and the calling module is further configured to, if it is detected that the configuration file does not include the parameter processing information of the first interface parameter, call the target interface according to the interface calling path by using the first interface parameter, and obtain first target data.
10. The apparatus for acquiring data according to claim 6, further comprising:
the sending module is further configured to send the first target data to the front end if it is detected that the configuration file does not include data processing information of the first target data.
11. An electronic device, the device comprising: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements a method for acquiring data according to any one of claims 1-5.
12. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon computer program instructions, which when executed by a processor, implement a method of acquiring data according to any of claims 1-5.
13. A computer program product, characterized in that instructions in the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the data acquisition method according to any one of claims 1-5.
CN202311575965.9A 2023-11-23 2023-11-23 Data acquisition method, device, equipment and computer storage medium Pending CN117472430A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311575965.9A CN117472430A (en) 2023-11-23 2023-11-23 Data acquisition method, device, equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311575965.9A CN117472430A (en) 2023-11-23 2023-11-23 Data acquisition method, device, equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN117472430A true CN117472430A (en) 2024-01-30

Family

ID=89629007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311575965.9A Pending CN117472430A (en) 2023-11-23 2023-11-23 Data acquisition method, device, equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN117472430A (en)

Similar Documents

Publication Publication Date Title
CN113918376B (en) Fault detection method, device, equipment and computer readable storage medium
CN114884912A (en) Communication method, system, equipment and computer readable storage medium of SOA architecture
CN116775110A (en) Data synchronization method, device, equipment, medium and product
CN117472430A (en) Data acquisition method, device, equipment and computer storage medium
CN111371586B (en) Log data transmission method, device and equipment
CN115604076A (en) Information processing method, device, equipment and computer readable storage medium
CN115858320A (en) Operation log recording method, apparatus, medium and product
CN114372072A (en) Data storage method, device, equipment, computer storage medium and program product
CN115225170A (en) Method and device for testing shielding effect of shielding device
CN114895959B (en) Data processing method, device, equipment and computer storage medium
CN116009795A (en) Method, device, equipment and computer storage medium for processing printing blockage
CN116756219A (en) Data processing method, device, equipment and computer storage medium
CN116781621A (en) Transaction flow limiting method, device, equipment and computer storage medium
CN114579627A (en) Message processing method, device, equipment and computer storage medium
CN108965214B (en) Data processing method, device and computer storage medium
CN116015956A (en) Message passing method, device, equipment and computer readable storage medium
CN114640715A (en) Data processing method, device, equipment and computer storage medium
CN114297072A (en) Code analysis method, system, device, equipment and computer readable storage medium
CN115033534A (en) File processing method, device, equipment and computer readable storage medium
CN115514820A (en) Data calling method, device, equipment, storage medium and program product
CN114710550A (en) Request response method, device, equipment and computer storage medium
CN117993360A (en) File analysis method, device, equipment, medium and product
CN115390881A (en) Service operation information processing method and device and electronic equipment
CN117289979A (en) Application program file updating method, device, equipment, medium and product
CN115878873A (en) Method, device and equipment for determining characteristics of abnormal user and storage medium

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