CN112015466A - Information retrieval method, information retrieval device, computer equipment and storage medium - Google Patents

Information retrieval method, information retrieval device, computer equipment and storage medium Download PDF

Info

Publication number
CN112015466A
CN112015466A CN202010919920.9A CN202010919920A CN112015466A CN 112015466 A CN112015466 A CN 112015466A CN 202010919920 A CN202010919920 A CN 202010919920A CN 112015466 A CN112015466 A CN 112015466A
Authority
CN
China
Prior art keywords
retrieval
information
file
target
determining
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
CN202010919920.9A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202010919920.9A priority Critical patent/CN112015466A/en
Publication of CN112015466A publication Critical patent/CN112015466A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9032Query formulation

Landscapes

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

Abstract

The invention relates to the technical field of information retrieval, relates to a block chain technology, and provides an information retrieval method, an information retrieval device, computer equipment and a storage medium, wherein the method comprises the following steps: when a retrieval instruction is received, determining retrieval information according to the retrieval instruction; determining a retrieval unit according to the retrieval information, and generating a configuration file according to the retrieval unit; inputting the configuration file into a preset generator so that the preset generator generates a target retrieval file based on the configuration file and feeds back the target retrieval file; and determining a target retrieval result according to the target retrieval file. Wherein the retrieval information may be stored in a blockchain. Compared with the prior art of information retrieval through the query assembly, the method and the device for retrieving the information determine the retrieval information according to the retrieval instruction, further determine the retrieval unit according to the retrieval information and generate the configuration file, and feed back the target retrieval file based on the configuration file by the preset generator to determine the target retrieval result, so that the defect of low efficiency in the prior art is overcome, and the information retrieval efficiency is improved.

Description

Information retrieval method, information retrieval device, computer equipment and storage medium
Technical Field
The present invention relates to the field of information retrieval technologies, and in particular, to an information retrieval method, an information retrieval apparatus, a computer device, and a storage medium.
Background
At present, information retrieval is usually performed by using a query component, and the query components on the market are many but different in size, and not only contain various complicated APIs, attributes and methods, but also if a large number of query units appear in service requirements, service codes are many, the various complicated APIs cause code readability to be reduced, maintainability to be reduced, code coupling degree to be increased, and the codes to be complicated and difficult to understand. After the requirement changes, the front end needs to do much work to change more requirements and reconstruct many files, which greatly reduces the efficiency of developers and the cost of learning the API.
For example, in a system, a business party of the last version adds some search terms, which may be 10 or more, and then a developer needs to add 10 or more search terms at the code level, different search terms are linked, but the logic and business logic of the search terms themselves are not related, but existing search modules are coupled with real business logic, once a problem occurs in one place, it is likely that the whole function will lose effect and it is very difficult to troubleshoot the problem, and as the business changes and the search terms are added or reduced, the search terms need to be deleted or added in the code with great care, which increases a lot of workload, makes the processing flow complicated, and reduces the efficiency of the developer.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide an information retrieval method, an information retrieval device, computer equipment and a storage medium, and aims to solve the technical problem that the efficiency of information retrieval through a query component is low in the prior art.
In order to achieve the above object, the present invention provides an information retrieval method, including the steps of:
when a retrieval instruction is received, determining retrieval information according to the retrieval instruction, wherein the retrieval information is stored in a block chain;
determining a retrieval unit according to the retrieval information, and generating a configuration file according to the retrieval unit;
inputting the configuration file into a preset generator so that the preset generator generates a target retrieval file based on the configuration file and feeds back the target retrieval file;
and determining a target retrieval result according to the target retrieval file.
Optionally, the step of determining a retrieval unit according to the retrieval information and generating a configuration file according to the retrieval unit includes:
extracting a search keyword from the search information;
determining a retrieval unit according to the retrieval key words, and determining the attribute of the retrieval unit corresponding to the retrieval unit;
and generating a configuration file according to the retrieval unit and the retrieval unit attribute.
Optionally, the step of generating a configuration file according to the retrieval unit and the retrieval unit attribute includes:
determining a configuration item to be processed according to the retrieval unit;
determining configuration item information corresponding to the configuration item to be processed according to the retrieval unit attribute;
and generating a configuration file according to the configuration item to be processed and the configuration item information.
Optionally, the step of determining a search unit according to the search keyword and determining a search unit attribute corresponding to the search unit includes:
searching for a retrieval object corresponding to the retrieval key word, and determining retrieval object information corresponding to the retrieval object;
matching a retrieval unit corresponding to the retrieval object;
and generating a retrieval unit attribute corresponding to the retrieval unit according to the retrieval object information.
Optionally, the step of matching the retrieval unit corresponding to the retrieval object includes:
matching the retrieval type corresponding to the retrieval object;
searching retrieval configuration information corresponding to the retrieval type;
and generating a retrieval input box according to the retrieval configuration information, and taking the retrieval input box as a retrieval unit.
Optionally, before the step of inputting the configuration file into a preset generator to enable the preset generator to generate a target search file based on the configuration file and feed back the target search file, the method further includes:
packaging the preset generator based on the preset act component to obtain a Search component;
the step of inputting the configuration file into a preset generator so that the preset generator generates a target retrieval file based on the configuration file and feeds back the target retrieval file comprises:
inputting the configuration file into the preset generator through the Search component, so that the preset generator generates a target retrieval file based on the configuration file, and feeding back the target retrieval file.
Optionally, the step of determining a target retrieval result according to the target retrieval file includes:
determining target retrieval file information according to the target retrieval file;
extracting retrieval result information from the target retrieval file information, and determining a retrieval result to be selected according to the retrieval result information;
acquiring the number of characters corresponding to the retrieval result to be selected, and judging whether the number of the characters is greater than a preset number threshold value;
when the number of the characters is larger than the preset number threshold, taking the retrieval result to be selected as a retrieval result to be displayed;
and traversing the retrieval result to be displayed, and taking the traversed retrieval result to be displayed as a target retrieval result.
In order to achieve the above object, the present invention also provides an information retrieval apparatus including:
the information determining module is used for determining retrieval information according to a retrieval instruction when the retrieval instruction is received, wherein the retrieval information is stored in a block chain;
the file generation module is used for determining a retrieval unit according to the retrieval information and generating a configuration file according to the retrieval unit;
the information retrieval module is used for inputting the configuration file into a preset generator so that the preset generator generates a target retrieval file based on the configuration file and feeds back the target retrieval file;
and the result determining module is used for determining a target retrieval result according to the target retrieval file.
In addition, to achieve the above object, the present invention also provides a computer device, including: a memory, a processor and an information retrieval program stored on the memory and executable on the processor, the information retrieval program being configured with steps implementing the information retrieval method as described above.
In addition, in order to achieve the above object, the present invention further provides a storage medium having an information retrieval program stored thereon, wherein the information retrieval program, when executed by a processor, implements the steps of the information retrieval method as described above.
The information retrieval method provided by the invention determines the retrieval information according to the retrieval instruction when receiving the retrieval instruction; determining a retrieval unit according to the retrieval information, and generating a configuration file according to the retrieval unit; inputting the configuration file into a preset generator so that the preset generator generates a target retrieval file based on the configuration file and feeds back the target retrieval file; and determining a target retrieval result according to the target retrieval file. Wherein the retrieval information may be stored in a blockchain. Compared with the prior art of information retrieval through the query assembly, the method and the device for retrieving the information determine the retrieval information according to the retrieval instruction, further determine the retrieval unit according to the retrieval information and generate the configuration file, and feed back the target retrieval file based on the configuration file by the preset generator to determine the target retrieval result, so that the defect of low efficiency in the prior art is overcome, and the information retrieval efficiency is improved.
Drawings
FIG. 1 is a schematic diagram of a computer device architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of an information retrieval method according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of an information retrieval method according to the present invention;
FIG. 4 is a flowchart illustrating a third embodiment of an information retrieval method according to the present invention;
fig. 5 is a functional block diagram of an information retrieval device according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a computer device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the computer apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may comprise a Display screen (Display), an input unit such as keys, and the optional user interface 1003 may also comprise a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The Memory 1005 may be a Random Access Memory (RAM) Memory or a non-volatile Memory (e.g., a magnetic disk Memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the device architecture shown in fig. 1 is not intended to be limiting of computer devices and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and an information retrieval program.
In the computer device shown in fig. 1, the network interface 1004 is mainly used for connecting an external network and performing data communication with other network devices; the user interface 1003 is mainly used for connecting to a user equipment and performing data communication with the user equipment; the apparatus of the present invention calls an information retrieval program stored in the memory 1005 through the processor 1001 and executes an information retrieval method provided by an embodiment of the present invention.
Based on the hardware structure, the embodiment of the information retrieval method is provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating an information retrieval method according to a first embodiment of the present invention.
In a first embodiment, the information retrieval method includes the steps of:
step S10, when receiving the retrieval instruction, determining the retrieval information according to the retrieval instruction, wherein the retrieval information is stored in the block chain.
It should be noted that the executing subject of this embodiment may be a computer device, where the computer device may be an information retrieval device, and may also be other devices that can implement the same or similar functions.
It should be noted that the information retrieval device may be a terminal device such as a desktop computer, a notebook computer, a tablet computer, a mobile phone, or other devices, which is not limited in this embodiment.
It should be understood that, when receiving the retrieval instruction, it indicates that the user needs to perform the retrieval operation at this time, and may obtain the retrieval information corresponding to the retrieval instruction. The retrieval information may be input by the user while inputting the retrieval instruction, may also be pre-input and stored in the local database, and the operation of obtaining the retrieval information is triggered when the user inputs the retrieval instruction, and may also be in other manners, which is not limited in this embodiment.
It is emphasized that, in order to further ensure the privacy and security of the search information, the search information may also be stored in a node of a block chain.
Step S20, determining a search unit according to the search information, and generating a configuration file according to the search unit.
It should be understood that the retrieval units may be determined according to the retrieval information, each retrieval unit may be regarded as a configuration item, each attribute of the retrieval unit is only one configuration point in the configuration item, and the configuration file may be generated according to the configuration item.
It can be understood that the retrieval unit can be determined according to the retrieval information, the attribute of the retrieval unit corresponding to the retrieval unit is determined, the configuration item to be processed is further determined according to the retrieval unit, the configuration item information corresponding to the configuration item to be processed is determined according to the attribute of the retrieval unit, and the configuration file is generated according to the configuration item to be processed and the configuration item information.
It should be understood that the retrieval information may be preprocessed to determine the retrieval type, and then the retrieval units that need to be generated in the page are configured based on the retrieval type, for example, name search, time module query, single number query, city search, and the like, and other information may also be configured, which is not limited in this embodiment.
In a specific implementation, the implementation code may be:
Figure BDA0002664879340000061
the above is a configuration of city search, where label is a description of the retrieval unit, key is a field to be transmitted to the background, API is API of all inherent support of this component, and content is a component type to be used by this retrieval unit.
In the above example, the search unit is described by "province city", the field "cityCode" is passed to the background, the API supports APIs such as placeholder, allowaclear, fieldNames, and the component type to be used is SelectItem.
Step S30, inputting the configuration file into a preset generator, so that the preset generator generates a target search file based on the configuration file, and feeds back the target search file.
It should be noted that the preset generator includes a UI generator, which may be the most basic UI generator, and this embodiment does not limit this.
It should be understood that after the configuration file is generated, the configuration file may be input to a preset generator, and the preset generator may automatically generate a target search file according to the configuration file and feed the target search file back to the information search device.
In an embodiment, before the step S30, the method further includes:
packaging the preset generator based on the preset act component to obtain a Search component;
the step S30 includes:
inputting the configuration file into the preset generator through the Search component, so that the preset generator generates a target retrieval file based on the configuration file, and feeding back the target retrieval file.
It should be understood that, based on the exact componentization development, the preset generator may be packaged as a Search component, and only < Search configuration }/>, where "configuration" refers to a configuration file, then a target Search file required by a service is presented in a page, and meanwhile, some logic originally belonging to a Search unit may be implemented in the Search unit, and may be used in combination or alone.
It is understood that the most basic UI generator may be created in advance, a retrieval unit may be determined according to the retrieval information, and a configuration file may be generated according to the retrieval unit, and the configuration file may be input to the generator through the Search component, for example, when the generator needs to be used, an Import Search from 'Search' may be introduced as follows, so as to call a preset generator and input the configuration file to the preset generator, so as to obtain a target retrieval template, in a DOM (document object model) structure to be exposed, a < Search config ═ { config }/>.
And step S40, determining a target retrieval result according to the target retrieval file.
It should be understood that the target search file information may be determined according to the target search file, the search result information may be extracted from the target search file, and the search result to be selected may be determined according to the search result information.
It can be understood that the target retrieval result can be displayed in the page, and the user can view the target retrieval result in the page, so that the purpose of information retrieval is achieved.
In the embodiment, when a retrieval instruction is received, the retrieval information is determined according to the retrieval instruction; determining a retrieval unit according to the retrieval information, and generating a configuration file according to the retrieval unit; inputting the configuration file into a preset generator so that the preset generator generates a target retrieval file based on the configuration file and feeds back the target retrieval file; and determining a target retrieval result according to the target retrieval file. Wherein the retrieval information may be stored in a blockchain. Compared with the prior art in which information retrieval is performed through the query component, the retrieval information is determined according to the retrieval instruction, the retrieval unit is further determined according to the retrieval information and a configuration file is generated, and the target retrieval file is fed back by the preset generator based on the configuration file to determine the target retrieval result, so that the defect of low efficiency in the prior art is overcome, and the information retrieval efficiency is improved.
In an embodiment, as shown in fig. 3, a second embodiment of the information retrieval method according to the present invention is proposed based on the first embodiment, and the step S20 includes:
step S201, extracting a search keyword from the search information.
It should be understood that a search keyword may be extracted from the search information, and the search unit may be determined according to the search keyword.
Step S202, determining a retrieval unit according to the retrieval key words, and determining the retrieval unit attribute corresponding to the retrieval unit.
It should be understood that the search unit may be determined according to the search keyword in the search information, and the search unit attribute may be determined after the search unit is determined. The retrieval unit may search for names, query for time modules, query for single numbers, query for cities, and the like, and may also be used for other information, which is not limited in this embodiment.
It is understood that each search unit has its corresponding search unit attribute, for example, a name search has its corresponding name search attribute, a time module query has its corresponding time module query attribute, a single number query has its corresponding single number query attribute, a city query has its corresponding city query attribute, etc.
In a specific implementation, when the retrieval information is related to name search, the retrieval unit can be determined to be name search, then a name search attribute corresponding to the name search is searched, and the name search attribute is used as the retrieval unit attribute.
In an embodiment, the step S202 includes:
searching for a retrieval object corresponding to the retrieval key word, and determining retrieval object information corresponding to the retrieval object; matching a retrieval unit corresponding to the retrieval object; and generating a retrieval unit attribute corresponding to the retrieval unit according to the retrieval object information.
It should be understood that a search object corresponding to the search keyword may be found. A plurality of search objects may be preset, for example, the search object may be a name, a time, a single number, a city, or the like, or may also be other objects, which is not limited in this embodiment.
It should be understood that one or more candidate keywords may be set for each retrieval object, for example, the candidate keyword corresponding to the name may be "name", "first name", "last name", "first name", and the like; the time-corresponding key words to be selected can be time, time and the like; the keywords to be selected corresponding to the order number can be the order number, the order number and the like; the candidate keywords corresponding to the city may be "city", "province city", "county city", and the like, and other candidate keywords may also be set for different search objects, which is not limited in this embodiment.
It can be understood that the search keyword can be extracted from the search information, the search keyword is matched with the candidate keyword, when the matching is successful, the candidate keyword successfully matched with the search keyword is used as the target keyword, and the search object corresponding to the target keyword is used as the search object corresponding to the search keyword.
In a specific implementation, for example, the search information may be a search name, the search keyword "name" may be extracted from the search information, and then the search keyword is matched with the keyword to be selected, and the search object may be determined to be the name according to the matching result.
It should be understood that, while the search target is set, corresponding search target information may also be set for each search target, for example, the search target information corresponding to the name is name information, the search target information corresponding to the time is time information, the search target information corresponding to the single number is single number information, the search target information corresponding to the city is city information, and other information may also be used, which is not limited in this embodiment.
It should be understood that a corresponding relationship between the retrieval object and the retrieval unit may also be set, the retrieval unit corresponding to the retrieval object may be searched after the retrieval object is determined, specifically, a mapping list may be adopted, the mapping list includes the corresponding relationship between the retrieval object and the retrieval unit, and after the retrieval object is determined, the retrieval unit corresponding to the retrieval object may be searched from the mapping list, and other searching manners may also be used, which is not limited in this embodiment.
In a specific implementation, for example, the search unit corresponding to the name may be a name search, the search unit corresponding to the time may be a time module query, the search unit corresponding to the single number may be a single number query, and the search unit corresponding to the city may be a city search. Therefore, when the retrieval object is determined to be a name, the retrieval unit corresponding to the name can be determined to be a name search, so the name search is taken as the retrieval unit corresponding to the retrieval object, and the name search attribute corresponding to the name search is found and taken as the retrieval unit attribute.
In one embodiment, the step of matching the search unit corresponding to the search object includes:
matching the retrieval type corresponding to the retrieval object; searching retrieval configuration information corresponding to the retrieval type; and generating a retrieval input box according to the retrieval configuration information, and taking the retrieval input box as a retrieval unit.
It should be understood that, in order to further improve the accuracy of determining the retrieval unit, the retrieval type corresponding to the retrieval object may be matched, and then the retrieval configuration information corresponding to the retrieval type may be determined.
It is to be understood that a corresponding search type may be set in advance for each search object, and corresponding search configuration information may be set for each search type. For example, the corresponding search type may be set as a name search type for a name, and the corresponding name search configuration information may be configured for the name search type.
In a specific implementation, when the retrieval object is determined to be a name, the retrieval type corresponding to the name can be searched for as a name retrieval type, and name retrieval configuration information corresponding to the name retrieval type is used as retrieval configuration information corresponding to the retrieval type.
It is to be understood that, when the retrieval configuration information is name retrieval configuration information, a name input box may be generated and then used as a retrieval unit.
Step S203, generating a configuration file according to the retrieval unit and the retrieval unit attribute.
It should be understood that after determining the search units and the search unit attributes, a configuration file may be generated based on the search units and the search unit attributes.
In an embodiment, the step S203 includes:
determining a configuration item to be processed according to the retrieval unit; determining configuration item information corresponding to the configuration item to be processed according to the retrieval unit attribute; and generating a configuration file according to the configuration item to be processed and the configuration item information.
It should be understood that a configuration file is composed of a plurality of configuration items and configuration item information corresponding to the configuration items. Therefore, the retrieval unit can be used as a to-be-processed configuration item, the attribute of the retrieval unit can be used as configuration item information corresponding to the to-be-processed configuration item, and a configuration file can be generated according to the to-be-processed configuration item and the configuration item information.
In the embodiment, a retrieval unit is determined according to the retrieval information, and a retrieval unit attribute corresponding to the retrieval unit is determined; and generating a configuration file according to the retrieval unit and the retrieval unit attribute. Therefore, the retrieval unit and the retrieval unit attribute are determined according to the retrieval information, and the configuration file is generated according to the retrieval unit and the retrieval unit attribute, so that the efficiency and the accuracy of generating the configuration file are improved.
In an embodiment, as shown in fig. 4, a third embodiment of the information retrieval method according to the present invention is proposed based on the first embodiment or the second embodiment, and in this embodiment, the description is made based on the first embodiment, and the step S40 includes:
step S401, determining target retrieval file information according to the target retrieval file.
It should be understood that the target search document includes target search document information, and therefore, after the target search document is determined, the target search document information may be determined based on the target search document.
Step S402, extracting retrieval result information from the target retrieval file information, and determining a retrieval result to be selected according to the retrieval result information.
It should be understood that the target search document information may include search result information and may also include other information, which is not limited in this embodiment.
It can be understood that after the retrieval result information is obtained, the retrieval result to be selected can be determined according to the retrieval result information. The number of the search results to be selected may be one or more, which is not limited in this embodiment.
Step S403, obtaining the number of characters corresponding to the search result to be selected, and determining whether the number of characters is greater than a preset number threshold.
It should be understood that, in order to avoid displaying invalid or insignificant search results and affecting user experience, a preset number threshold may be set, and the search to be selected is screened according to the preset number threshold. The preset number threshold may be a numerical value such as 0 or 5, or may be another numerical value, which is not limited in this embodiment.
It should be understood that the number of characters corresponding to each search result to be selected may be obtained, where special symbols such as punctuation marks may be counted into the number of characters, or the special symbols may not be counted, but the number of characters is counted as the number of characters, which is not limited in this embodiment.
It can be understood that the number of characters is compared with a preset number threshold, whether the number of characters is greater than the preset number threshold is judged, when the number of characters is less than or equal to the preset number threshold, the meaning of the to-be-selected retrieval result corresponding to the number of characters is judged to be not great, and the to-be-selected retrieval result is screened out and not displayed to the user.
And S404, when the number of the characters is larger than the preset number threshold, taking the retrieval result to be selected as the retrieval result to be displayed.
It should be understood that, when the number of characters is greater than the preset number threshold, it is determined that the search result to be selected corresponding to the number of characters is a search result meeting the specification, and the search result to be selected may be presented to the user, so that it may be used as the search result to be presented.
Step S405, traversing the retrieval result to be displayed, and taking the traversed retrieval result to be displayed as a target retrieval result.
It should be understood that after the screening in the above steps, a part of the retrieval results to be displayed can be screened from the retrieval results to be selected, and after the retrieval results to be displayed are determined, the retrieval results to be displayed can be traversed, the traversed retrieval results to be displayed are taken as target retrieval results, and the target retrieval results are displayed to the user in a webpage.
It should be understood that if the target search result does not meet the specification at last, that is, the number of target search results is 0, the prompt information is generated, and the user is prompted based on the prompt information to suspend the search result.
In the embodiment, target retrieval file information is determined according to the target retrieval file; extracting retrieval result information from the target retrieval file information, and determining a retrieval result to be selected according to the retrieval result information; acquiring the number of characters corresponding to the retrieval result to be selected, and judging whether the number of the characters is greater than a preset number threshold value; when the number of the characters is larger than the preset number threshold, taking the retrieval result to be selected as a retrieval result to be displayed; and traversing the retrieval result to be displayed, and taking the traversed retrieval result to be displayed as a target retrieval result. After the retrieval result to be selected is obtained, the retrieval result to be selected is screened, and the target retrieval result is selected from the screened retrieval results, so that invalid or less significant retrieval results are prevented from being displayed.
Furthermore, an embodiment of the present invention further provides a storage medium, on which an information retrieval program is stored, and the information retrieval program, when executed by a processor, implements the steps of the information retrieval method as described above.
Since the storage medium adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and no further description is given here.
In addition, referring to fig. 5, an embodiment of the present invention further provides an information retrieval apparatus, where the information retrieval apparatus includes:
the information determining module 10 is configured to, when a retrieval instruction is received, determine retrieval information according to the retrieval instruction, where the retrieval information is stored in a block chain.
It should be understood that, when receiving the retrieval instruction, it indicates that the user needs to perform the retrieval operation at this time, and may obtain the retrieval information corresponding to the retrieval instruction. The retrieval information may be input by the user while inputting the retrieval instruction, may also be pre-input and stored in the local database, and the operation of obtaining the retrieval information is triggered when the user inputs the retrieval instruction, and may also be in other manners, which is not limited in this embodiment.
It is emphasized that, in order to further ensure the privacy and security of the search information, the search information may also be stored in a node of a block chain.
And the file generation module 20 is configured to determine a retrieval unit according to the retrieval information, and generate a configuration file according to the retrieval unit.
It should be understood that the retrieval units may be determined according to the retrieval information, each retrieval unit may be regarded as a configuration item, each attribute of the retrieval unit is only one configuration point in the configuration item, and the configuration file may be generated according to the configuration item.
It can be understood that the retrieval unit can be determined according to the retrieval information, the attribute of the retrieval unit corresponding to the retrieval unit is determined, the configuration item to be processed is further determined according to the retrieval unit, the configuration item information corresponding to the configuration item to be processed is determined according to the attribute of the retrieval unit, and the configuration file is generated according to the configuration item to be processed and the configuration item information.
It should be understood that the retrieval information may be preprocessed to determine the retrieval type, and then the retrieval units that need to be generated in the page are configured based on the retrieval type, for example, name search, time module query, single number query, city search, and the like, and other information may also be configured, which is not limited in this embodiment.
In a specific implementation, the implementation code may be:
Figure BDA0002664879340000131
the above is a configuration of city search, where label is a description of the retrieval unit, key is a field to be transmitted to the background, API is API of all inherent support of this component, and content is a component type to be used by this retrieval unit.
In the above example, the search unit is described by "province city", the field "cityCode" is passed to the background, the API supports APIs such as placeholder, allowaclear, fieldNames, and the component type to be used is SelectItem.
The information retrieval module 30 is configured to input the configuration file into a preset generator, so that the preset generator generates a target retrieval file based on the configuration file, and feeds back the target retrieval file.
It should be noted that the preset generator includes a UI generator, which may be the most basic UI generator, and this embodiment does not limit this.
It should be understood that after the configuration file is generated, the configuration file may be input to a preset generator, and the preset generator may automatically generate a target search file according to the configuration file and feed the target search file back to the information search device.
In an embodiment, the information retrieving module 30 is further configured to perform packing processing on a preset generator based on a preset act component to obtain a Search component; inputting the configuration file into the preset generator through the Search component, so that the preset generator generates a target retrieval file based on the configuration file, and feeding back the target retrieval file.
It should be understood that, based on the exact componentization development, the preset generator may be packaged as a Search component, and only < Search configuration }/>, where "configuration" refers to a configuration file, then a target Search file required by a service is presented in a page, and meanwhile, some logic originally belonging to a Search unit may be implemented in the Search unit, and may be used in combination or alone.
It can be understood that the most basic UI generator can be created in advance, a retrieval unit is determined according to the retrieval information, a configuration file is generated according to the retrieval unit, and the configuration file is input into the generator through the Search component, for example, when the generator needs to be used, an Import Search from ' Search ' can be introduced as follows, so that a preset generator is called and the configuration file is input into the preset generator to obtain the target retrieval template, wherein < Search config ═ { config }/> ' in the DOM structure to be displayed.
And the result determining module 40 is used for determining a target retrieval result according to the target retrieval file.
It should be understood that the target search file information may be determined according to the target search file, the search result information may be extracted from the target search file, and the search result to be selected may be determined according to the search result information.
It can be understood that the target retrieval result can be displayed in the page, and the user can view the target retrieval result in the page, so that the purpose of information retrieval is achieved.
In the embodiment, when a retrieval instruction is received, the retrieval information is determined according to the retrieval instruction; determining a retrieval unit according to the retrieval information, and generating a configuration file according to the retrieval unit; inputting the configuration file into a preset generator so that the preset generator generates a target retrieval file based on the configuration file and feeds back the target retrieval file; and determining a target retrieval result according to the target retrieval file. Wherein the retrieval information may be stored in a blockchain. Compared with the prior art in which information retrieval is performed through the query component, the retrieval information is determined according to the retrieval instruction, the retrieval unit is further determined according to the retrieval information and a configuration file is generated, and the target retrieval file is fed back by the preset generator based on the configuration file to determine the target retrieval result, so that the defect of low efficiency in the prior art is overcome, and the information retrieval efficiency is improved.
In an embodiment, the file generating module 20 is further configured to extract a search keyword from the search information; determining a retrieval unit according to the retrieval key words, and determining the attribute of the retrieval unit corresponding to the retrieval unit; and generating a configuration file according to the retrieval unit and the retrieval unit attribute.
In an embodiment, the file generating module 20 is further configured to determine a configuration item to be processed according to the retrieving unit; determining configuration item information corresponding to the configuration item to be processed according to the retrieval unit attribute; and generating a configuration file according to the configuration item to be processed and the configuration item information.
In an embodiment, the file generating module 20 is further configured to search for a search object corresponding to the search keyword, and determine search object information corresponding to the search object; matching a retrieval unit corresponding to the retrieval object; and generating a retrieval unit attribute corresponding to the retrieval unit according to the retrieval object information.
In an embodiment, the file generating module 20 is further configured to match a retrieval type corresponding to the retrieval object; searching retrieval configuration information corresponding to the retrieval type; and generating a retrieval input box according to the retrieval configuration information, and taking the retrieval input box as a retrieval unit.
In an embodiment, the information retrieving module 30 is further configured to perform packing processing on a preset generator based on a preset act component to obtain a Search component; inputting the configuration file into the preset generator through the Search component, so that the preset generator generates a target retrieval file based on the configuration file, and feeding back the target retrieval file.
In an embodiment, the result determining module 40 is further configured to determine target search document information according to the target search document; extracting retrieval result information from the target retrieval file information, and determining a retrieval result to be selected according to the retrieval result information; acquiring the number of characters corresponding to the retrieval result to be selected, and judging whether the number of the characters is greater than a preset number threshold value; when the number of the characters is larger than the preset number threshold, taking the retrieval result to be selected as a retrieval result to be displayed; and traversing the retrieval result to be displayed, and taking the traversed retrieval result to be displayed as a target retrieval result.
In other embodiments or specific implementation methods of the information retrieval device according to the present invention, reference may be made to the above method embodiments, which are not described herein again.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, and includes instructions for enabling a smart device (such as a mobile phone, an estimator, a computer device, an air conditioner, or a network computer device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An information retrieval method, characterized by comprising the steps of:
when a retrieval instruction is received, determining retrieval information according to the retrieval instruction, wherein the retrieval information is stored in a block chain;
determining a retrieval unit according to the retrieval information, and generating a configuration file according to the retrieval unit;
inputting the configuration file into a preset generator so that the preset generator generates a target retrieval file based on the configuration file and feeds back the target retrieval file;
and determining a target retrieval result according to the target retrieval file.
2. The information retrieval method of claim 1, wherein the step of determining a retrieval unit based on the retrieval information and generating a configuration file based on the retrieval unit comprises:
extracting a search keyword from the search information;
determining a retrieval unit according to the retrieval key words, and determining the attribute of the retrieval unit corresponding to the retrieval unit;
and generating a configuration file according to the retrieval unit and the retrieval unit attribute.
3. The information retrieval method of claim 2, wherein the step of generating a configuration file based on the retrieval unit and the retrieval unit attributes comprises:
determining a configuration item to be processed according to the retrieval unit;
determining configuration item information corresponding to the configuration item to be processed according to the retrieval unit attribute;
and generating a configuration file according to the configuration item to be processed and the configuration item information.
4. The information retrieval method according to claim 2, wherein the step of determining a retrieval unit based on the retrieval keyword and determining a retrieval unit attribute corresponding to the retrieval unit comprises:
searching for a retrieval object corresponding to the retrieval key word, and determining retrieval object information corresponding to the retrieval object;
matching a retrieval unit corresponding to the retrieval object;
and generating a retrieval unit attribute corresponding to the retrieval unit according to the retrieval object information.
5. The information retrieval method according to claim 4, wherein the step of matching the retrieval unit corresponding to the retrieval object includes:
matching the retrieval type corresponding to the retrieval object;
searching retrieval configuration information corresponding to the retrieval type;
and generating a retrieval input box according to the retrieval configuration information, and taking the retrieval input box as a retrieval unit.
6. The information retrieval method according to any one of claims 1 to 5, wherein before the step of inputting the configuration file into a preset generator so that the preset generator generates a target retrieval file based on the configuration file and feeds back the target retrieval file, the method further comprises:
packaging the preset generator based on the preset act component to obtain a Search component;
the step of inputting the configuration file into a preset generator so that the preset generator generates a target retrieval file based on the configuration file and feeds back the target retrieval file comprises:
inputting the configuration file into the preset generator through the Search component, so that the preset generator generates a target retrieval file based on the configuration file, and feeding back the target retrieval file.
7. The information retrieval method according to any one of claims 1 to 5, wherein the step of determining a target retrieval result from the target retrieval file includes:
determining target retrieval file information according to the target retrieval file;
extracting retrieval result information from the target retrieval file information, and determining a retrieval result to be selected according to the retrieval result information;
acquiring the number of characters corresponding to the retrieval result to be selected, and judging whether the number of the characters is greater than a preset number threshold value;
when the number of the characters is larger than the preset number threshold, taking the retrieval result to be selected as a retrieval result to be displayed;
and traversing the retrieval result to be displayed, and taking the traversed retrieval result to be displayed as a target retrieval result.
8. An information retrieval apparatus characterized by comprising:
the information determining module is used for determining retrieval information according to a retrieval instruction when the retrieval instruction is received, wherein the retrieval information is stored in a block chain;
the file generation module is used for determining a retrieval unit according to the retrieval information and generating a configuration file according to the retrieval unit;
the information retrieval module is used for inputting the configuration file into a preset generator so that the preset generator generates a target retrieval file based on the configuration file and feeds back the target retrieval file;
and the result determining module is used for determining a target retrieval result according to the target retrieval file.
9. A computer device, characterized in that the computer device comprises: memory, a processor and an information retrieval program stored on the memory and executable on the processor, the information retrieval program being configured to implement the steps of the information retrieval method as claimed in any one of claims 1 to 7.
10. A storage medium, characterized in that the storage medium has stored thereon an information retrieval program which, when executed by a processor, implements the steps of the information retrieval method according to any one of claims 1 to 7.
CN202010919920.9A 2020-09-03 2020-09-03 Information retrieval method, information retrieval device, computer equipment and storage medium Pending CN112015466A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010919920.9A CN112015466A (en) 2020-09-03 2020-09-03 Information retrieval method, information retrieval device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010919920.9A CN112015466A (en) 2020-09-03 2020-09-03 Information retrieval method, information retrieval device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112015466A true CN112015466A (en) 2020-12-01

Family

ID=73516872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010919920.9A Pending CN112015466A (en) 2020-09-03 2020-09-03 Information retrieval method, information retrieval device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112015466A (en)

Similar Documents

Publication Publication Date Title
CN106406844B (en) Method and device for realizing public number menu of communication interaction platform
US20070204216A1 (en) System and method for creating layouts using a layout editor
CN105550206B (en) The edition control method and device of structured query sentence
CN110738049B (en) Similar text processing method and device and computer readable storage medium
CN111651468A (en) Data updating method and device based on SQL analysis, electronic equipment and storage medium
CN110399448B (en) Chinese place name address searching and matching method, terminal and computer readable storage medium
CN108415998B (en) Application dependency relationship updating method, terminal, device and storage medium
CN109190062B (en) Crawling method and device for target corpus data and storage medium
CN111475700A (en) Data extraction method and related equipment
CN111274263A (en) Visual database change statement generation method and device and storage medium
CN115599386A (en) Code generation method, device, equipment and storage medium
CN114676133A (en) Index creating method, device, equipment and storage medium
CN113434582B (en) Service data processing method and device, computer equipment and storage medium
CN114398138A (en) Interface generation method and device, computer equipment and storage medium
CN113869789A (en) Risk monitoring method and device, computer equipment and storage medium
CN112069236A (en) Associated file display method, device, equipment and storage medium
CN111178025A (en) Editing method and device of nuclear power plant operation guide rules, computer equipment and storage medium
CN110647537A (en) Data searching method, device and storage medium
CN112015466A (en) Information retrieval method, information retrieval device, computer equipment and storage medium
CN115576624A (en) Programming framework optimization method, system, terminal equipment and storage medium
CN110308931B (en) Data processing method and related device
CN111767703B (en) Form data acquisition method, device and system
CN113051900A (en) Synonym recognition method and device, computer equipment and storage medium
US20150324333A1 (en) Systems and methods for automatically generating hyperlinks
CN111753548A (en) Information acquisition method and device, computer storage medium and electronic equipment

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