CN114896272A - Information acquisition method and device, electronic equipment and computer readable storage medium - Google Patents

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

Info

Publication number
CN114896272A
CN114896272A CN202210673956.2A CN202210673956A CN114896272A CN 114896272 A CN114896272 A CN 114896272A CN 202210673956 A CN202210673956 A CN 202210673956A CN 114896272 A CN114896272 A CN 114896272A
Authority
CN
China
Prior art keywords
information
request
requester
request parameter
query
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
CN202210673956.2A
Other languages
Chinese (zh)
Inventor
赫振军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202210673956.2A priority Critical patent/CN114896272A/en
Publication of CN114896272A publication Critical patent/CN114896272A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24554Unary operations; Data partitioning operations
    • G06F16/24556Aggregation; Duplicate elimination
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses an information acquisition method, an information acquisition device, electronic equipment and a computer readable storage medium, and relates to the technical field of computer application, wherein the method comprises the following steps: obtaining a request description file based on an information acquisition request of a requester; analyzing the request description file, and determining a request parameter set corresponding to the request information of the requester; based on the request parameter set, target information corresponding to each request parameter in the request parameter set is obtained through query; and returning the target information to the requester. By applying the technical scheme provided by the embodiment of the invention, the determined request parameter set corresponds to the request information of the requester, so that the target information corresponding to each queried request parameter corresponds to the request information of the requester, information acquisition is realized as required, information irrelevant to the request parameters is prevented from being returned to the requester, and the information safety is improved.

Description

Information acquisition method and device, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to an information obtaining method and apparatus, an electronic device, and a computer-readable storage medium.
Background
Nowadays, various business systems store more and more information during operation. For example, a video service system may store a large amount of user basic information, contract information, video viewing information, and the like.
When information needs to be acquired, at present, corresponding information is mostly obtained through an API (Application Programming Interface) Interface query. And different API interfaces correspond to the acquisition of information of different information types. When a certain API interface is used for inquiring, all information of the information type corresponding to the API interface is obtained. For example, after the user identification information is acquired and queried through a corresponding API interface, all user basic information including the user identification information, such as a name, a phone number, an identification card, and the like, may be acquired. This results in excessive information output and less security of the information.
Disclosure of Invention
Embodiments of the present invention provide an information acquisition method, an information acquisition apparatus, an electronic device, and a computer-readable storage medium, so as to achieve information acquisition on demand and improve information security. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides an information obtaining method, including:
obtaining a request description file based on an information acquisition request of a requester;
analyzing the request description file, and determining a request parameter set corresponding to the request information of the requester;
based on the request parameter set, target information corresponding to each request parameter in the request parameter set is obtained through query;
and returning the target information to the requester.
In a specific embodiment of the present invention, the parsing the request description file and determining a request parameter set corresponding to request information of the requester includes:
and analyzing to obtain a request parameter corresponding to each request message of the requester according to the file structure of the request description file, and obtaining a request parameter set.
In a specific embodiment of the present invention, the querying and obtaining target information corresponding to each request parameter in the request parameter set based on the request parameter set includes:
determining the information type corresponding to each request parameter included in the request parameter set;
generating a query instruction according to the request parameters of the current information type aiming at each information type;
and inquiring to obtain target information corresponding to the request parameter of the current information type based on the inquiry instruction.
In a specific embodiment of the present invention, the querying to obtain the target information corresponding to the request parameter of the current information type based on the query instruction includes:
and according to the identification information of the current information type carried in the query instruction, obtaining target information corresponding to the request parameter of the current information type through the micro-service query of the current information type.
In a specific embodiment of the present invention, before the obtaining the request description file based on the information obtaining request of the requesting party, the method further includes:
and outputting information supporting query based on an information base according to the capability display instruction sent by the requester, so that the requester sends the information acquisition request according to the information supporting query.
In one embodiment of the present invention, the method further comprises:
and updating the information base when detecting that the information supporting the query is changed.
In a specific embodiment of the present invention, the outputting information for displaying a support query based on an information base includes:
and outputting the information for displaying the support query in the form of an information association diagram based on the information base, wherein the information association diagram comprises the set information of each information type and the association relationship among the information.
In a specific embodiment of the present invention, the information obtaining request is received through a unified aggregation interface.
In a second aspect, an embodiment of the present invention provides an information acquiring apparatus, including:
the obtaining module is used for obtaining a request based on the information obtaining request of the requester and obtaining a request description file;
the analysis module is used for analyzing the request description file and determining a request parameter set corresponding to the request information of the requester;
the query module is used for querying and obtaining target information corresponding to each request parameter in the request parameter set based on the request parameter set;
and the return module is used for returning the target information to the requester.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor configured to implement the steps of the information acquisition method according to the first aspect when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the information acquisition method according to the first aspect.
In a fifth aspect, the embodiment of the present invention provides a computer program product, where the computer program product includes computer instructions stored in a computer-readable storage medium and adapted to be read and executed by a processor, so as to enable an electronic device having the processor to execute the information acquisition method according to the first aspect.
By applying the technical scheme provided by the embodiment of the invention, the request description file is analyzed to determine the request parameter set corresponding to the request information of the requester, the target information corresponding to each request parameter in the request parameter set is obtained by inquiry, then the target information is returned to the requester, and the determined request parameter set corresponds to the request information of the requester, so that the target information corresponding to each request parameter obtained by inquiry corresponds to the request information of the requester, information acquisition as required is realized, information irrelevant to the request parameters is prevented from being returned to the requester, and the information safety is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
In order to more clearly illustrate the embodiments of the present invention 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.
Fig. 1 is a flowchart of an embodiment of an information obtaining method according to the present invention;
FIG. 2 is a schematic diagram of an overall framework of a business system according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an information acquisition apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device in an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
The core of the invention is to provide an information acquisition method which can be applied to information acquisition scenes in various service systems. For example, in a video service system, basic information of a user, contract information, and the like are acquired. The method comprises the steps of analyzing a request description file, determining a request parameter set corresponding to request information of a requester, inquiring to obtain target information corresponding to each request parameter in the request parameter set, returning the target information to the requester, and enabling the determined request parameter set to correspond to the request information of the requester, so that the target information corresponding to each request parameter obtained through inquiry corresponds to the request information of the requester, information acquisition according to needs is achieved, information irrelevant to the request parameters is prevented from being returned to the requester, and information safety is improved.
Referring to fig. 1, which is a flowchart illustrating an implementation of an information obtaining method according to an embodiment of the present invention, the method may include the following steps:
s110: and obtaining the request description file based on the information acquisition request of the requester.
The technical scheme provided by the embodiment of the invention can be executed by the query gateway, and specifically, the query gateway can be a graph QL gateway.
In the embodiment of the invention, when the requester has the information acquisition requirement, the requester can send out a corresponding information acquisition request. For example, in a video service system, if user basic information or contract information is to be acquired, a corresponding information acquisition request may be issued.
The requester can call the system front-end client or the third-party client to send a corresponding information acquisition request to the query gateway. The file structure of the request description file can be predefined, the request party can generate the request description file based on the file structure of the request description file according to the actual information acquisition requirement, the request description file can be carried in the sent information acquisition request, and the system front-end client or the third-party client directly forwards the information acquisition request carrying the request description file to the query gateway, so that the query gateway can obtain the request description file.
Or the system front-end client or the third-party client may output and display the queryable item to the requester, the requester inputs the query information according to the queryable item, and the information acquisition request carries specific query information, and after receiving the information acquisition request of the requester, the system front-end client or the third-party client may generate a request description file based on the query information in the information acquisition request, and then send the information acquisition request carrying the request description file to the query gateway, so that the query gateway can obtain the request description file.
Request parameter information may be included in the request description file. For example, the request description file is:
Figure BDA0003695662900000051
the request parameter information included in the request description file is a user name (username) and a telephone number (telephone) of a user (user) having a certain identification (id).
S120: and analyzing the request description file, and determining a request parameter set corresponding to the request information of the requester.
After the request description file is obtained based on the information acquisition request of the requester, the request description file may be parsed. The request description file includes request parameter information. After the request description file is analyzed, a request parameter set corresponding to the request information of the requester can be determined. The request parameter set may include one or more request parameters. Each request parameter corresponds to the actual request information of the requesting party.
For example, analyzing the request description file in the above example, it may be determined that the request parameters included in the request parameter set corresponding to the request information of the requesting party are: the user's username with a certain id, the user's telephone with a certain id.
S130: and based on the request parameter set, inquiring to obtain target information corresponding to each request parameter in the request parameter set.
In the embodiment of the invention, the request description file is analyzed, and after the request parameter set corresponding to the request information of the requester is determined, the target information corresponding to each request parameter in the request parameter set can be obtained by querying based on the request parameter set.
The request parameter set may include one or more request parameters, and the information types corresponding to different request parameters are the same or different. For each request parameter, the target information corresponding to the request parameter can be obtained by querying in a database of the information type corresponding to the request parameter or a third-party information base.
The request description file may be parsed by an SDK (Software Development Kit), the determined request parameters may be converted into object types, for example, java objects, and the target information corresponding to each request parameter may be obtained by querying an object type request database or a third-party information base.
One request description file can contain a plurality of request parameters, and target information corresponding to the plurality of request parameters can be acquired simultaneously. The information types corresponding to different request parameters may be the same or different. The information stored in the service system may have various information types such as a basic information type, a contract information type, an operation information type, a video information type, and the like.
The request description file corresponding to the primary information acquisition request is analyzed, and the determined request parameter set comprises a plurality of request parameters, so that a plurality of target information of the same or different information types can be acquired. And different API interfaces are not required to be called to acquire information of different information types, so that the information acquisition is more convenient.
S140: and returning the target information to the requester.
After the target information corresponding to each request parameter in the request parameter set is obtained through query, the target information can be returned to the requesting party, so that the requesting party can obtain actually required information. Specifically, after the target information obtained by query is assigned according to the specific field of the object type, the display target information is output through the system front-end client or the third-party client, and the target information can be returned to the requesting party in a document form.
By applying the method provided by the embodiment of the invention, the request description file is analyzed to determine the request parameter set corresponding to the request information of the requester, the target information corresponding to each request parameter in the request parameter set is obtained by query, then the target information is returned to the requester, and the determined request parameter set corresponds to the request information of the requester, so that the target information corresponding to each request parameter obtained by query corresponds to the request information of the requester, the information acquisition as required is realized, the information irrelevant to the request parameters is prevented from being returned to the requester, and the information safety is improved.
In an embodiment of the present invention, parsing the request description file to determine a request parameter set corresponding to request information of a requester may include the following steps:
and analyzing to obtain a request parameter corresponding to each request message of the requester according to the file structure of the request description file, and obtaining a request parameter set.
In the embodiment of the present invention, the request description file has a set file structure, such as the file structure shown below:
Figure BDA0003695662900000071
according to the file structure of the request description file, the request parameters corresponding to each request message of the requesting party can be obtained through analysis, and a request parameter set is obtained. As shown above, the request parameters corresponding to each request message of the requesting party obtained by analyzing are respectively: user name of the user with id, telephone of the user with id.
And the set of the request parameters corresponding to each request message of the requesting party obtained by analysis is the request parameter set.
According to the file structure of the request description file, the request parameters can be quickly and accurately analyzed.
In an embodiment of the present invention, based on the request parameter set, querying to obtain target information corresponding to each request parameter in the request parameter set, may include the following steps:
the method comprises the following steps: determining the information type corresponding to each request parameter included in the request parameter set;
step two: generating a query instruction according to the request parameters of the current information type aiming at each information type;
step three: and based on the query instruction, querying to obtain target information corresponding to the request parameter of the current information type.
For convenience of description, the above three steps are combined for illustration.
The request description file is analyzed, and after a request parameter set corresponding to the request information of the requester is determined, the information type corresponding to each request parameter included in the request parameter set can be further determined. The information type may be a basic information type, a video information type, an operation information type, a fan information type, and the like.
The information type corresponding to the request parameter can be determined through the field of the request parameter, if the field of the request parameter includes username, the information type corresponding to the request parameter can be determined as a basic information type, and if the field of the request parameter includes contctno, the information type corresponding to the request parameter can be determined as a contract information type.
For each information type, a query instruction may be generated according to the request parameters of the current information type. The query instruction may carry identification information of the corresponding request parameter and the current information type. The current information type is the information type for which the current operation is directed.
Specifically, the query instruction may be generated according to a set query language, such as a graphQL query language. If the request parameters of the current information type include user name with id and telephone with id, the generated query instruction may be: select username, telephone from USER where id $ { id }.
Based on the query instruction, the target information corresponding to the request parameter of the current information type can be obtained through query.
The information type corresponding to each request parameter included in the request parameter set is determined, then, for each information type, a query instruction is generated according to the request parameter of the current information type, and the target information corresponding to the request parameter of the current information type can be quickly obtained.
In an embodiment of the present invention, based on the query instruction, querying to obtain the target information corresponding to the request parameter of the current information type may include the following steps:
and according to the identification information of the current information type carried in the query instruction, obtaining the target information corresponding to the request parameter of the current information type through the micro-service query of the current information type.
A plurality of micro services can be deployed in the business system, for example, a basic information (basic) micro service, a video (video) information micro service, an operation (operation) information micro service, a contract (contract) information micro service, a self media (self media) information micro service, a fan (fans) information micro service, a Wangda information micro service, an income (income) information micro service, and the like can be deployed in the video business system.
Different information types may correspond to different microservices. For example, the basic information type may correspond to a basic information microservice, the video information type may correspond to a video information microservice, the operation information type may correspond to an operation information microservice, the contract information type may correspond to a contract information microservice, and so on.
For each information type, the generated query instruction can carry the corresponding request parameters and the identification information of the current information type according to the request parameters of the current information type. According to the identification information of the current information type carried in the query instruction, the micro service corresponding to the current information type can be determined, and then the target information corresponding to the request parameter of the current information type is obtained through micro service query. The micro-service can pull the target information corresponding to the request parameter of the current information type from the database or a third-party information base.
Different micro-services can correspondingly manage corresponding information. Target information corresponding to the request parameters is obtained through micro-service query, and information obtaining efficiency can be improved.
In an embodiment of the present invention, before obtaining the request description file based on the information obtaining request of the requester, the method may further include the following steps:
and outputting and displaying the query supporting information based on the information base according to the capability display instruction sent by the requester, so that the requester sends an information acquisition request according to the query supporting information.
In the embodiment of the invention, when the requester needs to acquire the information, the requester can determine the information query capability and send out a corresponding capability display instruction. After receiving the capability display instruction sent by the requester, the information for displaying the supporting query can be output based on the information base, and the information for displaying the supporting query can be output, so that the information query capability can be represented. Specifically, the display can be in the form of a chart, a text or a document through a human-computer interaction interface. All information that can currently provide a query can be determined by the information that supports the query. After the information supporting query is checked by the requester, the information query capability can be known, and a corresponding information acquisition request can be sent according to the information supporting query.
For example, the information supporting the query includes all information of information type a and information type B.
The information type a includes information:
Figure BDA0003695662900000091
wherein username represents the user name, telephone represents the telephone number, and email represents the mailbox.
The information type B includes information:
Figure BDA0003695662900000101
where, contctno represents a contract number, authStart represents an authority start time, and authEnd represents an authority end time.
The requesting party sends out a corresponding information acquisition request according to the information query capability, acquires a request description file based on the information acquisition request of the requesting party, analyzes the request description file, and can determine a request parameter set corresponding to the request information of the requesting party. Such as:
Figure BDA0003695662900000102
in the above, there are two request parameters, i.e., user name of user with id1 and contract no of user with id2, indicating that the requester is to acquire the user name of the user with id1 in information type a and the contract number information of the user with id2 in information type B.
After the target information corresponding to each request parameter in the request parameter set is obtained through inquiry, the target information can be returned. If the target information obtained by query is:
Figure BDA0003695662900000103
Figure BDA0003695662900000111
the obtained target information comprises: the user name of the user with id1 is Zhang III, and the contract number of the user with id2 is 18.
The information which supports the query is displayed and displayed on the basis of the information base output, so that a requester can comprehensively know all information which can be queried, the information to be acquired can be accurately determined, and the information acquisition efficiency and accuracy are improved.
In one embodiment of the present invention, the information base is updated when a change in information supporting a query is detected. During the operation of the business system, the information stored in the business system may be increased or decreased, and the information base may be updated synchronously in case of detecting the information change supporting the inquiry. Therefore, when the capability display instruction sent by the requester is received again, the information for displaying the supporting query can be output based on the updated information base, the latest information query capability is represented, and the information acquisition efficiency and accuracy are further improved.
In an embodiment of the invention, the information for presenting the support query may be output in the form of an information association diagram based on the information base, and the information association diagram may include information of each set information type and association relationship between the information.
The information of each information type stored in the business system, such as information of a basic information type, a contract information type, and the like, and associated information may be drawn into a Graph based on Graph ql (Graph Query Language), so as to obtain an information association Graph. The requester can know all information capable of providing the query through the information association diagram, and sends an information acquisition request as required to form a request description file. Therefore, the development process is simpler and more convenient, and the information acquisition efficiency is improved.
For example, in a video service system, a user has multiple rights, such as self-media, web, drama, child, animation, and the like, and the corresponding information types are respectively a self-media information type, a web information type, a drama information type, a child information type, and an animation information type, and a requester can obtain a desired result only by describing which information type is required according to actual needs, without calling multiple API interfaces to obtain information.
In an embodiment of the present invention, the information acquisition request may be received through a unified aggregation interface, that is, information of each information type is acquired through the unified aggregation interface, so that information acquisition is more convenient, and information acquisition efficiency is improved.
For ease of understanding, the embodiments of the present invention will be described again in the overall framework of the business system shown in fig. 2.
The technical scheme provided by the embodiment of the invention can be applied to a service system. As shown in fig. 2, the business system may include a caller, a gateway layer, a micro service layer and a database, wherein the gateway layer may include a graph ql gateway, the graph ql gateway operates based on an underlying framework (graph ql-java-spring) of the graph ql specification, the micro service layer may include a plurality of micro services, such as a basic information micro service, a video information micro service, an operation information micro service, and the like, and the micro service layer may be automatically expanded in the k8s system. The requester can send an information acquisition request through a caller, namely a system front-end client or a third-party client, the graphQL gateway can obtain a request description file based on the information acquisition request, analyze the request description file, determine a request parameter set corresponding to the request information of the requester, query in a database through corresponding micro-services to obtain target information corresponding to each request parameter, such as basic information, contract information, video information and the like, and then return to the requester through the caller.
The determined request parameter set corresponds to the request information of the requester, so that the target information corresponding to each request parameter obtained by query corresponds to the request information of the requester, information acquisition is realized as required, information irrelevant to the request parameters is prevented from being returned to the requester, and the information safety is improved.
Corresponding to the above method embodiments, embodiments of the present invention further provide an information acquiring apparatus, and the information acquiring apparatus described below and the information acquiring method described above may be referred to in correspondence with each other.
Referring to fig. 3, the information acquisition apparatus 300 may include the following modules:
an obtaining module 310, configured to obtain a request description file based on an information obtaining request of a requester;
the parsing module 320 is configured to parse the request description file and determine a request parameter set corresponding to the request information of the requester;
the query module 330 is configured to query, based on the request parameter set, to obtain target information corresponding to each request parameter in the request parameter set;
a returning module 340, configured to return the target information to the requesting party.
By applying the device provided by the embodiment of the invention, the request parameter set corresponding to the request information of the requester is determined by analyzing the request description file, the target information corresponding to each request parameter in the request parameter set is obtained by query, then the target information is returned to the requester, and the determined request parameter set corresponds to the request information of the requester, so that the target information corresponding to each request parameter obtained by query corresponds to the request information of the requester, information acquisition as required is realized, information irrelevant to the request parameters is prevented from being returned to the requester, and the information safety is improved.
In an embodiment of the present invention, the parsing module 320 is configured to:
and analyzing to obtain a request parameter corresponding to each request message of the requester according to the file structure of the request description file, and obtaining a request parameter set.
In an embodiment of the present invention, the query module 330 is configured to:
determining the information type corresponding to each request parameter included in the request parameter set;
generating a query instruction according to the request parameters of the current information type aiming at each information type;
and based on the query instruction, querying to obtain target information corresponding to the request parameter of the current information type.
In an embodiment of the present invention, the query module 330 is configured to:
and according to the identification information of the current information type carried in the query instruction, obtaining the target information corresponding to the request parameter of the current information type through the micro-service query of the current information type.
In an embodiment of the present invention, the information obtaining apparatus 300 further includes a display module, configured to:
before the request description file is obtained based on the information acquisition request of the requester, the information for displaying the query support is output based on the information base, so that the requester sends out the information acquisition request according to the query support information.
In an embodiment of the present invention, the information obtaining apparatus 300 further includes an updating module, configured to:
and updating the information base when the information change supporting the inquiry is detected.
In one embodiment of the present invention, the display module is configured to:
and outputting the information for displaying the support query in the form of an information association diagram based on the information base, wherein the information association diagram comprises the set information of each information type and the association relationship among the information.
In an embodiment of the present invention, the information obtaining request is received through a unified aggregation interface.
An embodiment of the present invention further provides an electronic device, as shown in fig. 4, including a processor 401, a communication interface 402, a memory 403, and a communication bus 404, where the processor 401, the communication interface 402, and the memory 403 complete mutual communication through the communication bus 404,
a memory 403 for storing a computer program;
the processor 401, when executing the program stored in the memory 403, implements the following steps:
obtaining a request description file based on an information acquisition request of a requester;
analyzing the request description file, and determining a request parameter set corresponding to the request information of the requester;
based on the request parameter set, target information corresponding to each request parameter in the request parameter set is obtained through query;
and returning the target information to the requester.
The communication bus 404 mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 404 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface 402 is used for communication between the above-described electronic apparatus and other apparatuses.
The Memory 403 may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor 401 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute the information acquisition method in any one of the above embodiments.
In yet another embodiment, a computer program product containing instructions is provided, which when run on a computer, causes the computer to execute the information acquisition method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. An information acquisition method, comprising:
obtaining a request description file based on an information acquisition request of a requester;
analyzing the request description file, and determining a request parameter set corresponding to the request information of the requester;
based on the request parameter set, target information corresponding to each request parameter in the request parameter set is obtained through query;
and returning the target information to the requester.
2. The information acquisition method according to claim 1, wherein the parsing the request description file to determine a request parameter set corresponding to the request information of the requester includes:
and analyzing to obtain a request parameter corresponding to each request message of the requester according to the file structure of the request description file, and obtaining a request parameter set.
3. The information acquisition method according to claim 1, wherein the querying for target information corresponding to each request parameter in the request parameter set based on the request parameter set includes:
determining the information type corresponding to each request parameter included in the request parameter set;
generating a query instruction according to the request parameters of the current information type aiming at each information type;
and inquiring to obtain target information corresponding to the request parameter of the current information type based on the inquiry instruction.
4. The information acquisition method according to claim 3, wherein the obtaining, based on the query instruction, target information corresponding to the request parameter of the current information type by querying includes:
and according to the identification information of the current information type carried in the query instruction, obtaining target information corresponding to the request parameter of the current information type through the micro-service query of the current information type.
5. The information acquisition method according to claim 1, wherein before the obtaining of the request description file based on the information acquisition request by the requester, further comprising:
and outputting information supporting query based on an information base according to the capability display instruction sent by the requester, so that the requester sends the information acquisition request according to the information supporting query.
6. The information acquisition method according to claim 5, characterized by further comprising:
and updating the information base when detecting that the information supporting the query is changed.
7. The information acquisition method according to claim 5, wherein the outputting of the information showing support query based on the information base includes:
and outputting the information for displaying the support query in the form of an information association diagram based on the information base, wherein the information association diagram comprises the set information of each information type and the association relationship among the information.
8. The information acquisition method according to any one of claims 1 to 7, wherein the information acquisition request is received through a unified aggregation interface.
9. An information acquisition apparatus characterized by comprising:
the obtaining module is used for obtaining a request based on the information obtaining request of the requester and obtaining a request description file;
the analysis module is used for analyzing the request description file and determining a request parameter set corresponding to the request information of the requester;
the query module is used for querying and obtaining target information corresponding to each request parameter in the request parameter set based on the request parameter set;
and the return module is used for returning the target information to the requester.
10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the information acquisition method according to any one of claims 1 to 8 when executing a program stored in the memory.
11. A computer-readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing the information acquisition method according to any one of claims 1 to 8.
CN202210673956.2A 2022-06-15 2022-06-15 Information acquisition method and device, electronic equipment and computer readable storage medium Pending CN114896272A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210673956.2A CN114896272A (en) 2022-06-15 2022-06-15 Information acquisition method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210673956.2A CN114896272A (en) 2022-06-15 2022-06-15 Information acquisition method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114896272A true CN114896272A (en) 2022-08-12

Family

ID=82728563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210673956.2A Pending CN114896272A (en) 2022-06-15 2022-06-15 Information acquisition method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114896272A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026931A (en) * 2019-12-09 2020-04-17 中国建设银行股份有限公司 Data query method, device, equipment and medium
CN112597187A (en) * 2021-03-03 2021-04-02 北京冠新医卫软件科技有限公司 GraphQL query method and device based on FHIR standard
CN112667716A (en) * 2020-12-30 2021-04-16 京东数字科技控股股份有限公司 Data processing method and device, electronic equipment and storage medium
CN113094574A (en) * 2021-04-09 2021-07-09 北京奇艺世纪科技有限公司 Information query method and device, electronic equipment and readable storage medium
CN113360519A (en) * 2020-03-06 2021-09-07 北京京东振世信息技术有限公司 Data processing method, device, equipment and storage medium
CN114357276A (en) * 2021-12-23 2022-04-15 北京百度网讯科技有限公司 Data query method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026931A (en) * 2019-12-09 2020-04-17 中国建设银行股份有限公司 Data query method, device, equipment and medium
CN113360519A (en) * 2020-03-06 2021-09-07 北京京东振世信息技术有限公司 Data processing method, device, equipment and storage medium
CN112667716A (en) * 2020-12-30 2021-04-16 京东数字科技控股股份有限公司 Data processing method and device, electronic equipment and storage medium
CN112597187A (en) * 2021-03-03 2021-04-02 北京冠新医卫软件科技有限公司 GraphQL query method and device based on FHIR standard
CN113094574A (en) * 2021-04-09 2021-07-09 北京奇艺世纪科技有限公司 Information query method and device, electronic equipment and readable storage medium
CN114357276A (en) * 2021-12-23 2022-04-15 北京百度网讯科技有限公司 Data query method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113364853B (en) Business service system, business request method and gateway equipment
US11870741B2 (en) Systems and methods for a metadata driven integration of chatbot systems into back-end application services
WO2016127792A1 (en) User event response method and device
CN111224797B (en) Equipment access method and device and electronic equipment
CN109491733B (en) Interface display method based on visualization and related equipment
CN111651703A (en) Page jump method and device, electronic equipment and readable storage medium
CN111026775A (en) Method and device for determining correlation index, server and storage medium
CN116055551A (en) Information pushing method, device and system, electronic equipment and storage medium
CN108600780A (en) Method for pushed information
CN109086429B (en) IVR voice navigation method, system, equipment and storage medium
CN108011936B (en) Method and device for pushing information
CN113761565B (en) Data desensitization method and device
CN110852603B (en) High-throughput wind control data processing method, device, equipment and storage medium
CN113298331A (en) Work order processing method, device and system and electronic equipment
CN112764838A (en) Target content display method and device and electronic equipment
US8510346B2 (en) Efficiently handling information on changes to a UDDI registry including those resulting in virtual deletes
CN113127335A (en) System testing method and device
CN114896272A (en) Information acquisition method and device, electronic equipment and computer readable storage medium
CN111026669A (en) Test log management method, test log management device, and storage medium
CN108390770B (en) Information generation method and device and server
CN112612866B (en) Knowledge base text synchronization method and device, electronic equipment and storage medium
CN111291127B (en) Data synchronization method, device, server and storage medium
CN114036132A (en) Object information processing method and device, storage medium and electronic equipment
CN113590234A (en) Method, device and equipment for automatically acquiring data and storage medium
CN112579682A (en) Data model change notification method and device, electronic device 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