CN114490723A - Unified retrieval method, device, electronic equipment and storage medium - Google Patents

Unified retrieval method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114490723A
CN114490723A CN202210184361.0A CN202210184361A CN114490723A CN 114490723 A CN114490723 A CN 114490723A CN 202210184361 A CN202210184361 A CN 202210184361A CN 114490723 A CN114490723 A CN 114490723A
Authority
CN
China
Prior art keywords
query
target
standard
matched
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210184361.0A
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.)
Apollo Zhilian Beijing Technology Co Ltd
Original Assignee
Apollo Zhilian Beijing 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 Apollo Zhilian Beijing Technology Co Ltd filed Critical Apollo Zhilian Beijing Technology Co Ltd
Priority to CN202210184361.0A priority Critical patent/CN114490723A/en
Publication of CN114490723A publication Critical patent/CN114490723A/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/248Presentation of query results
    • 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/256Integrating or interfacing systems involving database management systems in federated or virtual databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure provides a unified search method, apparatus, electronic device and storage medium, which relate to the technical field of computers, in particular to the technical field of big data, and include: when a target query request is received through the uniform retrieval entrance, extracting a target service identifier and query conditions from the target query request; constructing a standard query statement matched with the query condition, and determining a target business service matched with the standard query statement according to the target business identifier; identifying a target data document matched with the target business service in the unified storage database, and forwarding the standard query statement to the target data document by a route; and triggering and executing the standard query statement, acquiring a query result matched with the standard query statement from the target data document, and feeding the query result back to a sender of the target query request. The technical scheme disclosed by the invention can reduce the development cost of the retrieval platform and improve the working efficiency of the retrieval platform.

Description

Unified retrieval method, device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a unified retrieval method and apparatus, an electronic device, and a storage medium.
Background
With the development of internet technology, smart high-speed services become more and more, and each service can generate a large amount of data every day, such as equipment alarm data, traffic event data, meteorological data or two-passenger-one-dangerous data. In order to manage and query a large amount of service data, the service data needs to be stored in a database.
In the related art, when storing and querying a large amount of service data, a plurality of databases are usually established in a retrieval system, and then the service data corresponding to different services are stored in separate databases. When a user wants to query the business data, a query component matched with the database needs to be used for acquiring a query result in the database.
Due to the characteristics of independent storage, independent retrieval and independent analysis of service data and independent communication between the query component and the database in the related technology, the development cost of the retrieval system is greatly increased; secondly, each service needs to maintain a corresponding query component and a database independently, so that the workload of developers is large; finally, because the logic codes of all the query components are similar, the development codes of the retrieval system are redundant and difficult to maintain uniformly.
Disclosure of Invention
The disclosure provides a unified retrieval method, a unified retrieval device, electronic equipment and a storage medium.
According to an aspect of the present disclosure, there is provided a unified search method, executed by a unified search platform, including:
when a target query request is received through a uniform retrieval entrance, extracting a target service identifier and query conditions from the target query request;
constructing a standard query statement matched with the query condition, and determining a target business service matched with the standard query statement according to the target business identifier;
identifying a target data document matched with the target business service in a unified storage database, and forwarding the standard query statement to the target data document by a route;
and triggering and executing the standard query statement, acquiring a query result matched with the standard query statement from the target data document, and feeding the query result back to a sender of the target query request.
According to another aspect of the present disclosure, there is provided a unified search apparatus applied to a unified search platform, including:
the request receiving module is used for extracting a target service identifier and a query condition from a target query request when the target query request is received through a uniform retrieval entrance;
the sentence construction module is used for constructing a standard query sentence matched with the query condition and determining a target business service matched with the standard query sentence according to the target business identifier;
the document identification module is used for identifying a target data document matched with the target business service in a unified storage database and forwarding the standard query statement to the target data document by a route;
and the result acquisition module is used for triggering and executing the standard query statement, acquiring a query result matched with the standard query statement from the target data document, and feeding the query result back to the sender of the target query request.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of any of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any of the embodiments of the present disclosure.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method of any of the embodiments of the present disclosure.
The technical scheme of the embodiment of the disclosure can reduce the development cost of the retrieval platform and improve the working efficiency of the retrieval platform.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
FIG. 1 is a schematic flow chart diagram of a unified search method according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart diagram of yet another unified retrieval method according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart diagram of yet another unified retrieval method according to an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of a unified search apparatus according to an embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device for a unified retrieval method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic flowchart of a unified retrieval method according to an embodiment of the present disclosure, where the present embodiment is applicable to a case of retrieving business data, and the method may be executed by a unified retrieval device, and the device may be implemented by software and/or hardware, and may be generally integrated in a unified retrieval platform having a data processing function. Specifically, referring to fig. 1, the method specifically includes the following steps:
step 110, when a target query request is received through the unified retrieval entry, extracting a target service identifier and query conditions from the target query request.
In this embodiment, when a user wants to query specific service data, a query request about the service data may be triggered in a search entry (i.e., a unified search entry) provided by the unified search platform. The unified search entry may be an Open Application Programming Interface (OpenAPI).
In a specific embodiment, a user can send a target query request to the uniform retrieval portal through other electronic equipment; or the target query request can be directly input into the uniform retrieval entrance; or selecting the service corresponding to the service data to be queried and the data attribute (such as data generation time, data format, and the like) in the unified retrieval entry, and after receiving the service and the data attribute selected by the user, the unified retrieval entry generates the target query request according to the service and the data attribute.
In this embodiment, when a target query request is received through the uniform retrieval entry, the target service identifier and the query condition may be extracted from the target query request according to a preset delimiter. The target service identifier may be identification information corresponding to a service to be queried, such as a name, a number, or other Identity (ID). The query condition may be a data attribute selected by a user, such as data generation time, data format, and the like.
And 120, constructing a standard query statement matched with the query condition, and determining a target business service matched with the standard query statement according to the target business identifier.
In this step, a standard query statement matching the query condition may be constructed according to a preset standard statement format. Optionally, the standard statement format may define an arrangement order corresponding to each data attribute. The unified retrieval platform can arrange various data attributes in the query conditions according to the arrangement sequence in the standard statement format, and then construct a query statement which can be identified by the database according to the arranged data attributes, namely the standard query statement.
In this embodiment, the unified retrieval platform may determine, according to the target service identifier, a target service corresponding to the data to be queried (i.e., a target service matching the standard query statement).
And step 130, identifying a target data document matched with the target business service in a unified storage database, and forwarding the standard query statement to the target data document by routing.
In this embodiment, the unified storage database stores, in advance, data documents corresponding to a plurality of business services, respectively, each data document stores business data generated by a corresponding business service, and a name of each data document may be associated with the corresponding business service.
After the target business service matched with the standard query statement is determined, optionally, the target data document matched with the target business service can be identified in the unified storage database according to the name of each data document, and the standard query statement is forwarded to the target data document by a route.
Step 140, triggering and executing the standard query statement, obtaining a query result matched with the standard query statement from the target data document, and feeding back the query result to the sender of the target query request.
In this embodiment, an execution standard query statement may be triggered in the target data document to obtain target service data corresponding to the target query request, and the target service data is fed back to the sender of the target query request as a query result.
In a specific embodiment, if a user sends a target query request to a uniform retrieval portal through other electronic equipment, a query result can be sent to the electronic equipment, and the query result is presented to the user through the electronic equipment; if the user directly inputs the target query request in the unified retrieval entry or generates the target query request after selecting the service and the data attribute in the unified retrieval entry, the query result can be displayed to the user through the unified retrieval platform.
In this embodiment, the unified storage database may store the service data of a plurality of service services, and when a user wants to query the service data, the unified retrieval entry may locate a data document to be queried in the unified storage database according to a fixed logic, and then obtain a query result from the data document, thereby reducing the development cost of the retrieval platform; secondly, the query of various service data can be completed through one retrieval entry, the maintenance cost of the retrieval entry can be reduced, repeated coding by developers is not needed, further, the development code redundancy can be avoided, the workload of the developers is reduced, and the working efficiency of the retrieval platform is improved.
According to the technical scheme of the embodiment, when a target query request is received through a unified retrieval inlet, a target business identifier and a query condition are extracted from the target query request, a standard query statement matched with the query condition is constructed, a target business service matched with the standard query statement is determined according to the target business identifier, a target data document matched with the target business service is identified in a unified storage database, the standard query statement is forwarded to the target data document in a routing mode, the standard query statement is triggered to be executed, a query result matched with the standard query statement is obtained from the target data document, and the query result is fed back to a sender of the target query request.
Fig. 2 is a schematic flow chart of another unified retrieval method according to an embodiment of the present disclosure, which is a further refinement of the foregoing technical solution, and the technical solution in this embodiment may be combined with one or more of the foregoing implementations. Specifically, referring to fig. 2, the method specifically includes the following steps:
step 210, when a target query request is received through the unified retrieval entry, extracting a target service identifier and query conditions in the target query request.
Step 220, obtaining at least one query parameter from the query condition.
In this embodiment, the query parameter may be a specific data value corresponding to the data attribute in the query condition. Assume that the query conditions include the following data attributes: data generation time and data format, the corresponding query parameter may be "20210102, text format".
And step 230, filling each query parameter in a query statement construction template to obtain the standard query statement.
In this embodiment, the query statement construction template includes a plurality of query parameter identification fields and items to be filled, which are matched with the query parameter identification fields; and each query parameter identification field is obtained by counting all selectable query parameters of all business services.
In a specific embodiment, the query parameter identification field may be a data attribute to which the query parameter belongs. Assuming that a total of data documents corresponding to four service services are stored in the unified retrieval platform, the query parameter identification field corresponding to the first service is "Time", the query parameter identification field corresponding to the second service is "Format", the query parameter identification field corresponding to the third service is "Length", and the query parameter identification field corresponding to the fourth service is "Type", the template constructed according to the query statement obtained by the query parameter identification field may be "Time _ + Format _ + Length _ + Type _".
Assuming that the query parameter obtained in step 220 is "20210102, text format", in the query statement construction template, after the query parameter is filled, the obtained standard query statement may be "20210102 + text format + null + null".
When business data is retrieved, parameters are varied due to different scenes of all business services, and a query statement construction template is constructed through all query parameters of all business services, so that standard query statements compatible with all business services can be obtained. The method has the advantages that the database can be conveniently and uniformly stored, the matched query result can be rapidly obtained according to the standard query statement, and the uniform retrieval and uniform analysis of various service data can be realized.
And 240, determining the target business service matched with the standard query statement according to the target business identifier.
And 250, identifying a target data document matched with the target business service in a unified storage database, and forwarding the standard query statement to the target data document by a route.
And step 260, triggering and executing the standard query statement, and acquiring a query result matched with the standard query statement in the target data document.
And step 270, constructing a standard Dynamic Script Language (DSL) request body according to the query result.
In this embodiment, when a user searches service data of multiple service services at the same time, the corresponding query results are different due to different data formats stored in different data documents. In order to facilitate the user to identify and use the query result, the obtained multiple query results can be uniformly packaged according to the specified service logic in the DSL, so as to obtain a standard DSL request body. The DSL is used for encapsulating data with different formats under the condition of ensuring the original logic of the data.
Step 280, feeding back the standard DSL request body to the sender of the target query request.
The advantage of the arrangement is that the query results in different formats are packaged into a uniform DSL request body, so that the query results can be conveniently extracted and used by a user, and the retrieval experience of the user is improved.
The technical proposal of the embodiment of the disclosure is that when a target query request is received through a unified retrieval entry, a target service identifier and a query condition are extracted from the target query request, at least one query parameter is obtained from the query condition, each query parameter is filled in a query sentence construction template to obtain a standard query sentence, a target service matched with the standard query sentence is determined according to the target service identifier, a target data document matched with the target service is identified in a unified storage database, the standard query sentence is forwarded to the target data document by a route, the standard query sentence is triggered to be executed, a query result matched with the standard query sentence is obtained from the target data document, a standard DSL request body is constructed according to the query result, and the standard DSL request body is fed back to a sender of the target query request, the development cost of the retrieval platform can be reduced, and the working efficiency of the retrieval platform is improved.
Fig. 3 is a schematic flow chart of another unified retrieval method according to an embodiment of the present disclosure, which is a further refinement of the foregoing technical solution, and the technical solution in this embodiment may be combined with one or more of the foregoing implementations. Specifically, referring to fig. 3, the method specifically includes the following steps:
step 310, obtaining the business databases corresponding to each business service, and generating the data documents corresponding to each business service according to the data in each business database.
In this embodiment, before a user queries data through the unified retrieval platform, an independent database (that is, a service database) corresponding to each service may be obtained in advance, and then data documents corresponding to each service database are generated according to data in each service database and a preset file format (for example, an Excel format, a txt text format, and the like).
And 320, storing each data document in a unified storage database in an isolated mode.
In this embodiment, the unified storage database may be an ElasticSearch database. The ElasticSearch database acts as a distributed search engine, providing a separate storage area for each data document. The method has the advantages that through the isolated storage of the data documents, on one hand, the target data documents matched with the target query request can be quickly positioned, and the retrieval efficiency is improved; on the other hand, bottlenecks encountered in the processes of storing, retrieving and analyzing data of the relational database can be reduced or avoided, and the working efficiency of the unified retrieval platform is improved.
Step 330, when a target query request is received through the unified retrieval entry, extracting a target service identifier and query conditions in the target query request.
Step 340, constructing a standard query statement matched with the query condition, and determining a target business service matched with the standard query statement according to the target business identifier.
Step 350, identifying a target data document matched with the target business service in a unified storage database, and forwarding the standard query statement to the target data document by routing.
And 360, triggering and executing the standard query statement, acquiring a query result matched with the standard query statement from the target data document, and feeding the query result back to a sender of the target query request.
In an implementation manner of this embodiment, the method further includes: responding to an access request of a target business service, acquiring a target business database matched with the target business service, and generating a target data document corresponding to the target business service according to data in the target business database; carrying out isolated storage on the target data document in the ElasticSearch database; and updating the query statement construction template according to all query parameters corresponding to the target business service.
In this embodiment, when a developer wants to store service data corresponding to a new service in the unified retrieval platform, the developer may trigger an access request corresponding to the new service (i.e., a target service) in the unified retrieval platform.
In a specific embodiment, a developer may send an access request to the unified retrieval platform through other electronic devices; or directly inputting an access request in a service interface of the unified retrieval platform, wherein the access request can comprise a service identifier of the target service. After receiving an access request of a target business service, the unified retrieval platform can acquire a target business database matched with the target business service according to a business identifier, then generate a target data document corresponding to the target business service according to data in the target business database and a preset file format (such as an Excel format, a txt text format and the like), and finally perform isolated storage on the target data document in an ElasticSearch database.
In this embodiment, after the target data document is stored in the ElasticSearch database, all query parameters corresponding to the target business service may be counted, and then it is determined whether all query parameter identification fields corresponding to the target business service are included in the query sentence construction template, and if so, the query sentence construction template does not need to be updated; if not, the query parameter identification field and the item to be filled can be added to the query statement construction template so as to complete the updating of the query statement construction template.
In one particular embodiment, assume that the query statement construction template is "Time _ + Format _ \
+ Length _ + Type _ ", the query parameter identification field corresponding to the target service is" Number ", and after the query sentence construction template is updated by using the query parameter identification field, a new query sentence construction template" Time _ + Format _ + Length _ + Type _ Number _ "can be obtained"
The method has the advantages that different business services can be accessed in the unified retrieval platform under the condition of not modifying development codes, so that unified data retrieval and data analysis functions are provided for a plurality of business services, and the unified retrieval platform realizes low coupling and high cohesion.
In a specific embodiment, the method is applied to a road network data query system; the business service comprises the following steps: large screen services, road network services, emergency services, and system services.
The large screen service refers to a visual screen system on a highway, and the corresponding business data can be road network images, monitoring data and the like on the highway. The road network service refers to a road network monitoring system on a road, and the corresponding service data may be road condition information (e.g., road signs, road lines, vehicle driving information, etc.). The emergency service can be an accident handling system on a road, and the corresponding business data can be accident information, emergency personnel information, emergency measures and the like. The system service can be a functional system on a road, and the corresponding business data can be access data of a road network data query system, access personnel and other information.
The method has the advantages that the method can uniformly retrieve road network data with various quantities and complex formats, reduces the development cost of the road network data query system, avoids developing code redundancy, and reduces the maintenance cost of the road network data query system.
The technical scheme of the disclosed embodiment includes that business databases corresponding to business services are obtained, data documents corresponding to the business services are generated according to data in the business databases, the data documents are stored in a unified storage database in an isolated mode, when a target query request is received through a unified retrieval inlet, a target business identifier and a query condition are extracted from the target query request, a standard query statement matched with the query condition is constructed, the target business service matched with the standard query statement is determined according to the target business identifier, the target data document matched with the target business service is identified in the unified storage database, the standard query statement is forwarded to the target data document, the standard query statement is triggered to be executed, and a query result matched with the standard query statement is obtained from the target data document, and the technical means of feeding back the query result to the sender of the target query request can reduce the development cost of the retrieval platform and improve the working efficiency of the retrieval platform.
The embodiment of the disclosure further provides a unified retrieval device, which is applied to a unified retrieval platform and used for executing the unified retrieval method.
Fig. 4 is a block diagram of a unified search apparatus 400 according to an embodiment of the present disclosure, where the apparatus includes: a request receiving module 410, a sentence construction module 420, a document identification module 430, and a result acquisition module 440.
The request receiving module 410 is configured to, when a target query request is received through a unified retrieval entry, extract a target service identifier and a query condition from the target query request;
a statement constructing module 420, configured to construct a standard query statement matching the query condition, and determine, according to the target service identifier, a target service matching the standard query statement;
the document identification module 430 is configured to identify a target data document matching the target business service in a unified storage database, and forward the standard query statement to the target data document by routing;
and the result obtaining module 440 is configured to trigger execution of the standard query statement, obtain a query result matched with the standard query statement in the target data document, and feed back the query result to the sender of the target query request.
According to the technical scheme of the embodiment, when a target query request is received through a unified retrieval inlet, a target business identifier and a query condition are extracted from the target query request, a standard query statement matched with the query condition is constructed, a target business service matched with the standard query statement is determined according to the target business identifier, a target data document matched with the target business service is identified in a unified storage database, the standard query statement is forwarded to the target data document in a routing mode, the standard query statement is triggered to be executed, a query result matched with the standard query statement is obtained from the target data document, and the query result is fed back to a sender of the target query request.
On the basis of the above embodiments, the unified storage database is an ElasticSearch database. The device is applied to a road network data query system; the business service comprises the following steps: large screen services, road network services, emergency services, and system services.
The sentence construction module 420 includes:
a parameter obtaining unit, configured to obtain at least one query parameter in the query condition;
the parameter filling unit is used for filling each query parameter in a query statement construction template to obtain the standard query statement;
the query statement construction template comprises a plurality of query parameter identification fields and items to be filled, wherein the items to be filled are matched with the query parameter identification fields;
and each query parameter identification field is obtained by counting all selectable query parameters of all business services.
The result obtaining module 440 includes:
the request body construction unit is used for constructing a standard dynamic scripting language DSL request body according to the query result;
and the request body feedback unit is used for feeding back the standard DSL request body to the sender of the target query request.
The device further comprises:
the document generation module is used for acquiring business databases respectively corresponding to each business service and generating data documents respectively corresponding to each business service according to data in each business database;
the document storage module is used for storing each data document in the ElasticSearch database in an isolated mode;
the database acquisition module is used for responding to an access request of a target business service, acquiring a target business database matched with the target business service, and generating a target data document corresponding to the target business service according to data in the target business database;
the isolated storage module is used for performing isolated storage on the target data document in the ElasticSearch database;
and the template updating module is used for updating the query statement to construct a template according to all query parameters corresponding to the target business service.
The unified retrieval device provided by the embodiment of the disclosure can execute the unified retrieval method provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the execution method.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 5 illustrates a schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the apparatus 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)502 or a computer program loaded from a storage unit 505 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The calculation unit 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in the device 500 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, or the like; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 505 such as a magnetic disk, optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing AI chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 501 executes the respective methods and processes described above, such as the unified retrieval method. For example, in some embodiments, the unified retrieval method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 505. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 500 via ROM 502 and/or communications unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the unified retrieval method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the unified retrieval method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), AI system on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in this disclosure may be performed in parallel or sequentially or in a different order, as long as the desired results of the technical solutions provided by this disclosure can be achieved, and are not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (15)

1. A unified search method performed by a unified search platform, wherein the method comprises:
when a target query request is received through a uniform retrieval entrance, extracting a target service identifier and query conditions from the target query request;
constructing a standard query statement matched with the query condition, and determining a target business service matched with the standard query statement according to the target business identifier;
identifying a target data document matched with the target business service in a unified storage database, and forwarding the standard query statement to the target data document by a route;
and triggering and executing the standard query statement, acquiring a query result matched with the standard query statement from the target data document, and feeding the query result back to a sender of the target query request.
2. The method of claim 1, wherein constructing a standard query statement that matches the query condition comprises:
acquiring at least one query parameter in the query condition;
filling each query parameter in a query statement construction template to obtain the standard query statement;
the query statement construction template comprises a plurality of query parameter identification fields and items to be filled, wherein the items to be filled are matched with the query parameter identification fields;
and each query parameter identification field is obtained by counting all selectable query parameters of all business services.
3. The method of claim 1, wherein feeding back the query results to a sender of the target query request comprises:
according to the query result, a standard dynamic scripting language DSL request body is constructed;
and feeding back the standard DSL request body to the sender of the target query request.
4. The method of claim 1, wherein the unified storage database is an ElasticSearch database; the method further comprises the following steps:
acquiring business databases respectively corresponding to each business service, and generating data documents respectively corresponding to each business service according to data in each business database;
and storing each data document in the ElasticSearch database in a mode of being isolated from each other.
5. The method of claim 1, wherein the method further comprises:
responding to an access request of a target business service, acquiring a target business database matched with the target business service, and generating a target data document corresponding to the target business service according to data in the target business database;
carrying out isolated storage on the target data document in the ElasticSearch database;
and updating the query statement construction template according to all query parameters corresponding to the target business service.
6. The method according to claim 1, wherein the method is applied in a road network data query system; the business service comprises the following steps: large screen services, road network services, emergency services, and system services.
7. A unified search device is applied to a unified search platform, wherein the device comprises:
the request receiving module is used for extracting a target service identifier and a query condition from a target query request when the target query request is received through a uniform retrieval entrance;
the sentence construction module is used for constructing a standard query sentence matched with the query condition and determining a target business service matched with the standard query sentence according to the target business identifier;
the document identification module is used for identifying a target data document matched with the target business service in a unified storage database and forwarding the standard query statement to the target data document by routing;
and the result acquisition module is used for triggering and executing the standard query statement, acquiring a query result matched with the standard query statement from the target data document, and feeding the query result back to the sender of the target query request.
8. The apparatus of claim 7, wherein the sentence construction module comprises:
a parameter obtaining unit, configured to obtain at least one query parameter in the query condition;
the parameter filling unit is used for filling each query parameter in a query statement construction template to obtain the standard query statement;
the query statement construction template comprises a plurality of query parameter identification fields and items to be filled, wherein the items to be filled are matched with the query parameter identification fields;
and each query parameter identification field is obtained by counting all selectable query parameters of all business services.
9. The apparatus of claim 7, wherein the result obtaining module comprises:
the request body construction unit is used for constructing a standard dynamic scripting language DSL request body according to the query result;
and the request body feedback unit is used for feeding back the standard DSL request body to the sender of the target query request.
10. The apparatus of claim 7, wherein the unified storage database is an ElasticSearch database;
the device further comprises:
the document generation module is used for acquiring business databases respectively corresponding to each business service and generating data documents respectively corresponding to each business service according to data in each business database;
and the document storage module is used for storing each data document in the ElasticSearch database in an isolated mode.
11. The apparatus of claim 7, wherein the apparatus further comprises:
the database acquisition module is used for responding to an access request of a target business service, acquiring a target business database matched with the target business service, and generating a target data document corresponding to the target business service according to data in the target business database;
the isolated storage module is used for performing isolated storage on the target data document in the ElasticSearch database;
and the template updating module is used for updating the query statement to construct a template according to all query parameters corresponding to the target business service.
12. The device of claim 7, wherein the device is applied in a road network data query system; the business service comprises the following steps: large screen services, road network services, emergency services, and system services.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6.
15. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-6.
CN202210184361.0A 2022-02-23 2022-02-23 Unified retrieval method, device, electronic equipment and storage medium Pending CN114490723A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210184361.0A CN114490723A (en) 2022-02-23 2022-02-23 Unified retrieval method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210184361.0A CN114490723A (en) 2022-02-23 2022-02-23 Unified retrieval method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114490723A true CN114490723A (en) 2022-05-13

Family

ID=81484122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210184361.0A Pending CN114490723A (en) 2022-02-23 2022-02-23 Unified retrieval method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114490723A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115455103A (en) * 2022-10-20 2022-12-09 广州明动软件股份有限公司 Dynamic query system and method based on dynamic interface engine
CN116204441A (en) * 2023-03-17 2023-06-02 百度时代网络技术(北京)有限公司 Performance test method, device, equipment and storage medium of index data structure

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115455103A (en) * 2022-10-20 2022-12-09 广州明动软件股份有限公司 Dynamic query system and method based on dynamic interface engine
CN116204441A (en) * 2023-03-17 2023-06-02 百度时代网络技术(北京)有限公司 Performance test method, device, equipment and storage medium of index data structure

Similar Documents

Publication Publication Date Title
US11238069B2 (en) Transforming a data stream into structured data
EP4099170B1 (en) Method and apparatus of auditing log, electronic device, and medium
CN105022733B (en) DINFO OEC text analyzings method for digging and equipment
CN109388637A (en) Data warehouse information processing method, device, system, medium
CN114490723A (en) Unified retrieval method, device, electronic equipment and storage medium
CN111709527A (en) Operation and maintenance knowledge map library establishing method, device, equipment and storage medium
CN111309760A (en) Data retrieval method, system, device and storage medium
CN109669931A (en) Historical data exception analysis method, system, equipment and storage medium
JP2023036681A (en) Task processing method, processing device, electronic equipment, storage medium, and computer program
CN113722600A (en) Data query method, device, equipment and product applied to big data
CN113220710A (en) Data query method and device, electronic equipment and storage medium
CN116955856A (en) Information display method, device, electronic equipment and storage medium
CN114491253B (en) Method and device for processing observation information, electronic equipment and storage medium
US20220164377A1 (en) Method and apparatus for distributing content across platforms, device and storage medium
CN110704481A (en) Method and device for displaying data
CN111159213A (en) Data query method, device, system and storage medium
CN113239054B (en) Information generation method and related device
CN115329150A (en) Method and device for generating search condition tree, electronic equipment and storage medium
CN114238475A (en) Data processing method of data warehouse
CN112988778A (en) Method and device for processing database query script
CN109710673B (en) Work processing method, device, equipment and medium
US20230086429A1 (en) Method of recognizing address, electronic device and storage medium
US20210326514A1 (en) Method for generating interpretation text, electronic device and storage medium
US20230213353A1 (en) Method of updating road information, electronic device, and storage medium
CN113094401A (en) Target source data generation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination