CN116303729B - Information acquisition method, device, equipment and medium - Google Patents

Information acquisition method, device, equipment and medium Download PDF

Info

Publication number
CN116303729B
CN116303729B CN202310552685.XA CN202310552685A CN116303729B CN 116303729 B CN116303729 B CN 116303729B CN 202310552685 A CN202310552685 A CN 202310552685A CN 116303729 B CN116303729 B CN 116303729B
Authority
CN
China
Prior art keywords
information
index
database
executable content
docking mode
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.)
Active
Application number
CN202310552685.XA
Other languages
Chinese (zh)
Other versions
CN116303729A (en
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 Yuxiang Software Technology Co ltd
Original Assignee
Beijing Yuxiang Software Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Yuxiang Software Technology Co ltd filed Critical Beijing Yuxiang Software Technology Co ltd
Priority to CN202310552685.XA priority Critical patent/CN116303729B/en
Publication of CN116303729A publication Critical patent/CN116303729A/en
Application granted granted Critical
Publication of CN116303729B publication Critical patent/CN116303729B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses an information acquisition method, an information acquisition device, an information acquisition equipment and an information acquisition medium, and relates to the technical field of information management. Inputting index identification and dynamic parameters by calling an index result acquisition service interface; acquiring corresponding index information according to the index identifier; acquiring corresponding butting mode information according to the data source of the index information; and obtaining corresponding index result data according to the dynamic parameters, the docking mode information and the executable content. According to the scheme, the information acquisition modes of the database, the interface service and the file server are butted, the index information is configured for management, and the acquired index result service interface is provided for acquiring the result information. When a new project or demand change is carried out, corresponding interface services can be provided only by configuring corresponding index information content and docking mode information, so that corresponding information is acquired, reasonable docking of different functional demands and different information sources is realized, additional investment of back-end code research and development work is not needed, and flexibility is improved.

Description

Information acquisition method, device, equipment and medium
Technical Field
The present disclosure relates to the field of information management technologies, and in particular, to an information acquisition method, apparatus, device, and medium.
Background
The large visual screen is used as a display terminal, and some complex and abstract data are displayed in a visual mode, so that information and rules in the large visual screen are expressed more intuitively and vividly, and the data are easier to understand. The visual large screen project corresponds to the work of the back-end service, mainly interfaces with different types of information sources and is provided in the form of an interface. When the development work of the back-end service is actually carried out on the visualized large-screen project, different information sources are required to be matched and connected according to different functional requirements, and the information sources can be understood as a butt-joint mode.
At present, in order to realize the butt joint of different functional requirements and different information sources, the development of a back-end service interface code for customizing each index information is mainly performed according to different conditions, namely, interface services of the information sources are required to be independently customized according to each functional requirement, and information is further acquired. However, this method has the problems of large similarity of functions of the docking content and low reusability, that is, the customized adapting docking method needs to be carried out again each time a new project is developed, the working content is repeated and the efficiency is low, and once the requirement change or the information of the actual docking method changes, the back-end service code needs to be modified again, so that the flexibility is low.
In view of the above-mentioned problems, how to achieve reasonable docking of different functional requirements with different information sources, so as to better achieve information acquisition, and avoid additional back-end code development work, is a problem to be solved by those skilled in the art.
Disclosure of Invention
The purpose of the application is to provide an information acquisition method, an information acquisition device, information acquisition equipment and an information acquisition medium so as to realize reasonable butt joint of different functional requirements and different information sources, thereby better realizing information acquisition and avoiding additional back-end code research and development work.
In order to solve the above technical problems, the present application provides an information acquisition method, including:
calling a service interface for acquiring index results, and inputting index identifiers and dynamic parameters;
acquiring corresponding index information according to the index identifier; the index information is pre-created configuration information required by characterizing data information acquired and processed based on an information source, and comprises an index name, an index identifier, a docking mode association ID, executable content and update frequency;
acquiring corresponding butt joint mode information according to the data source of the index information; the information of the docking mode is information source information which is created in advance and used for characterizing docking with functional requirements, and the types of the information source information comprise database information, interface service authentication information and file server information;
And obtaining corresponding index result data according to the dynamic parameters, the docking mode information and the executable content.
Preferably, the index information creation process includes:
acquiring the index identifier, the index name and the index description, and determining the data source;
when the data source is a static data source, the first executable content is stored in a database as the content of the index information; wherein the first executable content is a character string;
when the data source is the database, selecting the butt joint mode information corresponding to the database, and storing second executable content serving as the content of the index information in the database; wherein the second executable content is a database structured language;
when the data source is an interface service, selecting the docking mode information corresponding to the interface service, and storing third executable content serving as the content of the index information in the database; the third executable content comprises an interface uniform resource positioning system and an interface request mode;
when the data source is a file server, selecting the docking mode information corresponding to the file server, and storing fourth executable content serving as the content of the index information in the database; wherein the fourth executable content includes a file directory path of the file server.
Preferably, the creating process of the docking mode information includes:
acquiring the type of the docking mode information;
when the type of the docking mode information is the database information, the database type, the database address, the database port number, the database name, the user name and the user name corresponding password are used as the contents of the docking mode information to be stored in a database;
when the type of the docking mode information is the interface service authentication information, the interface authentication mode information is stored in the database as the content of the docking mode information;
when the type of the docking mode information is the file server information, storing a file server address, a file server port number, a user name and a user name corresponding password as contents of the docking mode information in the database.
Preferably, the obtaining the corresponding index result data according to the dynamic parameter, the docking mode information and the executable content includes:
when the data source is the database, judging whether the dynamic parameters exist or not;
if the index information does not exist, generating a preprocessing statement according to the second executable content in the index information, and connecting the database corresponding to the docking mode information to execute the preprocessing statement to obtain the index result data;
If yes, judging whether the dynamic parameters are matched with the database structured language in the second executable content;
if the matching is determined, generating the preprocessing statement according to the dynamic parameter and the second executable content, and entering the database corresponding to the information of the butt joint mode to execute the preprocessing statement to obtain the index result data;
if the matching is not determined, abnormal information is returned.
Preferably, the obtaining the corresponding index result data according to the dynamic parameter, the docking mode information and the executable content includes:
and when the data source is the interface service, initiating a request to the interface service according to the third executable content, the dynamic parameters and the interface service authentication information, and acquiring corresponding data of the request as the index result data.
Preferably, the obtaining the corresponding index result data according to the dynamic parameter, the docking mode information and the executable content includes:
when the data source is the file server, judging whether the dynamic parameter contains a key value pair of a file name or not;
If the abnormal information is not contained, returning abnormal information;
if yes, analyzing the dynamic parameters to obtain corresponding file names;
and connecting the file server corresponding to the docking mode information, and acquiring file contents according to the fourth executable contents and the file names to serve as the index result data.
Preferably, the method further comprises:
and when the data source is the static data source, the first executable content in the index information is used as the index result data.
Preferably, after the corresponding index result data is obtained according to the dynamic parameter, the docking mode information and the executable content, the method further includes:
and packaging the index result data into success response information and returning.
In order to solve the above technical problem, the present application further provides an information acquisition device, including:
the interface calling module is used for calling the service interface for acquiring the index result and inputting the index identifier and the dynamic parameter;
the first acquisition module is used for acquiring corresponding index information according to the index identifier; the index information is pre-created configuration information required by characterizing data information acquired and processed based on an information source, and comprises an index name, an index identifier, a docking mode association ID, executable content and update frequency;
The second acquisition module is used for acquiring corresponding butt joint mode information according to the data source of the index information; the information of the docking mode is information source information which is created in advance and used for characterizing docking with functional requirements, and the types of the information source information comprise database information, interface service authentication information and file server information;
and the third acquisition module is used for acquiring corresponding index result data according to the dynamic parameters, the butt joint mode information and the executable content.
In order to solve the above technical problem, the present application further provides an information acquisition apparatus, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the information acquisition method when executing the computer program.
To solve the above technical problem, the present application further provides a computer readable storage medium having a computer program stored thereon, where the computer program when executed by a processor implements the steps of the information acquisition method as described above.
According to the information acquisition method, the index identification and the dynamic parameters are input by calling the index acquisition result service interface; acquiring corresponding index information according to the index identifier; the index information is pre-created configuration information required by characterizing data information acquired and processed based on an information source, and comprises an index name, an index identifier, a docking mode association ID, executable content and update frequency; acquiring corresponding butting mode information according to the data source of the index information; the information of the docking mode is information source information which is created in advance and used for characterizing docking with functional requirements, and the types of the information source information comprise database information, interface service authentication information and file server information; and obtaining corresponding index result data according to the dynamic parameters, the docking mode information and the executable content. Therefore, according to the scheme, the information acquisition modes of the database, the interface service and the file server are subjected to butt joint, and the index information is configured to dynamically adapt and manage different butt joint modes, so that the result information corresponding to the functional requirements can be acquired based on the index information; meanwhile, the result information can be output through the acquired index result service interface serving as a unified interface. When a new project or demand change is carried out, corresponding interface service can be provided only by configuring corresponding index information content and docking mode information, so that corresponding information is acquired through a unified interface, reasonable docking of different functional demands and different information sources is realized, additional investment of back-end code research and development work is not needed, and flexibility is improved.
In addition, the embodiment of the application also provides an information acquisition device, equipment and medium, and the effects are the same as those of the information acquisition device.
Drawings
For a clearer description of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described, it being apparent that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a top-level data schematic diagram of an index scheme according to an embodiment of the present disclosure;
fig. 2 is a flowchart of an information obtaining method according to an embodiment of the present application;
FIG. 3 is a flowchart of another information obtaining method according to an embodiment of the present application;
fig. 4 is a schematic diagram of an information obtaining apparatus according to an embodiment of the present application;
fig. 5 is a schematic diagram of an information obtaining apparatus according to an embodiment of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments herein without making any inventive effort are intended to fall within the scope of the present application.
The core of the application is to provide an information acquisition method, an information acquisition device and an information acquisition medium so as to realize reasonable butt joint of different functional requirements and different information sources, thereby better realizing information acquisition and avoiding additional back-end code research and development work.
In order to provide a better understanding of the present application, those skilled in the art will now make further details of the present application with reference to the drawings and detailed description.
At present, in order to realize the butt joint of different functional requirements and different information sources, the development of a back-end service interface code for customizing each index information according to different conditions is mainly performed. However, this method has the problems of large similarity of functions of the docking content and low reusability, that is, the customized adapting docking method needs to be carried out again each time a new project is developed, the working content is repeated and the efficiency is low, and once the requirement change or the information of the actual docking method changes, the back-end service code needs to be modified again, so that the flexibility is low. Therefore, the embodiment of the application provides an information acquisition method, which can realize reasonable butt joint of different functional requirements and different information sources, so that information acquisition is better realized, and additional back-end code research and development work is avoided. Fig. 1 is a schematic diagram of top-level data of an index scheme according to an embodiment of the present application. As shown in fig. 1, the method provided by the application is applied to an information acquisition environment formed by a user, a third party application, a third party database, an interface service, a file server and an index information system. Wherein the index information system is operated in a server.
Fig. 2 is a flowchart of an information obtaining method according to an embodiment of the present application. As shown in fig. 2, the method includes:
s10: and calling a service interface for acquiring index results, and inputting index identifiers and dynamic parameters.
Specifically, the interface of the index result obtaining service is called, so as to provide an interface service for a front-end service or a third party application to obtain corresponding index information according to requirements, and to provide the interface service in a manner of WebSocket application program interface (Application Programming Interface, API) or RESTful (Representational State Transfer) API, etc. according to the result data obtained after the corresponding processing. The realization principle of the index result acquisition service interface is to provide unified interface service, inquire corresponding index information through index identification, and acquire corresponding index result data by combining a butt joint mode and executable content in the index information. Therefore, when the third party application or service calls the index result service interface of the index information system, the index identifier and the dynamic parameter are required to be input as request parameters.
S11: and acquiring corresponding index information according to the index identifier.
The index information is pre-created configuration information required by the data information which is characterized and acquired and processed based on the information source, and comprises an index name, an index identification, a docking mode association ID, executable content and update frequency.
S12: and acquiring corresponding butt joint mode information according to the data source of the index information.
The information of the docking mode is information source information which is created in advance and used for characterizing docking with functional requirements, and the types of the information source information comprise database information, interface service authentication information and file server information.
And acquiring corresponding index information according to the index identifier. In this embodiment, the index information is pre-created configuration information required to characterize the data information acquired and processed based on the information source, including index names, index identifications, docking mode association IDs, executable content, and update frequencies. Each index information corresponds to only one index mark, and the index marks are used for distinguishing different index information, so that the corresponding index information can be obtained through the index marks. It should be noted that, in the implementation, if the index information system does not query the corresponding index information in the database according to the index identifier, the abnormal information may be returned and ended. In addition, the index information is managed by an index information management module of the index information system, and the index information management module can realize the functions of adding, modifying, deleting, inquiring, testing and the like of the index information.
And acquiring corresponding butt joint mode information according to the data source of the index information. In this embodiment, the docking mode information is information source information representing docking with the functional requirement, which is created in advance, and the types of the information source information include database information, interface service authentication information and file server information, so that the corresponding docking mode information can be obtained according to the data source of the index information. The docking mode information is managed by a docking mode information management module of the index information system, and the docking mode information management module can realize functions of adding, modifying, deleting, inquiring, testing and the like of the docking mode information. When the information management of the docking mode is carried out, a user can configure the information of the docking mode according to actual conditions, and the information of the docking mode is stored in a docking mode information table of a database of the index information system through the information management module of the docking mode.
It should be noted that when the user configures the index information, the user needs to select the required docking mode information, so as to obtain the corresponding docking mode information according to the data source of the index information. Specifically, the executable content which accords with the corresponding mode information and is effective is configured according to the specific requirements, and the setting of the corresponding functions of the new requirements can be realized by supplementing other information. For example, when the requirement is data D meeting the filtering condition C in the lookup table B in the database a, the information of the docking mode of the index information needs to be information of the information source corresponding to the database a, the executable content needs to be a structured query language of the database meeting the requirements of the table B and the filtering condition C, the data D is index result data, and the index information is stored in the index information table of the database of the index system through index information management.
In addition, in this embodiment, the creation modes of the index information and the docking mode information are not limited, and are determined according to specific implementation conditions.
As a preferred embodiment, the index information creation process specifically includes: firstly, acquiring an index identifier, an index name and an index description, inputting the index identifier, the index name and the index description into an index information management module, and determining a data source; the data sources include static data sources, databases, interface services and file servers. When the data source is a static data source, inputting first executable content, and storing the first executable content serving as the content of index information in a database; wherein the first executable content is a character string. It should be noted that, in this embodiment, the specific format of the character string is not limited, and the character string may be a character string in JavaScript object notation (JavaScript Object Notation, JSON) format, or may be a character string conforming to the syntax rule format of extensible markup language (Extensible Markup Language, XML), depending on the specific implementation. When the data source is a database, selecting the corresponding docking mode information of the database, and storing the second executable content serving as the content of the index information in the database; wherein the second executable content is a database structured language (Structured Query Language, SQL). When the data source is interface service, selecting the corresponding docking mode information of the interface service, and storing the third executable content serving as the content of the index information in a database; wherein the third executable content comprises an interface uniform resource location system (Uniform Resource Locator, URL) and an interface request means. When the data source is a file server, selecting the corresponding docking mode information of the file server, and storing the fourth executable content serving as the content of the index information in a database; wherein the fourth executable content comprises a file directory path of the file server. In this way, the creation of the index information is completed.
As a preferred embodiment, the creation process of the docking mode information includes: firstly, based on a docking mode information management module, acquiring the type of docking mode information; it is understood that the type of the docking mode information includes database information, interface service authentication information, and file server information. When the type of the docking mode information is database information, the database type, the database address, the database port number, the database name, the user name and the corresponding password of the user name are used as the contents of the docking mode information to be stored in the database; when the type of the docking mode information is interface service authentication information, the interface authentication mode information is stored in a database as the content of the docking mode information; when the type of the docking mode information is file server information, the file server address, the file server port number, the user name and the corresponding password of the user name are stored in a database as contents of the docking mode information. Thus, creation of the docking mode information is completed.
S13: and obtaining corresponding index result data according to the dynamic parameters, the docking mode information and the executable content.
When the front-end service or the third party application needs to call the index result obtaining service interface to obtain index result data, the index mark corresponding to the index information needs to be taken as an entry, and the key value pair of the dynamic parameter correspondingly configured in the executable content in the index information is combined as the entry, and the index result obtaining service interface provided by the index information system is called, so that the index result data is obtained. Therefore, the new demand function can be adapted by setting the butt joint mode information and the index information, so that the service interface for obtaining the index result is used for replacing the rear end interface which originally needs to be customized in a unified way. The specific combination scenario is illustrated: there is a new need to obtain the total number of students in year a and grade b, and then provide the total number of students in year a and grade b to a third party application in an interface mode, wherein the data source is a student list d in a third party database c. The user needs to set the docking mode information e in advance for saving the connection mode of the third party database c, and then set the index information f to associate the docking mode information e, the index mark g, the executable content (the executable statement that the total number of students in the grade a and the grade b is acquired in the student table d) and other index information items. And calling an index result acquisition service interface serving as a unified interface, wherein input parameters are index identification g and dynamic parameter years a and grades b, the index result acquisition service interface queries index information f according to the index identification g, and searches docking mode information e through the index information f, so that an information source is confirmed through the docking mode information e, and the executable content in the index information f and the dynamic parameter years a and the dynamic parameter grades b transmitted by the interface are combined to obtain student total number information of the grades a and b from a student table d in a third party database c.
In the implementation, as a plurality of data sources of the index information exist, different docking mode information can be correspondingly acquired according to the data sources of the index information; therefore, the acquisition modes of the index result data are different based on the information of different docking modes. Fig. 3 is a flowchart of another information obtaining method according to an embodiment of the present application. For better understanding of the technical solution of the present application, the following description is given with reference to fig. 3 for the process of obtaining the index result data under different data sources:
when the data source is a database, the obtaining of the corresponding index result data by the docking mode information and the executable content includes:
s130: when the data source is a database, judging whether dynamic parameters exist or not; if it is determined that the signal is not present, the process proceeds to step S131; if it is determined that there is, the flow proceeds to step S132.
S131: and generating a preprocessing statement according to the second executable content in the index information, and connecting a database corresponding to the docking mode information to execute the preprocessing statement to obtain index result data.
S132: judging whether the dynamic parameters are matched with the database structured language in the second executable content; if a match is determined, the process proceeds to step S133, and if a mismatch is determined, the process proceeds to step S134.
S133: and generating a preprocessing statement according to the dynamic parameters and the second executable content, and connecting a database corresponding to the docking mode information to execute the preprocessing statement to obtain index result data.
S134: and returning abnormal information.
In a specific implementation, when the data source is a database, the type of the information of the butt joint mode is inquired in the database according to the index information and is the database information. Further judging whether the input parameters have dynamic parameters. Because the index information created for the database based on the data source, the corresponding executable content is the second executable content, specifically, the database structured language, if the input parameters are confirmed to have no dynamic parameters, a preprocessing statement is generated according to the second executable content in the index information, and the database corresponding to the docking mode information is connected to execute the preprocessing statement to obtain index result data. If the input parameters are confirmed to have dynamic parameters, judging whether the dynamic parameters are matched with the database structured language in the second executable content. If the matching is determined, generating a preprocessing statement according to the dynamic parameter and the second executable content, and connecting a database corresponding to the docking mode information to execute the preprocessing statement to obtain index result data; if the matching is not determined, abnormal information is returned.
When the data source is the interface service, obtaining corresponding index result data according to the dynamic parameters, the docking mode information and the executable content comprises the following steps:
s135: when the data source is the interface service, a request is initiated to the interface service according to the third executable content, the dynamic parameters and the interface service authentication information, and the corresponding data of the request is obtained to serve as index result data.
In a specific implementation, when the data source is the interface service, the type of the information of the butt joint mode is inquired in the database according to the index information and is the authentication information of the interface service. Because the index information created for the interface service based on the data source, the corresponding executable content is the third executable content, specifically, the interface URL and the interface request mode, the request is initiated to the interface service by combining the interface service authentication information according to the third executable content and the dynamic parameters, and the obtained request response data is used as index result data.
When the data source is a file server, obtaining corresponding index result data according to the dynamic parameters, the docking mode information and the executable content includes:
s136: when the data source is a file server, judging whether the dynamic parameters contain key value pairs of file names or not; if it is determined that the current value does not exist, the process proceeds to step S137; if yes, go to step S138;
S137: returning abnormal information;
s138: analyzing the dynamic parameters to obtain corresponding file names;
s139: and connecting the file server corresponding to the docking mode information, and acquiring file contents according to the fourth executable contents and the file names to serve as index result data.
In a specific implementation, when the data source is a file server, the type of the information of the butt joint mode is inquired in the database according to the index information and is the information of the file server. Judging whether the dynamic parameters contain key value pairs of file names or not; if the abnormal information is not contained, returning abnormal information; if yes, analyzing the dynamic parameters to obtain the corresponding file names. Because the index information created for the file server based on the data source, the corresponding executable content is the fourth executable content, specifically, the file directory path of the file server, therefore, further, the file server corresponding to the docking mode information is connected, and the file content is obtained according to the fourth executable content and the file name, so as to be used as index result data.
Furthermore, when the data source is a static data source, the method further comprises:
s140: when the data source is a static data source, the first executable content in the index information is used as index result data.
Because the index information created for the static data source based on the data source is the first executable content, specifically the character string, when the data source is the static data source, the first executable content in the index information is used as index result data.
Therefore, the index result data under different data sources are obtained.
In addition, the service interface for obtaining the index result is adaptive to information sources of different docking modes, and the data structures returned by the different docking modes have certain differences, so that the service interface for obtaining the index result packages the finally obtained index result data for unifying the response formats of the service interface for obtaining the index result. Specifically, the response data parameters of the index result service interface comprise execution result codes, execution information and data; the execution result code is used for confirming the execution state, the prompt information is used for prompting the success or specific execution failure reason, and the data is used for storing index result data. Therefore, in the implementation, after the corresponding index result data is obtained according to the dynamic parameters, the docking mode information and the executable content, the index result data is further required to be packaged into the success response information and returned, so that the feedback of the index result data is better realized.
In the embodiment, the index identification and the dynamic parameters are input by calling the index result acquisition service interface; acquiring corresponding index information according to the index identifier; the index information is pre-created configuration information required by characterizing data information acquired and processed based on an information source, and comprises an index name, an index identifier, a docking mode association ID, executable content and update frequency; acquiring corresponding butting mode information according to the data source of the index information; the information of the docking mode is information source information which is created in advance and used for characterizing docking with functional requirements, and the types of the information source information comprise database information, interface service authentication information and file server information; and obtaining corresponding index result data according to the dynamic parameters, the docking mode information and the executable content. Therefore, according to the scheme, the information acquisition modes of the database, the interface service and the file server are subjected to butt joint, and the index information is configured to dynamically adapt and manage different butt joint modes, so that the result information corresponding to the functional requirements can be acquired based on the index information; meanwhile, the result information can be output through the acquired index result service interface serving as a unified interface. When a new project or demand change is carried out, corresponding interface service can be provided only by configuring corresponding index information content and docking mode information, so that corresponding information is acquired through a unified interface, reasonable docking of different functional demands and different information sources is realized, additional investment of back-end code research and development work is not needed, and flexibility is improved.
In the above embodiments, the information acquisition method is described in detail, and the present application further provides corresponding embodiments of the information acquisition apparatus.
Fig. 4 is a schematic diagram of an information obtaining apparatus according to an embodiment of the present application. As shown in fig. 4, the information acquisition apparatus includes:
the interface calling module 10 is used for calling the service interface for obtaining the index result and inputting the index identifier and the dynamic parameter.
A first obtaining module 11, configured to obtain corresponding index information according to the index identifier; the index information is pre-created configuration information required by the data information which is characterized and acquired and processed based on the information source, and comprises an index name, an index identification, a docking mode association ID, executable content and update frequency.
A second obtaining module 12, configured to obtain corresponding docking mode information according to a data source of the index information; the information of the docking mode is information source information which is created in advance and used for characterizing docking with functional requirements, and the types of the information source information comprise database information, interface service authentication information and file server information.
And the third obtaining module 13 is configured to obtain corresponding index result data according to the dynamic parameter, the docking mode information and the executable content.
In this embodiment, the information acquisition device includes an interface calling module, a first acquisition module, a second acquisition module, and a third acquisition module. The information acquisition device is capable of implementing all the steps of the information acquisition method when running. Inputting index identification and dynamic parameters by calling an index result acquisition service interface; acquiring corresponding index information according to the index identifier; the index information is pre-created configuration information required by characterizing data information acquired and processed based on an information source, and comprises an index name, an index identifier, a docking mode association ID, executable content and update frequency; acquiring corresponding butting mode information according to the data source of the index information; the information of the docking mode is information source information which is created in advance and used for characterizing docking with functional requirements, and the types of the information source information comprise database information, interface service authentication information and file server information; and obtaining corresponding index result data according to the dynamic parameters, the docking mode information and the executable content. Therefore, according to the scheme, the information acquisition modes of the database, the interface service and the file server are subjected to butt joint, and the index information is configured to dynamically adapt and manage different butt joint modes, so that the result information corresponding to the functional requirements can be acquired based on the index information; meanwhile, the result information can be output through the acquired index result service interface serving as a unified interface. When a new project or demand change is carried out, corresponding interface service can be provided only by configuring corresponding index information content and docking mode information, so that corresponding information is acquired through a unified interface, reasonable docking of different functional demands and different information sources is realized, additional investment of back-end code research and development work is not needed, and flexibility is improved.
Fig. 5 is a schematic diagram of an information obtaining apparatus according to an embodiment of the present application. As shown in fig. 5, the information acquisition apparatus includes:
a memory 20 for storing a computer program.
A processor 21 for carrying out the steps of the method of information acquisition as mentioned in the above embodiments when executing a computer program.
The information obtaining device provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
Processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in hardware in at least one of a digital signal processor (Digital Signal Processor, DSP), a Field programmable gate array (Field-Programmable Gate Array, FPGA), a programmable logic array (Programmable Logic Array, PLA). The processor 21 may also comprise a main processor, which is a processor for processing data in an awake state, also called central processor (Central Processing Unit, CPU), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a graphics processor (Graphics Processing Unit, GPU) for use in connection with rendering and rendering of content to be displayed by the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (Artificial Intelligence, AI) processor for processing computing operations related to machine learning.
Memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing a computer program 201, which, when loaded and executed by the processor 21, is capable of implementing the relevant steps of the information acquisition method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may further include an operating system 202, data 203, and the like, where the storage manner may be transient storage or permanent storage. The operating system 202 may include Windows, unix, linux, among others. The data 203 may include, but is not limited to, data related to information acquisition methods.
In some embodiments, the information acquisition device may further include a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the structure shown in fig. 5 is not limiting of the information acquisition device and may include more or fewer components than shown.
In this embodiment, the information acquisition apparatus includes a memory and a processor. The memory is used for storing a computer program. The processor is arranged to perform the steps of the method of information acquisition as mentioned in the above embodiments when executing the computer program. Inputting index identification and dynamic parameters by calling an index result acquisition service interface; acquiring corresponding index information according to the index identifier; the index information is pre-created configuration information required by characterizing data information acquired and processed based on an information source, and comprises an index name, an index identifier, a docking mode association ID, executable content and update frequency; acquiring corresponding butting mode information according to the data source of the index information; the information of the docking mode is information source information which is created in advance and used for characterizing docking with functional requirements, and the types of the information source information comprise database information, interface service authentication information and file server information; and obtaining corresponding index result data according to the dynamic parameters, the docking mode information and the executable content. Therefore, according to the scheme, the information acquisition modes of the database, the interface service and the file server are subjected to butt joint, and the index information is configured to dynamically adapt and manage different butt joint modes, so that the result information corresponding to the functional requirements can be acquired based on the index information; meanwhile, the result information can be output through the acquired index result service interface serving as a unified interface. When a new project or demand change is carried out, corresponding interface service can be provided only by configuring corresponding index information content and docking mode information, so that corresponding information is acquired through a unified interface, reasonable docking of different functional demands and different information sources is realized, additional investment of back-end code research and development work is not needed, and flexibility is improved.
Finally, the present application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps as described in the method embodiments above.
It will be appreciated that the methods of the above embodiments, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored on a computer readable storage medium. With such understanding, the technical solution of the present application, or a part contributing to the prior art or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, performing all or part of the steps of the method described in the various embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In this embodiment, a computer program is stored on a computer readable storage medium, and when the computer program is executed by a processor, the steps described in the above method embodiments are implemented. Inputting index identification and dynamic parameters by calling an index result acquisition service interface; acquiring corresponding index information according to the index identifier; the index information is pre-created configuration information required by characterizing data information acquired and processed based on an information source, and comprises an index name, an index identifier, a docking mode association ID, executable content and update frequency; acquiring corresponding butting mode information according to the data source of the index information; the information of the docking mode is information source information which is created in advance and used for characterizing docking with functional requirements, and the types of the information source information comprise database information, interface service authentication information and file server information; and obtaining corresponding index result data according to the dynamic parameters, the docking mode information and the executable content. Therefore, according to the scheme, the information acquisition modes of the database, the interface service and the file server are subjected to butt joint, and the index information is configured to dynamically adapt and manage different butt joint modes, so that the result information corresponding to the functional requirements can be acquired based on the index information; meanwhile, the result information can be output through the acquired index result service interface serving as a unified interface. When a new project or demand change is carried out, corresponding interface service can be provided only by configuring corresponding index information content and docking mode information, so that corresponding information is acquired through a unified interface, reasonable docking of different functional demands and different information sources is realized, additional investment of back-end code research and development work is not needed, and flexibility is improved.
The above describes in detail a method, an apparatus, a device, and a medium for obtaining information provided in the present application. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it would be obvious to those skilled in the art that various improvements and modifications can be made to the present application without departing from the principles of the present application, and such improvements and modifications fall within the scope of the claims of the present application.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (9)

1. An information acquisition method, characterized by comprising:
calling a service interface for acquiring index results, and inputting index identifiers and dynamic parameters;
acquiring corresponding index information according to the index identifier; the index information is pre-created configuration information required by characterizing data information acquired and processed based on an information source, and comprises an index name, an index identifier, a docking mode association ID, executable content and update frequency;
acquiring corresponding butt joint mode information according to the data source of the index information; the information of the docking mode is information source information which is created in advance and used for characterizing docking with functional requirements, and the types of the information source information comprise database information, interface service authentication information and file server information;
acquiring corresponding index result data according to the dynamic parameters, the docking mode information and the executable content;
the index information creation process comprises the following steps:
acquiring the index identifier, the index name and the index description, and determining the data source;
when the data source is a static data source, the first executable content is stored in a database as the content of the index information; wherein the first executable content is a character string;
When the data source is the database, selecting the butt joint mode information corresponding to the database, and storing second executable content serving as the content of the index information in the database; wherein the second executable content is a database structured language;
when the data source is an interface service, selecting the docking mode information corresponding to the interface service, and storing third executable content serving as the content of the index information in the database; the third executable content comprises an interface uniform resource positioning system and an interface request mode;
when the data source is a file server, selecting the docking mode information corresponding to the file server, and storing fourth executable content serving as the content of the index information in the database; wherein the fourth executable content comprises a file directory path of the file server;
the step of obtaining corresponding index result data according to the dynamic parameters, the docking mode information and the executable content includes:
when the data source is the database, judging whether the dynamic parameters exist or not;
If the index information does not exist, generating a preprocessing statement according to the second executable content in the index information, and connecting the database corresponding to the docking mode information to execute the preprocessing statement to obtain the index result data;
if yes, judging whether the dynamic parameters are matched with the database structured language in the second executable content;
if the matching is determined, generating the preprocessing statement according to the dynamic parameter and the second executable content, and entering the database corresponding to the information of the butt joint mode to execute the preprocessing statement to obtain the index result data;
if the matching is not determined, abnormal information is returned.
2. The information acquisition method according to claim 1, wherein the creation process of the docking mode information includes:
acquiring the type of the docking mode information;
when the type of the docking mode information is the database information, the database type, the database address, the database port number, the database name, the user name and the user name corresponding password are used as the contents of the docking mode information to be stored in a database;
When the type of the docking mode information is the interface service authentication information, the interface authentication mode information is stored in the database as the content of the docking mode information;
when the type of the docking mode information is the file server information, storing a file server address, a file server port number, a user name and a user name corresponding password as contents of the docking mode information in the database.
3. The information acquisition method according to claim 1, wherein the acquiring the corresponding index result data from the dynamic parameter, the docking mode information, and the executable content includes:
and when the data source is the interface service, initiating a request to the interface service according to the third executable content, the dynamic parameters and the interface service authentication information, and acquiring corresponding data of the request as the index result data.
4. The information acquisition method according to claim 1, wherein the acquiring the corresponding index result data from the dynamic parameter, the docking mode information, and the executable content includes:
When the data source is the file server, judging whether the dynamic parameter contains a key value pair of a file name or not;
if the abnormal information is not contained, returning abnormal information;
if yes, analyzing the dynamic parameters to obtain corresponding file names;
and connecting the file server corresponding to the docking mode information, and acquiring file contents according to the fourth executable contents and the file names to serve as the index result data.
5. The information acquisition method according to claim 1, characterized by further comprising:
and when the data source is the static data source, the first executable content in the index information is used as the index result data.
6. The information acquisition method according to any one of claims 1 to 5, characterized by further comprising, after the acquisition of the corresponding index result data from the dynamic parameter, the docking mode information, and the executable content:
and packaging the index result data into success response information and returning.
7. An information acquisition apparatus, characterized by comprising:
the interface calling module is used for calling the service interface for acquiring the index result and inputting the index identifier and the dynamic parameter;
The first acquisition module is used for acquiring corresponding index information according to the index identifier; the index information is pre-created configuration information required by characterizing data information acquired and processed based on an information source, and comprises an index name, an index identifier, a docking mode association ID, executable content and update frequency;
the second acquisition module is used for acquiring corresponding butt joint mode information according to the data source of the index information; the information of the docking mode is information source information which is created in advance and used for characterizing docking with functional requirements, and the types of the information source information comprise database information, interface service authentication information and file server information;
the third acquisition module is used for acquiring corresponding index result data according to the dynamic parameters, the docking mode information and the executable content;
the index information creation process comprises the following steps:
acquiring the index identifier, the index name and the index description, and determining the data source;
when the data source is a static data source, the first executable content is stored in a database as the content of the index information; wherein the first executable content is a character string;
When the data source is the database, selecting the butt joint mode information corresponding to the database, and storing second executable content serving as the content of the index information in the database; wherein the second executable content is a database structured language;
when the data source is an interface service, selecting the docking mode information corresponding to the interface service, and storing third executable content serving as the content of the index information in the database; the third executable content comprises an interface uniform resource positioning system and an interface request mode;
when the data source is a file server, selecting the docking mode information corresponding to the file server, and storing fourth executable content serving as the content of the index information in the database; wherein the fourth executable content comprises a file directory path of the file server;
the third obtaining module is specifically configured to:
when the data source is the database, judging whether the dynamic parameters exist or not;
if the index information does not exist, generating a preprocessing statement according to the second executable content in the index information, and connecting the database corresponding to the docking mode information to execute the preprocessing statement to obtain the index result data;
If yes, judging whether the dynamic parameters are matched with the database structured language in the second executable content;
if the matching is determined, generating the preprocessing statement according to the dynamic parameter and the second executable content, and entering the database corresponding to the information of the butt joint mode to execute the preprocessing statement to obtain the index result data;
if the matching is not determined, abnormal information is returned.
8. An information acquisition apparatus, characterized by comprising:
a memory for storing a computer program;
processor for implementing the steps of the information acquisition method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the information acquisition method according to any one of claims 1 to 6.
CN202310552685.XA 2023-05-17 2023-05-17 Information acquisition method, device, equipment and medium Active CN116303729B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310552685.XA CN116303729B (en) 2023-05-17 2023-05-17 Information acquisition method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310552685.XA CN116303729B (en) 2023-05-17 2023-05-17 Information acquisition method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN116303729A CN116303729A (en) 2023-06-23
CN116303729B true CN116303729B (en) 2023-08-01

Family

ID=86803520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310552685.XA Active CN116303729B (en) 2023-05-17 2023-05-17 Information acquisition method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116303729B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100542178C (en) * 2007-07-05 2009-09-16 上海交通大学 Multi-source heterogeneous data integrated system based on data flow technique
EP2386089A4 (en) * 2009-01-12 2013-01-16 Namesforlife Llc Systems and methods for automatically identifying and linking names in digital resources
CN106874461B (en) * 2017-02-14 2017-12-22 北京慧正通软科技有限公司 A kind of workflow engine supports multi-data source configuration security access system and method
CN107229695A (en) * 2017-05-23 2017-10-03 深圳大学 Multi-platform aviation electronics big data system and method
CN107301250B (en) * 2017-07-27 2020-06-26 南京南瑞集团公司 Multi-source database collaborative backup method
CN114741375A (en) * 2022-05-18 2022-07-12 江苏省联合征信有限公司 Rapid and automatic data migration system and method for multi-source heterogeneous database

Also Published As

Publication number Publication date
CN116303729A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
CN111177231B (en) Report generation method and report generation device
US11481184B2 (en) Database systems and methods for conversation-driven dynamic updates
CN105511873B (en) User interface control display method and device
US20110246961A1 (en) Template components having constraints representative of best practices in integration software development
CN108279987A (en) The method for edition management and device of application program
CN109636301A (en) Workflow configuration method, system, terminal and the readable storage medium storing program for executing of financial business
CN110555030A (en) SQL statement processing method and device
CN110286908A (en) A method of based on control formula customizing form
US11847509B2 (en) Infrastructure base model API
CN113760948A (en) Data query method and device
CN111428132A (en) Data verification method and device, computer storage medium and electronic equipment
CN111125064A (en) Method and device for generating database mode definition statement
CN110018835B (en) YANG model configuration data processing method and device, terminal device and storage medium
CN116303729B (en) Information acquisition method, device, equipment and medium
CN113626223A (en) Interface calling method and device
CN113760987A (en) Data processing method and data processing platform
JP2008269515A (en) Method for dynamically generating image layout by parameter
CN112905178A (en) Method, device, equipment and medium for generating business function page
CN114625458A (en) Page data processing method and device, electronic equipment and storage medium
CN114625373A (en) Application conversion method and device, electronic equipment and storage medium
US20030037175A1 (en) Import/export utility and a method of processing data using the same
CN112988781A (en) Data query method and device, electronic equipment and computer readable storage medium
CN113094561A (en) Webpage generation method, webpage generation device, electronic equipment and storage medium
CN109241158B (en) Data source definition method and device for rule management
CN111597784A (en) Information sending method, device, terminal equipment and 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
GR01 Patent grant
GR01 Patent grant