CN113918245A - Data calling method, device, equipment and computer readable storage medium - Google Patents

Data calling method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN113918245A
CN113918245A CN202111195335.XA CN202111195335A CN113918245A CN 113918245 A CN113918245 A CN 113918245A CN 202111195335 A CN202111195335 A CN 202111195335A CN 113918245 A CN113918245 A CN 113918245A
Authority
CN
China
Prior art keywords
calling
file
analyzed
data
request
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
CN202111195335.XA
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 Ping An Smart Healthcare Technology Co ltd
Original Assignee
Ping An International Smart City 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 Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202111195335.XA priority Critical patent/CN113918245A/en
Publication of CN113918245A publication Critical patent/CN113918245A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to the field of data processing, and discloses a data calling method, a data calling device, data calling equipment and a computer readable storage medium, wherein the method comprises the following steps: acquiring a file to be analyzed sent by a server, and calling a preset analysis toolkit set to analyze the file to be analyzed to obtain target parameters, wherein the target parameters are used for describing attribute information of the file to be analyzed; then generating a calling request according to the target parameters, and sending the calling request to a server side, wherein the calling request comprises a specified return data type; and finally, receiving a to-be-output calling result returned after the server executes the calling request, and performing data conversion on the to-be-output calling result according to the specified returned data type to obtain a target output calling result. By the method, the efficiency of data calling can be effectively improved. The present application relates to a blockchain technology, and for example, the call request and the target output call result may be written into a blockchain for use in subsequent scenarios such as data recommendation.

Description

Data calling method, device, equipment and computer readable storage medium
Technical Field
The present application relates to the field of data processing, and in particular, to a data calling method, apparatus, device, and computer-readable storage medium.
Background
In the internet field, Web services are often used to implement calls between different systems, and can be understood as a new platform for creating interoperable distributed applications. Web services may enable cross-platform interoperability.
At present, a plurality of solutions for Web Service calling exist in the industry, but the solutions have problems, such as the need of manually adding various configurations of the pseudo-seven-eight vinasse into a program or writing a large stack of codes, too strong coupling, failure of meeting the design concept of high cohesion and low coupling of program design, and failure of being applicable to specific scenes as a general solution; for example, many times, the server and the client are not in the same network, and the network of the server and the client can be opened through the proxy address, but the content in the provided file to be analyzed (such as a WSDL document) is not changed, the address of the server obtained by analyzing the file to be analyzed in the original manner is still old, and the connection initiation may be impossible. Therefore, it is inefficient in implementing the call.
Disclosure of Invention
The embodiment of the application provides a data calling method, a data calling device, data calling equipment and a computer readable storage medium, and the efficiency of calling data can be effectively improved.
In a first aspect, an embodiment of the present application discloses a data calling method, including:
acquiring a file to be analyzed sent by a server;
calling a preset analysis toolkit set to analyze the file to be analyzed to obtain target parameters, wherein the target parameters are used for describing attribute information of the file to be analyzed;
generating a calling request according to the target parameter, and sending the calling request to the server, wherein the calling request is used for acquiring data meeting the user requirement, and the calling request comprises a specified returned data type;
receiving a to-be-output calling result returned by the server, wherein the to-be-output calling result is obtained by the server executing the calling request;
and performing data conversion on the calling result to be output according to the specified returned data type to obtain a target output calling result.
In a second aspect, an embodiment of the present application discloses a data calling method, including:
receiving a calling request sent by a client, wherein the calling request is generated according to a target parameter after the client calls a preset analysis toolkit to analyze a file to be analyzed to obtain the target parameter;
executing the calling request to obtain a calling result to be output;
and sending the calling result to be output to the client so that the client performs data conversion on the calling result to be output according to the specified returned data type to obtain a target output calling result.
In a third aspect, an embodiment of the present application discloses a data invoking device, including:
the acquisition unit is used for acquiring a file to be analyzed of the server;
the processing unit is used for calling a preset analysis toolkit set to analyze the file to be analyzed to obtain target parameters, and the target parameters are used for describing attribute information of the file to be analyzed;
the processing unit is further configured to generate a call request according to the target parameter:
the receiving and sending unit is used for sending the calling request to a server side, and the calling request comprises a specified return data type;
the receiving and sending unit is further configured to receive a to-be-output calling result returned by the server, where the to-be-output calling result is obtained by the server executing the calling request;
and the processing unit is also used for performing data conversion on the calling result to be output according to the specified return data type to obtain a target output calling result.
In a fourth aspect, an embodiment of the present application discloses a data call device, including:
the system comprises a receiving and sending unit, a processing unit and a processing unit, wherein the receiving and sending unit is used for receiving a calling request sent by a client, and the calling request is generated according to a target parameter after the client calls a preset analysis toolkit to analyze a file to be analyzed to obtain the target parameter;
the processing unit is used for executing the calling request to obtain a calling result to be output;
the receiving and sending unit is further configured to send the call result to be output to the client, so that the client performs data conversion on the call result to be output according to the specified returned data type to obtain a target output call result.
In a fifth aspect, an embodiment of the present application discloses a data call device, where the data call device includes:
a processor adapted to implement one or more computer programs; and a computer storage medium storing one or more computer programs adapted to be loaded by the processor and to perform the data call methods of the first and second aspects.
In a sixth aspect, the present application discloses a computer-readable storage medium, which stores one or more computer programs, where the computer programs are adapted to be loaded by a processor and execute the data call method described in the first aspect and the second method.
In a seventh aspect, the present application discloses a computer program product or a computer program, where the computer program product includes a computer program, and the computer program is stored in a computer readable storage medium. The processor of the server reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device (including the client and the server) executes the data call method described in the first aspect and the second method.
In the embodiment of the application, a file to be analyzed of a server is obtained, a preset analysis toolkit set is called to analyze the file to be analyzed, and target parameters are obtained and used for describing attribute information of the file to be analyzed; then generating a calling request according to the target parameters, and sending the calling request to a server side, wherein the calling request comprises a specified return data type; and finally, receiving a to-be-output calling result returned after the server executes the calling request, and performing data conversion on the to-be-output calling result according to the specified returned data type to obtain a target output calling result. In the method, on one hand, the preset analysis tool package can be directly used for analyzing the file to be analyzed, and then the calling request is generated, so that the efficiency of generating the calling request is improved; on the other hand, a call result specifying the type of return data can be obtained, thereby enriching the scheme and making the generality thereof high.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of an architecture of a data call system disclosed in an embodiment of the present application;
FIG. 2 is a flow chart illustrating a data calling method disclosed in an embodiment of the present application;
FIG. 3 is a flow chart illustrating another data calling method disclosed in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a data call apparatus disclosed in an embodiment of the present application;
FIG. 5 is a schematic structural diagram of another data call apparatus disclosed in the embodiments of the present application;
fig. 6 is a schematic structural diagram of a data call device disclosed in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a data call system according to an embodiment of the present application, and as shown in fig. 1, the data call system 100 may specifically include at least one user 101, a client 102, and a server 103, where the user 101 is mainly used for transmitting parameters to the client 102, such as specifying a return data type and specifying parameters; the client 102 is mainly used for acquiring a file to be analyzed, generating a call request, and performing data conversion on a returned call result to be output to obtain a target output call result; the server 103 is mainly used for executing the call request and obtaining a call result to be output. Further, communication connections can be implemented between the user 101, the client 102 and the server 103, and corresponding connection manners include wired connection and wireless connection, which are not limited herein.
By way of illustration, the user 101 in the data call system shown in fig. 1 may refer to a developer, or a customer using a product, and the client 102 may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a smart car, and the like. Optionally, in this embodiment of the application, the device for implementing the function of the client 102 may be a device such as a smart phone; or may be a device, such as a chip system, capable of supporting the terminal device to implement the function, and the device may be installed in the client 102; the server 103 may be a server, which may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, a big data and artificial intelligence platform, and the like. Fig. 1 is merely an exemplary representation of the architecture of a data call system and is not intended to be limiting. For example, the server 103 in fig. 1 may be deployed as a node in a blockchain network, or the server 103 is accessed to the blockchain network, so that the server 103 may upload internal data to the blockchain network for storage, to prevent the internal data from being tampered, thereby ensuring data security.
In one possible implementation, the present application is described in conjunction with a user 101, a terminal client 102, and a server 103 in a data call system, and may generally include:
the client 102 acquires a file to be analyzed of the server 103, and calls a preset analysis toolkit set to analyze the file to be analyzed to obtain a target parameter, wherein the target parameter is used for describing attribute information of the file to be analyzed; then the client 102 generates a call request according to the target parameter and sends the call request to the server 103, wherein the call request comprises a specified return data type; the server 103 receives the call request and executes the call request to obtain a call result to be output; the server 103 returns the call result to be output to the client 102; and finally, the client 102 performs data conversion on the call result to be output according to the specified return data type to obtain a target output call result, wherein the user 101 mainly inputs the specified return data type to the client 102 through an interface. According to the method, on one hand, the preset analysis tool package can be directly used for analyzing the file to be analyzed, and then the calling request is generated, so that the efficiency of generating the calling request is improved; on the other hand, a call result specifying the type of return data can be obtained, thereby enriching the scheme and making the generality thereof high.
In a specific application scenario, the user 101 generally obtains a file to be parsed by a specific address (address in URL format), where the file to be parsed may correspond to a specific function, such as weather forecast, sports event, etc. If the system A wants to know the weather forecast by calling the system B, the WSDL file of the system B needs to be acquired, then the WSDL file is analyzed, a corresponding web service calling request is generated, and then a calling result is obtained. The Web Service is based on a soap Protocol (Simple Object Access Protocol), all Web Service requests and responses are established on the basis of the soap Protocol, and a carrier for soap transmission data is xml; WSDL (Web Services Description Language) is a Description Language of Web Services, which defines what a Web Service does, how to do it, information of queries, and the like. In some feasible embodiments, the generated program can be published as a WSDL interface through Web Service, a proxy class which can be called by the current platform is generated through WSDL on other platforms, and mutual calling between applications and systems is realized by calling the generated interface and method.
Based on the data call system, an embodiment of the present application discloses a data call method, please refer to fig. 2, which is a schematic flow diagram of the data call method disclosed in the embodiment of the present application, and the data call method may be executed by a client, specifically, may be the client 102 in fig. 1. The data calling method specifically comprises the following steps:
s201, the client side obtains a file to be analyzed sent by the server side.
In a possible implementation manner, the client mainly obtains the file to be analyzed according to the address of the file to be analyzed. That is, a user inputs an address of a file to be analyzed on a front-end interface, generates an acquisition instruction of the file to be analyzed, then sends the acquisition instruction of the file to be analyzed to a client, the client analyzes the address of the file to be analyzed carried in the instruction and the address of the file to be analyzed including an acquisition path, and sends the acquisition path to a server, so as to obtain the file to be analyzed. In the embodiment of the present application, it can be understood that there is a one-to-one correspondence between the file to be parsed and the address of the file to be parsed.
For example, system a wants to call system B through a web service call request, and then the address of the file to be parsed of system B may be notified to a user of system a by an operator of system B.
S202, the client side calls a preset analysis toolkit set to analyze the file to be analyzed to obtain target parameters, and the target parameters are used for describing attribute information of the file to be analyzed.
The preset analysis tool package set comprises a plurality of analysis tool packages, and the file to be analyzed and the analysis tool packages can have a corresponding relationship, or the mapping relationship table of the file to be analyzed and the analysis tool packages is stored in a database of the client. The same parsing package may parse multiple types of files to be parsed at the same time, or one type of file to be parsed may require multiple parsing packages to be parsed, which is open herein and is not limited herein. The analysis toolkits can be embedded into the client in advance and stored, and if the analysis toolkits are used, the analysis toolkits can be directly used.
In a possible implementation manner, after the client acquires the file to be analyzed, the client determines the target file type of the file to be analyzed, then determines a target analysis toolkit from a preset analysis toolkit set according to the target file type, and directly calls the target analysis toolkit to analyze the file to be analyzed, so as to obtain the target parameters. Therefore, in the application, the analysis toolkit can be directly embedded into the client to realize the analysis of the file to be analyzed, developers do not need to manually configure codes and then analyze the file, the universality is high, the method is not dependent on and limited by specific services, the program design concept of high cohesion and low coupling is met, and programmers can obtain the file to be analyzed and the target parameters of the analyzed file only by transmitting the address of the file to be analyzed. Taking a file to be analyzed as a WSDL file as an example, for any WSDL file, the analyzed target parameters may include < portType >, < message >, < types >, and < binding >; < portType > represents an operation performed by a web service; < message > represents a message used by the web service; < types > indicates the type of data used by the web service; < binding > represents the communication protocol used by the web service.
In the application, when a client calls different servers, a file to be analyzed is correspondingly acquired, and for the client, regardless of which server, the formats of the acquired file to be analyzed are consistent, but the specific numerical values in each format are different, which is determined by the functions that can be provided by each server.
And S203, the client generates a call request according to the target parameters and sends the call request to the server, wherein the call request is used for acquiring data meeting the user requirements, and the call request comprises a specified returned data type.
The calling request is mainly used for acquiring data meeting the user requirements, namely, the data meeting the user requirements are acquired from the server, so that different calling requests can be generated according to different specified parameters, and correspondingly, the result returned by the calling requests can be displayed in a client interface in a visual mode. For example, the invocation request may be to obtain the weather conditions of a certain day of a certain city.
In a possible implementation manner, in the process of generating the invocation request, in addition to the target parameters, other parameters received by the client from the user side may also be included, including a specified return data type and specified parameters, where the specified parameters are used for describing attribute information of the return data. For example, if system B is a system that can provide weather forecast queries, the specified parameter may be a specific date, and the specified return data type is added by the user, so that the data format desired by the user can be obtained through the specified return data type.
In a possible implementation manner, the invocation request generated by the client according to the target parameter is mainly embodied in a message form, such as a SOAP (simple object access protocol, which is currently mostly SOAP used as a communication protocol) message. The specific mode of generating the message comprises the following steps: and creating a request head and a request body according to the target parameters to obtain a message template, and then repackaging the message template by using the specified returned data type and the specified parameters to obtain a calling request. Certainly, in some feasible embodiments, the specified return data type and the specified parameters may be directly stored in the client without being encapsulated, and after the return data of the server is received, the returned data is converted according to the specified return data type and the specified parameters to obtain corresponding target data.
In a possible implementation manner, the message template obtained according to the target parameter may be stored in the client, so as to facilitate the next use. After the message template is stored, whether the target parameter, the specified return data type and the specified parameter are changed or not is detected, if the target parameter is changed, the message template is directly updated by using the target parameter, and then the message template, the specified return data type and the specified parameter are updated to generate a new calling request. If the target parameter is not changed, the message template is directly adopted, and a call request is generated by combining the specified return data type and the specified parameter. By the mode, the message generated for the first time can be stored in the template, the time for encapsulating the message header and the message body can be saved in the subsequent process of generating the call request, the memory resource can be reasonably utilized, and the performance of the program is ensured.
In a possible implementation manner, in the process of generating the invocation request, the client may also encapsulate a network address of the server, where the network address may be obtained when the parsing tool package is used to parse the file to be parsed in step S202, and therefore, the network address may also be directly encapsulated when the invocation request is generated, so as to implement network connection between different systems. Therefore, the method and the system can carry out normal network connection regardless of whether the network agent exists between the server and the client, are not limited by special scenes and are convenient to communicate.
S204, the client receives a to-be-output calling result returned by the server, and the to-be-output calling result is obtained by the server executing the calling request.
The call result to be output is obtained by the server executing the call request, that is, after the client sends the generated call request to the server, the server executes the call request to obtain an execution result, that is, the call result to be output. And returning the calling result to be output to the client. Specifically, the server decapsulates the call request to obtain specific data corresponding to the call request, obtains a corresponding result according to the data, encapsulates the obtained result, and returns the encapsulated result to the client. The call request and the call result to be output are both performed in the form of messages.
And S205, the client performs data conversion on the call result to be output according to the specified return data type to obtain a target output call result.
In a possible implementation manner, in order to obtain data of the same type as the specified return data, after receiving the call result to be output, the client performs data conversion on the call result to be output according to the specified return data type, and obtains a target output call result after conversion. Meanwhile, the client can display the target output calling result to the user in a json mode, so that the effect of obtaining the response result of the specified type is achieved.
One of the methods is to encapsulate a specified return data type in a call request, so that after receiving a call result to be output, a client directly converts the call result; and the other method is that the specified return data type is not encapsulated into a message when the call request is encapsulated, but is directly stored in the client, so that after the client receives the call result to be output, whether the target output call result needs to be obtained according to the specified return data type is detected, if so, the data is converted and then output, and if not, the default data type is directly output.
In the embodiment of the application, a client acquires a file to be analyzed of a server, and a preset analysis toolkit set is called to analyze the file to be analyzed to obtain a target parameter, wherein the target parameter is used for describing attribute information of the file to be analyzed; then generating a calling request according to the target parameters, and sending the calling request to a server side, wherein the calling request comprises a specified return data type; and finally, the client receives the call result to be output returned after the server executes the call request, and performs data conversion on the call result to be output according to the specified returned data type to obtain a target output call result. In the method, on one hand, the preset analysis tool package can be directly used for analyzing the file to be analyzed, and then the calling request is generated, so that the efficiency of generating the calling request is improved; on the other hand, a call result specifying the type of return data can be obtained, thereby enriching the scheme and making the generality thereof high.
The related embodiment shown in fig. 2 is explained from the perspective of a client, and the following describes a data calling method according to the embodiment of the present application with reference to a user, a client, and a server, please refer to fig. 3, which is a schematic flow diagram of another data calling method disclosed in the embodiment of the present application, and specifically, the data calling method may specifically include the following steps:
s301, the client side obtains a file to be analyzed of the server side.
S302, the client side calls a preset analysis toolkit set to analyze the file to be analyzed to obtain target parameters, and the target parameters are used for describing attribute information of the file to be analyzed.
Steps S301 to S302 have already been explained in detail in the related embodiment of fig. 2, and are not described here again. The client acquires the file to be analyzed, which is mainly fed back by the server, and the execution steps comprise: the server receives an acquisition request of a file to be analyzed sent by the client, the acquisition request carries an address of the file to be analyzed, then the server reads the file to be analyzed according to the address of the file to be analyzed, and returns the file to be analyzed to the client.
S303, the user sends the appointed return data type to the client.
In a possible implementation manner, after the client calls a preset parsing toolkit set to parse a file to be parsed to obtain a target parameter, in order to implement specifiability of returned data, a user may send a specified returned data type to the client, where the specified returned data type may be input through a client display interface or implanted in a code manner.
The user can send a specified parameter to the client besides sending a specified return data type to the client, wherein the specified parameter is mainly used for describing attribute information of the return data. If weather is desired, the specified parameter may refer to a specific time, such as 10/1/2021, and further, the specified parameter may refer to a city and a time point.
S304, the client generates a call request according to the target parameters and the specified return data type.
S305, the client sends a calling request to the server.
Steps S304-S305 are the same as step S203 shown in fig. 2, and are not described again here. It should be noted that, in the process of generating the call request, the specified return data type may be encapsulated or may not be encapsulated. Meanwhile, the method also relates to a specified parameter sent by the user, and the specified parameter can be encapsulated into the call request, so that the server can accurately acquire the content which the user wants to acquire.
S306, the server receives the call request sent by the client and executes the call request to obtain a call result to be output.
In a possible implementation manner, after receiving a call request sent by a client, a server executes the call request, which is known from the above that the call request is substantially a web service call request, and therefore, the server executes the call request, namely, obtains a call result to be output corresponding to the call request through an interface.
S307, the server side sends the calling result to be output to the client side.
And S308, the client performs data conversion on the call result to be output according to the specified return data type to obtain a target output call result.
Step S307 is the same as step S205 shown in fig. 2, and is not described here again.
In the embodiment of the application, the application is explained mainly in a mode of interaction among a user, a client and a server, the implementation process of the application can be displayed more intuitively, and the user is mainly used for transmitting parameters to the client, such as specified return data types, specified parameters and the like; the client is mainly used for acquiring a file to be analyzed, generating a calling request and performing data conversion on a returned calling result to be output to obtain a target output calling result; the server is mainly used for executing the calling request and obtaining a calling result to be output. According to the embodiment of the application, on one hand, the preset analysis tool package can be directly used for analyzing the file to be analyzed, and then the calling request is generated, so that the efficiency of generating the calling request is improved; on the other hand, a call result specifying the type of return data can be obtained, thereby enriching the scheme and making the generality thereof high.
The embodiment of the application also provides a structural schematic diagram of the data calling device. Fig. 4 is a schematic structural diagram of a data call device according to an embodiment of the present application. The data call device 400 shown in fig. 4 may operate as follows:
an obtaining unit 401, configured to obtain a file to be analyzed, where the file is sent by a server;
a processing unit 402, configured to invoke a preset parsing toolkit set to parse the file to be parsed, so as to obtain a target parameter, where the target parameter is used to describe attribute information of the file to be parsed;
the processing unit 402 is further configured to generate a call request according to the target parameter;
a transceiver 403, configured to send the call request to a server, where the call request is used to obtain data meeting user requirements, and the call request includes a specified returned data type; receiving a to-be-output calling result returned by the server, wherein the to-be-output calling result is obtained by the server executing the calling request;
the processing unit 402 is further configured to perform data conversion on the call result to be output according to the specified return data type, so as to obtain a target output call result.
In a possible implementation manner, the obtaining unit 401 obtains a file to be analyzed of a server, and is specifically configured to:
receiving an acquisition instruction of a file to be analyzed, wherein the acquisition instruction carries an address of the file to be analyzed, and the address of the file to be analyzed comprises an acquisition path;
and acquiring a file to be analyzed corresponding to the server according to the acquisition path, wherein the file to be analyzed is matched with the address of the file to be analyzed.
In a possible implementation manner, the processing unit 402 invokes a preset parsing toolkit set to parse the file to be parsed, so as to obtain a target parameter, which is specifically configured to:
determining the type of a target file of the file to be analyzed;
determining a target analysis toolkit from the preset analysis toolkit set according to the target file type, wherein the preset analysis toolkit set comprises a plurality of analysis toolkits, and each analysis toolkit has a corresponding relation with the target file type of the file to be analyzed;
and calling the target analysis toolkit to analyze the file to be analyzed to obtain target parameters.
In a possible implementation manner, the processing unit 402 generates a call request according to the target parameter, and is specifically configured to:
creating a request head and a request body according to the target parameters to obtain a message template;
acquiring a specified returned data type and specified parameters, wherein the specified parameters are used for describing attribute information of returned data;
and repackaging the message template by using the specified return data type and the specified parameters to obtain a calling request.
In a possible implementation manner, the processing unit 402 is further configured to:
storing the message template;
and if any one of the target parameter, the specified return data type and the specified parameter is detected to be changed, generating a new calling request according to the changed data.
According to an embodiment of the present application, the steps involved in the data calling methods shown in fig. 2 and fig. 3 may be performed by the units in the data calling apparatus shown in fig. 4. For example, step S201 in the data call method shown in fig. 2 may be performed by the obtaining unit 401 in the data call apparatus shown in fig. 4, step S202, step S203, and step S205 may be performed by the processing unit 402 in the data call apparatus shown in fig. 4, and step S204 may be performed by the transceiving unit 403 in the data call apparatus shown in fig. 4; as another example, step S301 in the data call method shown in fig. 3 may be performed by the obtaining unit 401 in the data call apparatus shown in fig. 4, step S302, step S304, and step S308 may be performed by the processing unit 402 in the data call apparatus shown in fig. 4, and step S305 may be performed by the transceiving unit 403 in the data call apparatus shown in fig. 4.
According to another embodiment of the present application, the units in the data call device shown in fig. 4 may be respectively or entirely combined into one or several other units to form a structure, or some unit(s) therein may be further split into multiple functionally smaller units to form a structure, which may achieve the same operation without affecting the implementation of the technical effect of the embodiment of the present application. The units are divided based on logic functions, and in practical application, the functions of one unit can be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit. In other embodiments of the present application, the data-based calling device may also include other units, and in practical applications, these functions may also be implemented by assistance of other units, and may be implemented by cooperation of multiple units.
According to another embodiment of the present application, the data call apparatus as shown in fig. 4 may be constructed by running a computer program (including program codes) capable of executing the steps involved in the respective methods as shown in fig. 2 and 3 on a general-purpose computing device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and a storage element, and implementing the data call method of the embodiment of the present application. The computer program may be, for example, embodied on a computer-readable storage medium, and loaded into and executed by the above-described client via the computer-readable storage medium.
In the embodiment of the application, an obtaining unit 401 of a client obtains a file to be analyzed of a server, and a processing unit 402 calls a preset analysis toolkit set to analyze the file to be analyzed to obtain a target parameter, where the target parameter is used for describing attribute information of the file to be analyzed; then generating a calling request according to the target parameter; the receiving and sending unit sends the call request to the server, the call request comprises the specified returned data type, and receives the call result to be output, which is returned after the server executes the call request; finally, the processing unit 402 performs data conversion on the call result to be output according to the specified return data type to obtain the target output call result. In the method, on one hand, the preset analysis tool package can be directly used for analyzing the file to be analyzed, and then the calling request is generated, so that the efficiency of generating the calling request is improved; on the other hand, a call result specifying the type of return data can be obtained, thereby enriching the scheme and making the generality thereof high.
The embodiment of the application also provides a structural schematic diagram of another data calling device. Referring to fig. 5, a schematic structural diagram of another data invoking device provided in the embodiment of the present application is shown. The data call device 500 shown in fig. 5 may operate as follows:
the receiving and sending unit 501 is configured to receive a call request sent by a client, where the call request is generated by the client calling a preset analysis toolkit to analyze a file to be analyzed to obtain a target parameter and then according to the target parameter;
a processing unit 502, configured to execute the call request to obtain a call result to be output;
the transceiving unit 501 is further configured to send the to-be-output call result to the client, so that the client performs data conversion on the to-be-output call result according to the specified return data type to obtain a target output call result.
In a possible implementation manner, the transceiver unit 501 is further configured to receive an obtaining request of a file to be analyzed sent by the client, where the obtaining request carries an address of the file to be analyzed;
the processing unit 502 is further configured to read a file to be parsed according to the address of the file to be parsed, and return the file to be parsed to the client.
According to an embodiment of the present application, the steps involved in the data call method shown in fig. 3 may be performed by the units in the data call apparatus shown in fig. 5. For example, the "server receives the call request sent by the client" in step S306 and step S307 in the data call method shown in fig. 3 may be performed by the transceiver unit 501 in the data call apparatus shown in fig. 5, and the "execute the call request, obtain the call result to be output" in step S306 may be performed by the processing unit 502 in the data call apparatus shown in fig. 5.
According to another embodiment of the present application, the units in the data call device shown in fig. 5 may be respectively or entirely combined into one or several other units to form a structure, or some unit(s) therein may be further split into multiple functionally smaller units to form a structure, which may achieve the same operation without affecting the implementation of the technical effect of the embodiment of the present application. The units are divided based on logic functions, and in practical application, the functions of one unit can be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit. In other embodiments of the present application, the data-based calling device may also include other units, and in practical applications, these functions may also be implemented by assistance of other units, and may be implemented by cooperation of multiple units.
According to another embodiment of the present application, the data call apparatus as shown in fig. 5 may be constructed by running a computer program (including program codes) capable of executing the steps involved in the corresponding method as shown in fig. 3 on a general-purpose computing device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and a storage element, and implementing the data call method according to the embodiment of the present application. The computer program may be, for example, embodied on a computer-readable storage medium, and loaded into and executed by the above-described client via the computer-readable storage medium.
Based on the description of the method embodiment and the apparatus item embodiment, the embodiment of the present application further provides a data call device; the data call device may be the client shown in fig. 1, or may be the server shown in fig. 1. Referring to fig. 6, the data call device may include at least a processor 601, an input interface 602, an output interface 603, and a computer storage medium 604; the processor 601, the input interface 602, the computer storage medium 604, and the memory 605 may be connected by a bus or other connection means.
The computer storage medium 604 may be stored in a memory of the data call device, the computer storage medium 604 is configured to store one or more first computer programs, the processor 601 is configured to execute the one or more first computer programs stored in the computer storage medium 604, and the processor 601 (or CPU) is a computing core and a control core of the data call device, which is adapted to implement the one or more first computer programs, and is specifically adapted to load and execute the one or more first computer programs so as to implement the corresponding method flows or the corresponding functions in the above-described data call method embodiments.
An embodiment of the present application further provides a computer-readable storage medium (Memory), which is a Memory device in the data call device 600 and is used for storing programs and data. It is understood that the computer readable storage medium herein may include both the built-in storage medium in the data call device 600 and, of course, an extended storage medium supported by the data call device 600. The computer-readable storage medium provides a storage space storing an operating system of the data call device 600. Also stored in this memory space are one or more instructions, which may be one or more computer programs (including program code), suitable for loading and execution by processor 601. It should be noted that the computer-readable storage medium may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as at least one disk memory; and optionally at least one computer readable storage medium located remotely from the aforementioned processor.
In one embodiment, when the data call device is a client, the computer storage medium may be loaded and executed by processor 601 with one or more instructions stored in the computer storage medium to implement the corresponding steps described above with respect to the data call method shown in fig. 2 and 3. In particular implementations, one or more instructions in the computer storage medium are loaded and executed by processor 601 to perform the steps of:
acquiring a file to be analyzed sent by a server;
calling a preset analysis toolkit set to analyze the file to be analyzed to obtain target parameters, wherein the target parameters are used for describing attribute information of the file to be analyzed;
generating a calling request according to the target parameter, and sending the calling request to a server, wherein the calling request is used for acquiring data meeting the user requirement, and the calling request comprises a specified returned data type;
receiving a to-be-output calling result returned by the server, wherein the to-be-output calling result is obtained by the server executing the calling request;
and performing data conversion on the calling result to be output according to the specified returned data type to obtain a target output calling result.
In a possible implementation manner, the acquiring, by the processor 601, a file to be parsed by a server includes:
receiving an acquisition instruction of a file to be analyzed, wherein the acquisition instruction carries an address of the file to be analyzed, and the address of the file to be analyzed comprises an acquisition path;
and acquiring a file to be analyzed corresponding to the server according to the acquisition path, wherein the file to be analyzed is matched with the address of the file to be analyzed.
In a possible implementation manner, the invoking, by the processor 601, a preset parsing toolkit set to parse the file to be parsed to obtain the target parameter includes:
determining the type of a target file of the file to be analyzed;
determining a target analysis toolkit from the preset analysis toolkit set according to the target file type, wherein the preset analysis toolkit set comprises a plurality of analysis toolkits, and each analysis toolkit has a corresponding relation with the target file type of the file to be analyzed;
and calling the target analysis toolkit to analyze the file to be analyzed to obtain target parameters.
In a possible implementation manner, the generating, by the processor 601, a call request according to the target parameter includes:
creating a request head and a request body according to the target parameters to obtain a message template;
acquiring a specified returned data type and specified parameters, wherein the specified parameters are used for describing attribute information of returned data;
and repackaging the message template by using the specified return data type and the specified parameters to obtain a calling request.
In a possible implementation manner, the processor 601 is further configured to:
storing the message template;
and if any one of the target parameter, the specified return data type and the specified parameter is detected to be changed, generating a new calling request according to the changed data.
According to an aspect of the present application, the present application embodiment also provides a computer product or a computer program, which includes computer instructions, which are stored in a computer-readable storage medium. The processor 601 reads the computer instructions from the computer-readable storage medium, and the processor 601 executes the computer instructions, so that the client 600 executes the data call method shown in fig. 2 and 3.
In another embodiment, when the data call device is a server, the computer storage medium may be loaded and executed by the processor 601 with one or more instructions stored in the computer storage medium to implement the corresponding steps described above with respect to the data call method shown in fig. 3. In particular implementations, one or more instructions in the computer storage medium are loaded and executed by processor 601 to perform the steps of:
receiving a calling request sent by a client, wherein the calling request is generated according to a target parameter after the client calls a preset analysis toolkit to analyze a file to be analyzed to obtain the target parameter;
executing the calling request to obtain a calling result to be output;
and sending the calling result to be output to the client so that the client performs data conversion on the calling result to be output according to the specified returned data type to obtain a target output calling result.
In a possible implementation manner, the processor 601 is further configured to:
receiving an acquisition request of a file to be analyzed sent by the client, wherein the acquisition request carries an address of the file to be analyzed;
and reading the file to be analyzed according to the address of the file to be analyzed, and returning the file to be analyzed to the client.
According to an aspect of the present application, the present application embodiment also provides a computer product or a computer program, which includes computer instructions, which are stored in a computer-readable storage medium. The processor 601 reads the computer instructions from the computer-readable storage medium, and the processor 601 executes the computer instructions, so that the server 600 executes the data call method shown in fig. 3.
It is emphasized that the data may also be stored in a node of a blockchain in order to further ensure the privacy and security of the data. The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the above-described modules is merely a logical division, and other divisions may be realized in practice, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A data calling method is applied to a client, and comprises the following steps:
acquiring a file to be analyzed sent by a server;
calling a preset analysis toolkit set to analyze the file to be analyzed to obtain target parameters, wherein the target parameters are used for describing attribute information of the file to be analyzed;
generating a calling request according to the target parameter, and sending the calling request to the server, wherein the calling request is used for acquiring data meeting the user requirement, and the calling request comprises a specified returned data type;
receiving a to-be-output calling result returned by the server, wherein the to-be-output calling result is obtained by the server executing the calling request;
and performing data conversion on the calling result to be output according to the specified returned data type to obtain a target output calling result.
2. The method according to claim 1, wherein the obtaining the file to be parsed of the server comprises:
receiving an acquisition instruction of a file to be analyzed, wherein the acquisition instruction carries an address of the file to be analyzed, and the address of the file to be analyzed comprises an acquisition path;
and acquiring a file to be analyzed corresponding to the server according to the acquisition path, wherein the file to be analyzed is matched with the address of the file to be analyzed.
3. The method according to claim 1, wherein the invoking a preset parsing toolkit set to parse the file to be parsed to obtain a target parameter comprises:
determining the type of a target file of the file to be analyzed;
determining a target analysis toolkit from the preset analysis toolkit set according to the target file type, wherein the preset analysis toolkit set comprises a plurality of analysis toolkits, and each analysis toolkit has a corresponding relation with the target file type of the file to be analyzed;
and calling the target analysis toolkit to analyze the file to be analyzed to obtain target parameters.
4. The method of claim 1, wherein generating a call request according to the target parameter comprises: creating a request head and a request body according to the target parameters to obtain a message template;
acquiring a specified returned data type and specified parameters, wherein the specified parameters are used for describing attribute information of returned data;
and repackaging the message template by using the specified return data type and the specified parameters to obtain a calling request.
5. The method of claim 4, further comprising:
storing the message template;
and if any one of the target parameter, the specified return data type and the specified parameter is detected to be changed, generating a new calling request according to the changed data.
6. A data calling method is applied to a server side, and comprises the following steps:
receiving a calling request sent by a client, wherein the calling request is generated according to a target parameter after the client calls a preset analysis toolkit to analyze a file to be analyzed to obtain the target parameter;
executing the calling request to obtain a calling result to be output;
and sending the calling result to be output to the client so that the client performs data conversion on the calling result to be output according to the specified returned data type to obtain a target output calling result.
7. The method of claim 6, further comprising:
receiving an acquisition request of a file to be analyzed sent by the client, wherein the acquisition request carries an address of the file to be analyzed;
and reading the file to be analyzed according to the address of the file to be analyzed, and returning the file to be analyzed to the client.
8. A data call apparatus, characterized in that the data call apparatus comprises:
the acquisition unit is used for acquiring a file to be analyzed sent by the server;
the processing unit is used for calling a preset analysis toolkit set to analyze the file to be analyzed to obtain target parameters, and the target parameters are used for describing attribute information of the file to be analyzed;
the processing unit is further configured to generate a call request according to the target parameter:
the receiving and sending unit is used for sending the calling request to the server, the calling request is used for acquiring data meeting the user requirements, and the calling request comprises a specified returned data type;
the receiving and sending unit is further configured to receive a to-be-output calling result returned by the server, where the to-be-output calling result is obtained by the server executing the calling request;
the processing unit is further used for performing data conversion on the calling result to be output according to the specified return data type to obtain a target output calling result;
or, the data calling device includes:
the system comprises a receiving and sending unit, a processing unit and a processing unit, wherein the receiving and sending unit is used for receiving a calling request sent by a client, and the calling request is generated according to a target parameter after the client calls a preset analysis toolkit to analyze a file to be analyzed to obtain the target parameter;
the processing unit is used for executing the calling request to obtain a calling result to be output;
the receiving and sending unit is further configured to send the call result to be output to the client, so that the client performs data conversion on the call result to be output according to the specified returned data type to obtain a target output call result.
9. A data call device, characterized in that the data call device comprises:
a processor adapted to implement one or more computer programs; and the number of the first and second groups,
a computer storage medium storing one or more computer programs adapted to be loaded by the processor and to perform the data call method of any of claims 1-5, or 6-7.
10. A computer-readable storage medium, in which one or more computer programs are stored, the computer programs being adapted to be loaded by a processor and to perform the data call method according to any one of claims 1-5, or 6-7.
CN202111195335.XA 2021-10-14 2021-10-14 Data calling method, device, equipment and computer readable storage medium Pending CN113918245A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111195335.XA CN113918245A (en) 2021-10-14 2021-10-14 Data calling method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111195335.XA CN113918245A (en) 2021-10-14 2021-10-14 Data calling method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113918245A true CN113918245A (en) 2022-01-11

Family

ID=79240203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111195335.XA Pending CN113918245A (en) 2021-10-14 2021-10-14 Data calling method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113918245A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086441A (en) * 2022-06-09 2022-09-20 北京百度网讯科技有限公司 Information transmission method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086441A (en) * 2022-06-09 2022-09-20 北京百度网讯科技有限公司 Information transmission method and device, electronic equipment and storage medium
CN115086441B (en) * 2022-06-09 2024-03-19 北京百度网讯科技有限公司 Information transmission method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US20140351829A1 (en) System and method for processing messages in a service-oriented pipeline architecture
US20080282222A1 (en) Xml push and remote execution of a wireless applications
US7920852B2 (en) Compression of data transmitted between server and mobile device
CN111722947A (en) Service calling method and system
US10303529B2 (en) Protocol for communication of data structures
US20130145381A1 (en) Web api server program, web api publication method
CN110187986B (en) Command management method, system, device and computer readable storage medium
US20020046304A1 (en) Dynamic class loading
CN109343975B (en) Method and apparatus for inter-page asynchronous communication
CN104717647A (en) Service capability authentication method, equipment and system
CN112422450B (en) Computer equipment, and flow control method and device for service request
CN112511591A (en) Method, device, equipment and medium for realizing hospital interface data interaction
US10924527B2 (en) Dynamic workflow-based composite web service system and method
CN109343970B (en) Application program-based operation method and device, electronic equipment and computer medium
CN113448655B (en) C standard dynamic library calling method and device
CN105224594B (en) Service-oriented architecture data interconnection query system and query method
CN113918245A (en) Data calling method, device, equipment and computer readable storage medium
CN101964742B (en) Method, system and device for using network open ability
CN107395663B (en) Data acquisition method and device
CN109525550B (en) Data message processing method, device and system
CN110022332B (en) Hypertext transfer security protocol proxy method, device, equipment and medium
CN112579212A (en) Cross-language calling method, calling party device and called party device
CN112769741B (en) Message communication method and electronic equipment
CN113992641A (en) Data processing method, device, equipment and storage medium
CN113626222A (en) Message processing method and device, computer 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220922

Address after: Room 2601 (Unit 07), Qianhai Free Trade Building, No. 3048, Xinghai Avenue, Nanshan Street, Qianhai Shenzhen-Hong Kong Cooperation Zone, Shenzhen, Guangdong 518000

Applicant after: Shenzhen Ping An Smart Healthcare Technology Co.,Ltd.

Address before: 1-34 / F, Qianhai free trade building, 3048 Xinghai Avenue, Mawan, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong 518000

Applicant before: Ping An International Smart City Technology Co.,Ltd.