CN112783510A - Data calling method and device, electronic equipment and storage medium - Google Patents

Data calling method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112783510A
CN112783510A CN202110144502.1A CN202110144502A CN112783510A CN 112783510 A CN112783510 A CN 112783510A CN 202110144502 A CN202110144502 A CN 202110144502A CN 112783510 A CN112783510 A CN 112783510A
Authority
CN
China
Prior art keywords
target
calling
data
interface
call
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.)
Withdrawn
Application number
CN202110144502.1A
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.)
Shenzhen Lexin Software Technology Co Ltd
Original Assignee
Shenzhen Lexin Software 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 Shenzhen Lexin Software Technology Co Ltd filed Critical Shenzhen Lexin Software Technology Co Ltd
Priority to CN202110144502.1A priority Critical patent/CN112783510A/en
Publication of CN112783510A publication Critical patent/CN112783510A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses a data calling method and device, electronic equipment and a storage medium. The data calling method comprises the following steps: acquiring a data calling request sent by a data calling system aiming at a general interface of a target calling system; wherein the interfaces of the data call system and the target call system are incompatible with each other; analyzing the data calling request to obtain a target calling parameter; generating a target interface calling method according to the target calling parameter; calling a target general interface according to a target interface calling method to acquire target calling data; and sending the target calling data to a data calling system. The technical scheme of the embodiment of the invention can reduce the development cost of calling data through the interface, improve the efficiency of calling data among different systems and further improve the communication efficiency among different systems.

Description

Data calling method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a data calling method and device, electronic equipment and a storage medium.
Background
At present, with the development of internet technology, the functions of a software system are more and more abundant. Different systems may include different types of interfaces, and the communication protocols between the interfaces of different systems are different and are incompatible with each other, so that the communication efficiency between the interfaces of different systems is low.
In the prior art, when the data caller interface protocol is different from the data provider interface protocol, a technician is required to manually develop and program so as to call data through a coded program. When the number of interfaces of different systems is large or data among different systems is frequently called, technicians are required to frequently adjust programs, and accordingly, the labor cost is excessively high.
Disclosure of Invention
Embodiments of the present invention provide a data calling method and apparatus, an electronic device, and a storage medium, which reduce development cost for calling data between different systems through incompatible interfaces, improve efficiency of data calling between different systems, and further improve communication efficiency between different systems.
In a first aspect, an embodiment of the present invention provides a data calling method, including:
acquiring a data calling request sent by a data calling system aiming at a general interface of a target calling system; wherein the interfaces of the data call system and the target call system are incompatible with each other;
analyzing the data calling request to obtain a target calling parameter;
generating a target interface calling method according to the target calling parameter;
calling a target general interface according to a target interface calling method to acquire target calling data;
and sending the target calling data to a data calling system.
In a second aspect, an embodiment of the present invention further provides a data invoking device, including:
the data calling request acquisition module is used for acquiring a data calling request sent by the data calling system aiming at a general interface of a target calling system; wherein the interfaces of the data call system and the target call system are incompatible with each other;
the target calling parameter acquisition module is used for analyzing the data calling request to acquire a target calling parameter;
the target interface calling method acquisition module is used for generating a target interface calling method according to the target calling parameter;
the target calling data acquisition module is used for calling the target universal interface according to the target interface calling method so as to acquire target calling data;
and the target calling data sending module is used for sending the target calling data to the data calling system.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the data call method provided by any of the embodiments of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the data calling method provided in any embodiment of the present invention.
According to the embodiment of the invention, the acquired data calling system analyzes the data calling request sent by the universal interface of the target calling system to acquire the target calling parameter, so that the target interface calling method is generated according to the target calling parameter, the target universal interface is called according to the target interface calling method to acquire the target calling data, and finally the target calling data is sent to the data calling system.
Drawings
Fig. 1 is a flowchart of a data calling method according to an embodiment of the present invention;
fig. 2 is a flowchart of a data calling method according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of a target interface calling method according to a second embodiment of the present invention;
fig. 4 is a system architecture diagram illustrating a data call performed by a trust system according to a second embodiment of the present invention;
fig. 5 is a schematic diagram of a data call apparatus according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention.
It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a data invoking method according to an embodiment of the present invention, where the embodiment is applicable to a case where data is invoked between different systems through an incompatible interface, and the method may be executed by a data invoking device, and the device may be implemented by software and/or hardware, and may be generally integrated in an electronic device. Accordingly, as shown in fig. 1, the method comprises the following operations:
s110, acquiring a data calling request sent by the data calling system aiming at the general interface of the target calling system.
The data calling system can call data of other systems according to business requirements. The target calling system may be a system for which the data calling system needs to make data calls. The general interface can be an interface converted by an interface adaptation system, and the interface can be directly called by a data calling system. The data calling system and the target calling system are two independent systems, and interfaces between the two systems are incompatible with each other. The data call request may be a request sent by the data call system when making a data call to the target call system. The interface adaptation system can convert the interface protocol of the target calling system to generate a general interface, so that the data calling system can call the data in the target calling system through the general interface.
In the embodiment of the invention, the data calling system can call other systems according to the service requirement. Since the interfaces of the data call system and the target call system are incompatible with each other, when the data call system calls data from the target call system, a data call request can be sent to the general-purpose interface of the target call system. Specifically, after receiving the data call request sent by the data call system, the interface adaptation system may determine the general interface of the target call system according to the data call request, so as to further send the data call request to the general interface of the target call system.
It will be appreciated that the interfaces employed by the different systems are often incompatible. For example, when the data call system sends a data call request to an interface of the target call system that is not protocol-converted, the target call system is generally unable to respond to the data call request due to the problem of interface incompatibility. According to the technical scheme of the embodiment of the invention, the problem of incompatibility of interfaces between different systems is considered, data transmission between the data calling system and the target calling system is realized through the universal interface of the interface adaptation system, namely the target calling system can identify the data calling request of the data calling system through the universal interface provided by the interface adaptation system.
And S120, analyzing the data calling request to obtain a target calling parameter.
The target call parameter may be a parameter obtained by analyzing the data call request.
Correspondingly, after the interface adaptation system acquires the data call request, the interface adaptation system can analyze the data call request to acquire the target call parameter. For example, the interface adaptation system may analyze a data call request sent by the data call system to obtain a variable name, a character type, an interface method, an interface name and other related data corresponding to the data call request, and further perform data interception on the interface method and the interface name and obtain a target call parameter.
And S130, generating a target interface calling method according to the target calling parameter.
The target interface calling method may be an interface calling method, and is used to call a general interface of the target calling system corresponding to the data calling request.
Specifically, after the target calling parameter is obtained, the interface adaptation system may perform data processing on the target calling parameter according to an interface protocol of a general interface of the target calling system, so as to obtain the target interface calling method.
And S140, calling the target universal interface according to the target interface calling method to acquire target calling data.
The target universal interface may be a universal interface of a target calling system corresponding to the data calling request. The target call data may be data called by the data call system through a data call request.
Correspondingly, the interface adaptation system can call the target general interface according to the target interface calling method, and further obtain target calling data corresponding to the data calling request in the target calling system through the target general interface.
And S150, sending the target calling data to a data calling system.
In the embodiment of the invention, after the target calling data is obtained, the interface adaptation system can perform data processing on the target calling data and send the target calling data to the data calling system through the target general interface.
In the embodiment of the invention, the target calling system can feed the target calling data back to the data calling system, so that the problem that data transmission can be only carried out through manual programming when different system interface protocols are different is solved.
According to the embodiment of the invention, the acquired data calling system analyzes the data calling request sent by the universal interface of the target calling system to acquire the target calling parameter, so that the target interface calling method is generated according to the target calling parameter, the target universal interface is called according to the target interface calling method to acquire the target calling data, and finally the target calling data is sent to the data calling system.
Example two
Fig. 2 is a flowchart of a data calling method according to a second embodiment of the present invention, which is embodied on the basis of the second embodiment, and shows a specific optional implementation scheme that an interface adaptation system generates a target interface calling method according to a target calling parameter, and calls a target interface according to the target interface calling method. Accordingly, as shown in fig. 2, the method includes the following operations:
s210, acquiring a data calling request sent by the data calling system aiming at the general interface of the target calling system.
In the embodiment of the present invention, optionally, the data calling system may include a crowd service system, and the target calling system may include a user imaging system and/or a field platform system.
The crowd service system can be a service system which stores a large amount of real-time user tag data and can analyze user characteristics according to business requirements. The tag data may characterize social attributes of the user. For example, the tag data may include user identity data such as a gender tag, an age tag, and a professional tag of the user. The user representation system may be a service system that stores a large amount of non-real-time user tag data and is capable of performing feature analysis on the user non-real-time user tag data. The field platform system can be a service platform which stores personal information filled by a user and can perform business handling. For example, the field platform system may include, but is not limited to, a wind-controlled field platform.
Illustratively, the interfaces of the crowd service system, the user portrait system and the field platform system are incompatible, and if the crowd service system needs to call data in the user portrait system or the field platform system, the interface adaptation system needs to perform interface protocol conversion on the interfaces of the user portrait system and the field platform system, so that a universal interface of the user portrait system and a universal interface of the field platform system can be generated, and the crowd service system can call the universal interface of the user portrait system and the universal interface of the field platform system.
In an optional embodiment of the present invention, before acquiring the data call request sent by the data call system to the generic interface of the target call system, the method may further include: acquiring an interface to be adapted of a target calling system; and carrying out adaptation processing on the interface to be adapted to obtain the universal interface.
The interface to be adapted may be all or part of an interface of the target calling system for the other system to perform data calling. The adaptation process may be an operation of the interface adaptation system performing interface protocol conversion on the interface to be adapted.
Accordingly, since the interfaces of the data call system and the target call system are incompatible with each other, the interface adaptation system needs to adapt the interface of the target call system before acquiring the data call request sent by the data call system to the general interface of the target call system. Specifically, the interface adaptation system may first obtain all or part of interfaces, that is, interfaces to be adapted, of the target calling system for data calling by other systems, and further perform interface protocol conversion on the interfaces to be adapted to obtain a universal interface that can be called by the data calling system. In an optional embodiment of the present invention, the adapting the interface to be adapted may include: acquiring an interface protocol corresponding to an interface to be adapted through a dubbo; replacing a target field of the interface protocol according to the wildcard; the interface to be adapted is uniquely identified by an interface name, an operating system version, an interface protocol and an interface method.
The interface protocol may be a communication mode and a requirement to be complied with between interfaces that need to exchange information. A wildcard may be a special character, for example, a wildcard may include, but is not limited to, "# and"? "and the like. Wildcards may be used in place of one or more characters. The target field may be a field that needs to be replaced with a wildcard. The interface name may be the name of the interface to be adapted. The operating system version may be a version of a computer program that manages computer hardware and software resources. The interface method may be a method for an interface to make a data call.
In the embodiment of the present invention, the specific process of the interface adaptation system performing adaptation processing on the interface to be adapted may include: the interface adaptation system can firstly analyze the interface protocol of the interface to be adapted to obtain a target field, and further replace the target field of the interface protocol by using a wildcard. In addition, the interface adaptation system can uniquely determine an interface by using the interface name, the operating system version, the interface protocol and the interface method, that is, the interface to be adapted can be uniquely identified by the interface name, the operating system version, the interface protocol and the interface method.
As an example, the interface protocol corresponding to the interface to be adapted is fsof// 10.10.59.57:30507/com. fe qile.auth. activate. service. grade. switch gratservicenson ═ true & application ═ auto _ activate _ server & async ═ 1& default. dynamic ═ true & delay-1 & product &. 2.17.2& dynamic & parameter &. prediction & parameter ═ true & group ═ true & parameter &. parameter & gt & parameter & gt & parameter & gt & parameter. The method list in "set gradient protocol for a php, set gradient protocol & organization" is replaced with the generic symbol "resulting in a converted interface protocol fsof://10.10.59.147:31133/com, fe fine parameter service parameter & value, parameter & application & parameter & 1& parameter & service & parameter &. The interface protocol corresponding to the interface to be adapted is converted to obtain the universal interface, so that the data calling system calls the universal interface.
And S220, analyzing the data calling request to obtain a target calling parameter.
And S230, generating a target interface calling method according to the target calling parameter.
In an optional embodiment of the present invention, the target call parameter may include a target call field and a target call identifier; generating a target interface calling method according to the target calling parameter may include: generating an adaptation calling parameter according to the target calling field; and generating a target interface calling method according to the adaptation calling parameter and the target calling identifier.
The target call field may be a partial field in the target call parameter, and is used to generate the target interface call method. For example, the target call field may include a hump form field or an underlined named form field. The embodiment of the invention does not limit the specific field form of the target calling field. The target call identifier may be a unique number assigned by the system after the relevant platform performs registration operation, and is used for distinguishing and identifying the registered account. For example, the target call Identification may include, but is not limited to, a User Identification (UID). The adaptation calling parameter may be data obtained by the interface adaptation system parsing the target calling field, and is used to generate a target interface calling method.
In the embodiment of the invention, the target interface calling method can be generated according to the target calling parameter. Specifically, the target call field and the target call identifier may be obtained by analyzing the target call parameter. And further generating a field in a form which can be recognized by the target calling system interface according to the target calling field, namely adapting a calling parameter, so as to generate a target interface calling method according to the field in a named form which can be recognized by the target universal interface and the target calling identifier.
Illustratively, the interface adaptation system analyzes the data call request to obtain a target call field in a hump form, uses the UID as a target call identifier, further converts the target call field into a field in an underlined form that can be recognized by the target call system, and uses the field in the underlined form as an adaptation call parameter. The interface adaptation system may further generate the adaptation call parameter and the target call identifier as a method for calling a target generic interface of the target call system, i.e. a target interface call method.
In one specific example, the interface adaptation system obtains an interface protocol corresponding to an interface calling method of the user representation system from a data call request for calling the user representation system in the form:
UserLabelQuery userLabelQuery=newUserLabelQuery();
userLabelQuery.setTargetUserId(uid);
userLabelQuery.setLabelIds(Arrays.asList(Integer.valueOf(userLabel)));
userLabelQuery.setSubjectCode(SubjectTypeEnum.FENQILE.getSubjectCode());
List<LabelValueResp>respList=userLabelQueryService.queryLabelValueList(userLabelQuery)。
in a specific example, the interface adaptation system obtains, according to a data call request for calling the field platform system, an interface protocol corresponding to the field platform system interface call method in the following form:
ParamsFieldBatchComputeparamsFieldBatchCompute=newParamsFieldBatchCompute();
paramsFieldBatchCompute.setUid(uid);
paramsFieldBatchCompute.setInvoker(11);
paramsFieldBatchCompute.setFieldNameList(fieldList);
JSONObjectresultJson=fieldBatchComputeService.compute(paramsFieldBatchCompute)。
the interface protocol may be used for the interface adaptation system to generate the target interface call method.
And S240, calling the target universal interface according to the target interface calling method to acquire target calling data.
In an optional embodiment of the present invention, invoking the target universal interface according to the target interface invoking method may include: acquiring the service type of an interface adaptation system; generating a service identifier according to the service type of the interface adaptation system; and calling the target universal interface according to the service identifier and the target interface calling method.
Wherein the service type may be a type of the target calling system. For example, the service types may include, but are not limited to, a crowd portrayal system type, a field platform system type, and the like. The service identification may be a service name of the target calling system. Different service types correspond to different service names. The service name may be a string in the interface protocol that corresponds to the service type. For example, the service name of the field platform system may be com.
In particular, the target calling system may be a different service type, and the interface adaptation system may expose the corresponding service name of the target calling system. When the interface adaptation system receives a data calling request sent by the data calling system, the interface adaptation system can determine a service name corresponding to the service type and java reflection mapping according to the service type and java reflection mapping, so as to call a target universal interface according to the service name and a target interface calling method.
Fig. 3 is a schematic diagram of a target interface calling method according to a second embodiment of the present invention, and in a specific example, as shown in fig. 3, if a service identifier exposed by an interface adaptation system before receiving a data call request is com. After the interface adaptation system receives the data call request, the interface adaptation system analyzes the received data call request to obtain a service identifier com.fen q ile.channel.data.adaptor.service.fsmfsfeldeledcommmonservice corresponding to the data call request, and a target call parameter is getIntegerXinstudent ResultDb (UID). The interface adaptation system further analyzes the target calling parameter to obtain a target calling field as XinStudentResultDb and a target calling identifier as UID. And the interface adaptation system generates an adaptation calling parameter and a service identifier of the wind control field platform according to the target calling field and the service identifier mapping of the data calling request. Wherein, the adaptation calling parameter is xin _ student _ result _ db. The interface adaptation system generates a field platform interface calling method of the wind control field platform as Comut (UID, xin _ student _ result _ db) according to the adaptation calling parameter and the target calling identifier, and the service identifier of the wind control field platform is com. And further calling a general interface of the wind control field platform interface according to the obtained service identifier and the field platform interface calling method. Fig. 3 illustrates a wind-controlled field platform as an example, but the field platform system is not limited to the wind-controlled field platform.
Fig. 4 is a system architecture diagram illustrating a data call of a trust system according to a second embodiment of the present invention, and in a specific example, as shown in fig. 4, the trust system may call data of a crowd service system according to business needs and a user UID, but when the crowd service system does not have the data needed by the trust system, the crowd service system may call data in a user representation system, a field platform system, or a service system compatible with a crowd service system interface, that is, other business systems. Because the interfaces of the user portrait system and the field platform system are incompatible with the interface of the crowd service system, the interface adaptation system is required to analyze the data call request of the crowd service system to obtain a target interface call method, and the data of the user portrait system or the field platform system is called according to the target interface call method. Specifically, if the data call system needs to call the data of the user portrait system, the interface adaptation system needs to analyze the user tag data in the data call request, so as to generate a universal interface call method of the user portrait system according to the user tag data and the UID, and further call the data of the user portrait system through the universal interface call method of the user portrait system. If the data calling system needs to call the data of the field platform system, the interface adaptation system needs to analyze a target calling field in the data calling request, so as to generate a universal interface calling method of the field platform system according to the target calling field and the UID, and further call the data of the field platform system according to the universal interface calling method of the field platform system. When the credit system calls other service systems with compatible interfaces, the interface adaptation is not needed through the interface adaptation system.
And S250, acquiring target calling data through the target general interface.
Specifically, after the target universal interface is determined according to the target interface calling method, target calling data corresponding to the data calling request is acquired through the target universal interface.
And S260, performing data conversion on the target calling data to obtain target conversion data.
The target conversion data may be a result of converting the target call data according to a data format that can be recognized by the data call system.
In an embodiment of the present invention, the interface adaptation system may convert the target call data into a data format that can be recognized by the data call system. The target call data that completes the dataform conversion may be the target conversion data.
Specifically, the embodiment of the present invention may support data types including, but not limited to, String data type, Integer data type, Double data type, and Array data type. Taking the field platform system as an example, when the adaptation calling parameter is XinStudentResultDb, the universal interface calling method of the field platform system may be getstringxinstudentdb (uid), getintegerxinstudentresultdb (uid), getdoubtilexinstudentdb (uid), or getarreyxinstudentdb (uid). Wherein Array in getAlyXinStudResultDb (uid) is the type of group number [ ], but conversion to comma separated String data type facilitates the judgment of the functional expression of the splitter and the crowd service system.
And S270, sending the target conversion data to a data calling system through the target general interface.
In the embodiment of the present invention, the interface adaptation system may send the target conversion data corresponding to the data call request to the data call system through the target general interface.
In the embodiment of the present invention, the interface adaptation system may perform initialization configuration, creation of the generic interface, maintenance of the generic interface, and differentiation of usage categories of the generic interface in a programming manner.
According to the embodiment of the invention, the acquired data calling system analyzes the data calling request sent by the universal interface of the target calling system to acquire the target calling parameter, so that the target interface calling method is generated according to the target calling parameter, the target universal interface is called according to the target interface calling method to acquire the target calling data, and finally the target calling data is sent to the data calling system.
It should be noted that any permutation and combination between the technical features in the above embodiments also belong to the scope of the present invention.
EXAMPLE III
Fig. 5 is a schematic diagram of a data call apparatus according to a third embodiment of the present invention, and as shown in fig. 5, the apparatus includes: a data call request obtaining module 310, a target call parameter obtaining module 320, a target interface call method obtaining module 330, a target call data obtaining module 340, and a target call data sending module 350, wherein:
a data call request obtaining module 310, configured to obtain a data call request sent by the data call system for a general interface of the target call system; wherein the interfaces of the data call system and the target call system are incompatible with each other.
And a target call parameter obtaining module 320, configured to parse the data call request to obtain a target call parameter.
And the target interface calling method obtaining module 330 is configured to generate a target interface calling method according to the target calling parameter.
A target call data obtaining module 340, configured to call a target general interface according to the target interface call method to obtain target call data;
and a target call data sending module 350, configured to send the target call data to the data call system.
According to the embodiment of the invention, the acquired data calling system analyzes the data calling request sent by the universal interface of the target calling system to acquire the target calling parameter, so that the target interface calling method is generated according to the target calling parameter, the target universal interface is called according to the target interface calling method to acquire the target calling data, and finally the target calling data is sent to the data calling system.
Optionally, the data call apparatus further includes: the universal interface acquisition module is used for acquiring an interface to be adapted of the target calling system; and carrying out adaptation processing on the interface to be adapted to obtain the universal interface.
Optionally, the general interface obtaining module is specifically configured to: acquiring an interface protocol corresponding to the interface to be adapted through an open source distributed service framework (dubbo); replacing a target field of the interface protocol according to the wildcard; the interface to be adapted is uniquely identified by an interface name, an operating system version, an interface protocol and an interface method.
Optionally, the target call parameter includes a target call field and a target call identifier; the target interface calling method obtaining module 330 is specifically configured to: generating an adaptation calling parameter according to the target calling field; and generating the target interface calling method according to the adaptation calling parameter and the target calling identifier.
Optionally, the target call data obtaining module 340 is specifically configured to: acquiring the service type of an interface adaptation system; generating a service identifier according to the service type of the interface adaptation system; and calling the target universal interface according to the service identifier and the target interface calling method.
Optionally, the target call data sending module 350 is specifically configured to: acquiring the target calling data through the target general interface; performing data conversion on the target calling data to obtain target conversion data; and sending the target conversion data to the data calling system through the target general interface.
Optionally, the data calling system includes a crowd service system, and the target calling system includes a user image system and/or a field platform system.
The data calling device can execute the data calling method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to a data call method provided in any embodiment of the present invention.
Since the data calling device described above is a device capable of executing the data calling method in the embodiment of the present invention, based on the data calling method described in the embodiment of the present invention, a person skilled in the art can understand the specific implementation of the data calling device in the embodiment and various variations thereof, and therefore, how the data calling device implements the data calling method in the embodiment of the present invention is not described in detail herein. The device used by those skilled in the art to implement the data calling method in the embodiments of the present invention is within the scope of the present application.
Example four
Fig. 6 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. FIG. 6 illustrates a block diagram of an electronic device 412 that is suitable for use in implementing embodiments of the present invention. The electronic device 412 shown in fig. 6 is only an example and should not bring any limitations to the functionality and scope of use of the embodiments of the present invention.
As shown in fig. 6, the electronic device 412 is in the form of a general purpose computing device. The components of the electronic device 412 may include, but are not limited to: one or more processors 416, a storage device 428, and a bus 418 that couples the various system components including the storage device 428 and the processors 416.
Bus 418 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
Electronic device 412 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 412 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 428 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 430 and/or cache Memory 432. The electronic device 412 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 434 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 418 by one or more data media interfaces. Storage 428 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
Program 436 having a set (at least one) of program modules 426 may be stored, for example, in storage 428, such program modules 426 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination may comprise an implementation of a network environment. Program modules 426 generally perform the functions and/or methodologies of embodiments of the invention as described herein.
The electronic device 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing device, camera, display 424, etc.), with one or more devices that enable a user to interact with the electronic device 412, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 412 to communicate with one or more other computing devices. Such communication may be through an Input/Output (I/O) interface 422. Also, the electronic device 412 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network, such as the internet) via the Network adapter 420. As shown, network adapter 420 communicates with the other modules of electronic device 412 over bus 418. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 412, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) systems, tape drives, and data backup storage systems, to name a few.
The processor 416 executes various functional applications and data processing by executing programs stored in the storage device 428, for example, implementing the data call method provided by the above-described embodiment of the present invention: acquiring a data calling request sent by a data calling system aiming at a general interface of a target calling system; wherein the interfaces of the data call system and the target call system are incompatible with each other; analyzing the data calling request to obtain a target calling parameter; generating a target interface calling method according to the target calling parameter; calling a target general interface according to a target interface calling method to acquire target calling data; and sending the target calling data to a data calling system.
According to the embodiment of the invention, the acquired data calling system analyzes the data calling request sent by the universal interface of the target calling system to acquire the target calling parameter, so that the target interface calling method is generated according to the target calling parameter, the target universal interface is called according to the target interface calling method to acquire the target calling data, and finally the target calling data is sent to the data calling system.
EXAMPLE five
An embodiment of the present invention further provides a computer storage medium storing a computer program, where the computer program is used to execute the data call method according to any one of the above embodiments of the present invention when executed by a computer processor: acquiring a data calling request sent by a data calling system aiming at a general interface of a target calling system; wherein the interfaces of the data call system and the target call system are incompatible with each other; analyzing the data calling request to obtain a target calling parameter; generating a target interface calling method according to the target calling parameter; calling a target general interface according to a target interface calling method to acquire target calling data; and sending the target calling data to a data calling system.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, 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 (a non-exhaustive list) of the computer readable storage medium would include the following: 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 document, 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.
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 many 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, wireline, optical fiber cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A data calling method is applied to an interface adaptation system and comprises the following steps:
acquiring a data calling request sent by a data calling system aiming at a general interface of a target calling system; wherein the interfaces of the data call system and the target call system are incompatible with each other;
analyzing the data calling request to obtain a target calling parameter;
generating a target interface calling method according to the target calling parameter;
calling a target general interface according to the target interface calling method to acquire target calling data;
and sending the target calling data to the data calling system.
2. The method of claim 1, further comprising, prior to obtaining the data call request sent by the data call system for the generic interface of the target call system:
acquiring an interface to be adapted of the target calling system;
and carrying out adaptation processing on the interface to be adapted to obtain the universal interface.
3. The method according to claim 2, wherein the adapting the interface to be adapted comprises:
acquiring an interface protocol corresponding to the interface to be adapted through an open source distributed service framework (dubbo);
replacing a target field of the interface protocol according to the wildcard;
the interface to be adapted is uniquely identified by an interface name, an operating system version, an interface protocol and an interface method.
4. The method of claim 1, wherein the target call parameters comprise a target call field and a target call identification;
the method for generating the target interface calling according to the target calling parameter comprises the following steps:
generating an adaptation calling parameter according to the target calling field;
and generating the target interface calling method according to the adaptation calling parameter and the target calling identifier.
5. The method of claim 4, wherein said invoking a target generic interface according to the target interface call method comprises:
acquiring the service type of an interface adaptation system;
generating a service identifier according to the service type of the interface adaptation system;
and calling the target universal interface according to the service identifier and the target interface calling method.
6. The method of claim 1, wherein sending the target call data to the data call system comprises:
acquiring the target calling data through the target general interface;
performing data conversion on the target calling data to obtain target conversion data;
and sending the target conversion data to the data calling system through the target general interface.
7. The method of any of claims 1-6, wherein the data call system comprises a crowd service system and the target call system comprises a user imaging system and/or a field platform system.
8. A data call apparatus, comprising:
the data calling request acquisition module is used for acquiring a data calling request sent by the data calling system aiming at a general interface of a target calling system; wherein the interfaces of the data call system and the target call system are incompatible with each other;
the target calling parameter acquisition module is used for analyzing the data calling request to acquire a target calling parameter;
the target interface calling method acquisition module is used for generating a target interface calling method according to the target calling parameter;
the target calling data acquisition module is used for calling a target general interface according to the target interface calling method so as to acquire target calling data;
and the target calling data sending module is used for sending the target calling data to the data calling system.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a data call method as claimed in any one of claims 1-7.
10. A computer storage medium on which a computer program is stored, which program, when executed by a processor, implements a data call method as claimed in any one of claims 1 to 7.
CN202110144502.1A 2021-02-02 2021-02-02 Data calling method and device, electronic equipment and storage medium Withdrawn CN112783510A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110144502.1A CN112783510A (en) 2021-02-02 2021-02-02 Data calling method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110144502.1A CN112783510A (en) 2021-02-02 2021-02-02 Data calling method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112783510A true CN112783510A (en) 2021-05-11

Family

ID=75760637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110144502.1A Withdrawn CN112783510A (en) 2021-02-02 2021-02-02 Data calling method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112783510A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114373534A (en) * 2021-12-17 2022-04-19 深圳市巨鼎医疗股份有限公司 Waiting information query method and system, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114373534A (en) * 2021-12-17 2022-04-19 深圳市巨鼎医疗股份有限公司 Waiting information query method and system, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110032459B (en) Message queue configuration method and device, computer equipment and storage medium
CN110457256A (en) Date storage method, device, computer equipment and storage medium
CN110659206B (en) Simulation architecture establishment method and device based on micro-service, medium and electronic equipment
CN112860798B (en) Data processing method and device, electronic equipment and storage medium
CN113011969A (en) Banking business processing method, device, medium and electronic equipment based on 5G message
CN109495496B (en) Voice processing method and device, electronic equipment and computer readable medium
CN112346794A (en) Interface calling method, device, equipment and medium
US20200220824A1 (en) Method, a device and a storage medium of forwarding voice information in instant messaging
CN111767229A (en) Performance test method, device and equipment
CN111241043A (en) Multimedia file sharing method, terminal and storage medium
US11722596B2 (en) Method and system for group communication across electronic mail users and feature phone users
CN113448988B (en) Training method and device of algorithm model, electronic equipment and storage medium
CN111324467B (en) Business service calling method, device, equipment and storage medium
CN114745449A (en) Message processing method and device, storage medium and electronic equipment
CN112783510A (en) Data calling method and device, electronic equipment and storage medium
CN114513552A (en) Data processing method, device, equipment and storage medium
CN113468344A (en) Entity relationship extraction method and device, electronic equipment and computer readable medium
CN113313623A (en) Watermark information display method, watermark information display device, electronic equipment and computer readable medium
CN113760318A (en) Information processing method, information processing apparatus, server, and storage medium
CN110889880A (en) Map processing method, device, equipment and storage medium
CN111770236B (en) Conversation processing method, device, system, server and storage medium
CN115237481A (en) Method, device and equipment for driving external equipment and storage medium
CN114385128A (en) Data processing method, device, apparatus, storage medium and program product
CN113919310A (en) Short message content determination method and device, electronic equipment and storage medium
CN114219643A (en) Transaction calling method, device, equipment 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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210511