Movatterモバイル変換


[0]ホーム

URL:


CN114297535A - Method, Apparatus, Equipment and Storage Medium for Displaying Query Conditions on a Page - Google Patents

Method, Apparatus, Equipment and Storage Medium for Displaying Query Conditions on a Page
Download PDF

Info

Publication number
CN114297535A
CN114297535ACN202111555569.0ACN202111555569ACN114297535ACN 114297535 ACN114297535 ACN 114297535ACN 202111555569 ACN202111555569 ACN 202111555569ACN 114297535 ACN114297535 ACN 114297535A
Authority
CN
China
Prior art keywords
query
condition
target
field
conditions
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
CN202111555569.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.)
Dongpu Software Co Ltd
Original Assignee
Dongpu Software 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 Dongpu Software Co LtdfiledCriticalDongpu Software Co Ltd
Priority to CN202111555569.0ApriorityCriticalpatent/CN114297535A/en
Publication of CN114297535ApublicationCriticalpatent/CN114297535A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Landscapes

Abstract

Translated fromChinese

本发明涉及人工智能领域,公开了查询条件的页面展示方法、装置、设备及存储介质,用于查询条件的精准显示,提高数据查询时的效率。方法包括:对预置查询页面进行解析,得到对应的字段标识并通过字段标识从预置数据库中获取至少两个字段类型信息;根据至少两个字段类型信息进行条件生成,得到至少两个查询条件;接收终端发送的查询条件展示请求并对查询条件展示请求进行响应,确定对应的条件筛选算法及目标字段;根据目标字段及条件筛选算法对至少两个查询条件进行筛选,得到对应的筛选结果,并根据筛选结果生成对应的条件展示组件;对条件展示组件进行渲染,得到对应的查询条件展示页面并展示所述查询条件展示页面。

Figure 202111555569

The invention relates to the field of artificial intelligence, and discloses a page display method, device, device and storage medium for query conditions, which are used for accurate display of query conditions and improve the efficiency of data query. The method includes: parsing a preset query page to obtain a corresponding field identifier and obtaining at least two field type information from a preset database through the field identifier; generating conditions according to the at least two field type information to obtain at least two query conditions ; Receive the query condition display request sent by the terminal and respond to the query condition display request, and determine the corresponding condition screening algorithm and target field; filter at least two query conditions according to the target field and the condition screening algorithm to obtain the corresponding screening result, and generate corresponding condition display components according to the screening results; render the condition display components to obtain a corresponding query condition display page and display the query condition display page.

Figure 202111555569

Description

Translated fromChinese
查询条件的页面展示方法、装置、设备及存储介质Method, Apparatus, Equipment and Storage Medium for Displaying Query Conditions on a Page

技术领域technical field

本发明涉及人工智能领域,尤其涉及一种查询条件的页面展示方法、装置、设备及存储介质。The present invention relates to the field of artificial intelligence, and in particular, to a method, device, device and storage medium for displaying query conditions on a page.

背景技术Background technique

随着互联网的不断发展,互联网工作人员在日常工作中,为了了解业务开展情况,会需要实时的业务统计信息,时常需要从大量数据中获得自己需要的数据,以用于业务处理或分析等。With the continuous development of the Internet, Internet workers need real-time business statistics in order to understand the business development in their daily work, and often need to obtain the data they need from a large amount of data for business processing or analysis.

但是,如果并不了解所需要查询的海量数据的大致情况,很可能无法配置出恰当的查询条件,导致需要多次尝试才能够获得需要的数据,从而既浪费用户的时间和精力,又消耗了大量查询资源。现在通常采用模糊查询的方式,这种方式往往需要进行多次查询才能找到需要的目标,而且不能根据查询需求设置查询条件进行查询,查询条件展开后空间占用太大并无法对条件进行范围处理。使得查询工作非常繁琐而且工作量巨大,导致查询效率低下。However, if you do not know the general situation of the massive data that needs to be queried, you may not be able to configure appropriate query conditions, resulting in multiple attempts to obtain the required data, which not only wastes the user's time and energy, but also consumes Lots of query resources. Fuzzy query is usually used now. This method often requires multiple queries to find the desired target, and query conditions cannot be set according to the query requirements. After the query conditions are expanded, the space is too large and the conditions cannot be processed in a range. The query work is very cumbersome and the workload is huge, resulting in low query efficiency.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供了一种查询条件的页面展示方法、装置、设备及存储介质,用于查询条件的精准显示,提高数据查询时的效率。Embodiments of the present invention provide a method, device, device and storage medium for displaying query conditions on a page, which are used for accurate display of query conditions and improve the efficiency of data query.

本发明第一方面提供了一种查询条件的页面展示方法,包括:对预置查询页面进行解析,得到对应的字段标识并通过所述字段标识从预置数据库中获取至少两个字段类型信息;根据所述至少两个字段类型信息进行条件生成,得到至少两个查询条件,其中,所述查询条件包括多个查询项,每一查询项与每一预设字段表达式一一对应;接收终端发送的查询条件展示请求并对所述查询条件展示请求进行响应,确定对应的条件筛选算法及目标字段;根据所述目标字段及所述条件筛选算法对所述至少两个查询条件进行筛选,得到对应的筛选结果,并根据所述筛选结果生成对应的条件展示组件;对所述条件展示组件进行渲染,得到对应的查询条件展示页面并展示所述查询条件展示页面。A first aspect of the present invention provides a page display method for query conditions, including: parsing a preset query page, obtaining a corresponding field identifier, and obtaining at least two field type information from a preset database through the field identifier; Condition generation is performed according to the at least two field type information to obtain at least two query conditions, wherein the query conditions include multiple query items, and each query item corresponds to each preset field expression one-to-one; the receiving terminal Send a query condition display request and respond to the query condition display request, and determine the corresponding condition screening algorithm and target field; filter the at least two query conditions according to the target field and the condition screening algorithm, and obtain The corresponding screening results are generated, and corresponding condition display components are generated according to the screening results; the condition display components are rendered to obtain a corresponding query condition display page and the query condition display page is displayed.

可选的,在本发明第一方面的第一种实现方式中,所述根据所述至少两个字段类型信息进行条件生成,得到至少两个查询条件,其中,所述查询条件包括多个查询项,每一查询项与每一预设字段表达式一一对应包括:获取每一所述字段类型信息对应的属性信息,通过预置反射机制对所述每一所述字段类型信息对应的属性信息进行查询项匹配,得到对应的多个查询项;通过所述对应的多个查询项进行查询条件生成,得到至少两个查询条件。Optionally, in the first implementation manner of the first aspect of the present invention, the condition generation is performed according to the at least two field type information to obtain at least two query conditions, wherein the query conditions include multiple queries The one-to-one correspondence between each query item and each preset field expression includes: acquiring attribute information corresponding to each of the field type information, and using a preset reflection mechanism for the attribute corresponding to each of the field type information. The information is matched with the query items to obtain a plurality of corresponding query items; the query conditions are generated through the corresponding multiple query items, and at least two query conditions are obtained.

可选的,在本发明第一方面的第二种实现方式中,所述根据所述目标字段及所述条件筛选算法对所述至少两个查询条件进行筛选,得到对应的筛选结果,并根据所述筛选结果生成对应的条件展示组件包括:基于所述目标字段,通过所述条件筛选算法对所述至少两个查询条件进行字段相似度计算,得到每一所述查询条件对应的相似度;通过每一所述查询条件对应的相似度进行排序,得到对应的排序列表,并根据所述排序列表确定排在前列的M个查询条件并作为所述筛选结果,其中,M为大于或等于5的正整数;通过所述筛选结果进行组件生成,得到对应的条件展示组件。Optionally, in the second implementation manner of the first aspect of the present invention, the at least two query conditions are screened according to the target field and the condition screening algorithm, to obtain corresponding screening results, and according to The generating of the corresponding condition display component from the screening result includes: based on the target field, performing a field similarity calculation on the at least two query conditions through the condition screening algorithm to obtain a similarity corresponding to each of the query conditions; Sort by the similarity corresponding to each of the query conditions to obtain a corresponding ranking list, and determine the top M query conditions according to the ranking list and use them as the screening results, where M is greater than or equal to 5 is a positive integer; components are generated through the screening results, and corresponding conditional display components are obtained.

可选的,在本发明第一方面的第三种实现方式中,所述对所述条件展示组件进行渲染,得到对应的查询条件展示页面并展示所述查询条件展示页面包括:从预先封装的多个预设组件模板中确定出与所述条件展示组件对应的目标组件模板;获取所述条件展示组件的属性信息,并将所述属性信息输入到所述目标组件模板进行渲染,获得所述条件展示组件的渲染结果;将所述渲染结果显示在所述页面中,得到对应的查询条件展示页面并展示所述查询条件展示页面。Optionally, in a third implementation manner of the first aspect of the present invention, rendering the condition display component to obtain a corresponding query condition display page and displaying the query condition display page includes: from a pre-packaged A target component template corresponding to the conditional display component is determined from a plurality of preset component templates; attribute information of the conditional display component is obtained, and the attribute information is input into the target component template for rendering, and the obtained The rendering result of the condition display component; the rendering result is displayed on the page, the corresponding query condition display page is obtained, and the query condition display page is displayed.

可选的,在本发明第一方面的第四种实现方式中,在所述对所述条件展示组件进行渲染,得到对应的查询条件展示页面并展示所述查询条件展示页面之后,还包括:接收终端发送的查询请求并对所述查询请求进行解析,得到对应的目标字段类型信息;对所述目标字段类型信息进行查询条件匹配,得到对应的目标查询条件;根据所述目标查询条件,确定与所述目标查询条件对应的数据查询类型;通过所述数据查询类型对应的解析规则,对所述目标查询条件进行解析,获取所述目标查询条件对应的查询语句;执行所述查询语句,获得所述目标查询条件对应的数据查询结果。Optionally, in the fourth implementation manner of the first aspect of the present invention, after rendering the condition display component to obtain a corresponding query condition display page and displaying the query condition display page, the method further includes: Receive a query request sent by the terminal and parse the query request to obtain corresponding target field type information; perform query condition matching on the target field type information to obtain corresponding target query conditions; determine according to the target query conditions the data query type corresponding to the target query condition; analyze the target query condition through the parsing rule corresponding to the data query type to obtain the query statement corresponding to the target query condition; execute the query statement to obtain The data query result corresponding to the target query condition.

可选的,在本发明第一方面的第五种实现方式中,所述通过所述数据查询类型对应的解析规则,对所述目标查询条件进行解析,获取所述目标查询条件对应的查询语句包括:若所述数据查询类型为合取查询,则对所述目标查询条件进行扫描,确定对应的多个候选查询项,并根据每一所述候选查询项对应的目标字段表达式,获取所述目标查询条件对应的查询语句;若所述数据查询类型为复杂查询,则通过预置模板引擎对所述目标查询条件进行解析,生成与所述目标查询条件对应的查询语句。Optionally, in a fifth implementation manner of the first aspect of the present invention, the target query condition is parsed according to a parsing rule corresponding to the data query type, and a query statement corresponding to the target query condition is obtained. The method includes: if the data query type is a conjunctive query, scanning the target query conditions, determining a plurality of corresponding candidate query items, and obtaining all the candidate query items according to the target field expression corresponding to each candidate query item. The query statement corresponding to the target query condition; if the data query type is a complex query, the target query condition is parsed by a preset template engine, and a query statement corresponding to the target query condition is generated.

可选的,在本发明第一方面的第六种实现方式中,所述对所述目标查询条件进行扫描,确定对应的多个候选查询项,并根据所述每一候选查询项对应的目标字段表达式,获取所述目标查询条件对应的查询语句包括:对每一所述候选查询项对应的目标字段表达式进行解析,获得所述每一候选查询项包含的字段和运算符;基于运算符与预置查询语法的对应关系,确定所述每一候选查询项对应的字段值,并根据所述每一候选查询项对应的字段、运算符及字段值进行查询语句生成,得到所述每一候选查询项对应的查询语句;将所述每一候选查询项对应的查询语句进行组合,获取所述目标查询条件对应的查询语句。Optionally, in the sixth implementation manner of the first aspect of the present invention, the target query condition is scanned, a plurality of corresponding candidate query items are determined, and the target query item corresponding to each candidate query item is determined according to the target query condition. Field expression, obtaining the query statement corresponding to the target query condition includes: parsing the target field expression corresponding to each candidate query item to obtain the fields and operators included in each candidate query item; The corresponding relationship between the character and the preset query grammar is determined, the field value corresponding to each candidate query item is determined, and the query statement is generated according to the field, operator and field value corresponding to each candidate query item, and the each candidate query item is obtained. A query statement corresponding to a candidate query item; the query statement corresponding to each candidate query item is combined to obtain a query statement corresponding to the target query condition.

本发明第二方面提供了一种查询条件的页面展示装置,包括:解析模块,用于对预置查询页面进行解析,得到对应的字段标识并通过所述字段标识从预置数据库中获取至少两个字段类型信息;生成模块,用于根据所述至少两个字段类型信息进行条件生成,得到至少两个查询条件,其中,所述查询条件包括多个查询项,每一查询项与每一预设字段表达式一一对应;响应模块,用于接收终端发送的查询条件展示请求并对所述查询条件展示请求进行响应,确定对应的条件筛选算法及目标字段;筛选模块,用于根据所述目标字段及所述条件筛选算法对所述至少两个查询条件进行筛选,得到对应的筛选结果,并根据所述筛选结果生成对应的条件展示组件;渲染模块,用于对所述条件展示组件进行渲染,得到对应的查询条件展示页面并展示所述查询条件展示页面。A second aspect of the present invention provides a page display device for query conditions, comprising: a parsing module, configured to parse a preset query page, obtain corresponding field identifiers, and obtain at least two data from a preset database through the field identifiers field type information; a generating module, configured to perform condition generation according to the at least two field type information to obtain at least two query conditions, wherein the query conditions include a plurality of query items, and each query item is associated with each predetermined item. Set the field expressions to correspond one-to-one; the response module is used to receive the query condition display request sent by the terminal and respond to the query condition display request, and determine the corresponding condition screening algorithm and target field; The target field and the conditional screening algorithm filter the at least two query conditions to obtain corresponding screening results, and generate corresponding conditional display components according to the screening results; Rendering to obtain a corresponding query condition display page and display the query condition display page.

可选的,在本发明第二方面的第一种实现方式中,所述生成模块具体用于:获取每一所述字段类型信息对应的属性信息,通过预置反射机制对所述每一所述字段类型信息对应的属性信息进行查询项匹配,得到对应的多个查询项;通过所述对应的多个查询项进行查询条件生成,得到至少两个查询条件。Optionally, in the first implementation manner of the second aspect of the present invention, the generating module is specifically configured to: obtain attribute information corresponding to each of the field type information, and use a preset reflection mechanism The attribute information corresponding to the field type information is matched with the query items to obtain a plurality of corresponding query items; the query conditions are generated through the corresponding multiple query items, and at least two query conditions are obtained.

可选的,在本发明第二方面的第二种实现方式中,所述筛选模块具体用于:基于所述目标字段,通过所述条件筛选算法对所述至少两个查询条件进行字段相似度计算,得到每一所述查询条件对应的相似度;通过每一所述查询条件对应的相似度进行排序,得到对应的排序列表,并根据所述排序列表确定排在前列的M个查询条件并作为所述筛选结果,其中,M为大于或等于5的正整数;通过所述筛选结果进行组件生成,得到对应的条件展示组件。Optionally, in the second implementation manner of the second aspect of the present invention, the screening module is specifically configured to: based on the target field, perform a field similarity measurement on the at least two query conditions by using the condition screening algorithm. Calculate to obtain the similarity corresponding to each of the query conditions; sort through the similarity corresponding to each of the query conditions to obtain a corresponding ranking list, and determine the top M query conditions according to the ranking list and As the screening result, wherein, M is a positive integer greater than or equal to 5; components are generated through the screening results, and corresponding conditional display components are obtained.

可选的,在本发明第二方面的第三种实现方式中,所述渲染模块具体用于:从预先封装的多个预设组件模板中确定出与所述条件展示组件对应的目标组件模板;获取所述条件展示组件的属性信息,并将所述属性信息输入到所述目标组件模板进行渲染,获得所述条件展示组件的渲染结果;将所述渲染结果显示在所述页面中,得到对应的查询条件展示页面并展示所述查询条件展示页面。Optionally, in a third implementation manner of the second aspect of the present invention, the rendering module is specifically configured to: determine a target component template corresponding to the conditional display component from a plurality of pre-packaged preset component templates. ; Obtain the attribute information of the conditional display component, and input the attribute information into the target component template for rendering, and obtain the rendering result of the conditional display component; Display the rendering result in the page to obtain The corresponding query condition display page is displayed and the query condition display page is displayed.

可选的,在本发明第二方面的第四种实现方式中,所述查询条件的页面展示装置还包括:接收模块,用于接收终端发送的查询请求并对所述查询请求进行解析,得到对应的目标字段类型信息;匹配模块,用于对所述目标字段类型信息进行查询条件匹配,得到对应的目标查询条件;确定模块,用于根据所述目标查询条件,确定与所述目标查询条件对应的数据查询类型;获取模块,用于通过所述数据查询类型对应的解析规则,对所述目标查询条件进行解析,获取所述目标查询条件对应的查询语句;执行模块,用于执行所述查询语句,获得所述目标查询条件对应的数据查询结果。Optionally, in a fourth implementation manner of the second aspect of the present invention, the device for displaying the query condition page further includes: a receiving module, configured to receive a query request sent by the terminal and parse the query request to obtain Corresponding target field type information; a matching module, for performing query condition matching on the target field type information to obtain a corresponding target query condition; a determining module for determining the target query condition according to the target query condition a corresponding data query type; an acquisition module, configured to parse the target query condition through a parsing rule corresponding to the data query type, and obtain a query statement corresponding to the target query condition; an execution module, used to execute the query statement to obtain the data query result corresponding to the target query condition.

可选的,在本发明第二方面的第五种实现方式中,所述获取模块具体包括:扫描单元,用于若所述数据查询类型为合取查询,则对所述目标查询条件进行扫描,确定对应的多个候选查询项,并根据每一所述候选查询项对应的目标字段表达式,获取所述目标查询条件对应的查询语句;解析单元,用于若所述数据查询类型为复杂查询,则通过预置模板引擎对所述目标查询条件进行解析,生成与所述目标查询条件对应的查询语句。Optionally, in a fifth implementation manner of the second aspect of the present invention, the acquisition module specifically includes: a scanning unit, configured to scan the target query condition if the data query type is a conjunctive query. , determine a plurality of corresponding candidate query items, and obtain the query statement corresponding to the target query condition according to the target field expression corresponding to each candidate query item; the parsing unit is used for if the data query type is complex query, the target query condition is parsed by a preset template engine, and a query statement corresponding to the target query condition is generated.

可选的,在本发明第二方面的第六种实现方式中,所述扫描单元单元具体用于:对每一所述候选查询项对应的目标字段表达式进行解析,获得所述每一候选查询项包含的字段和运算符;基于运算符与预置查询语法的对应关系,确定所述每一候选查询项对应的字段值,并根据所述每一候选查询项对应的字段、运算符及字段值进行查询语句生成,得到所述每一候选查询项对应的查询语句;将所述每一候选查询项对应的查询语句进行组合,获取所述目标查询条件对应的查询语句。Optionally, in a sixth implementation manner of the second aspect of the present invention, the scanning unit is specifically configured to: parse the target field expression corresponding to each candidate query item to obtain each candidate query item. Fields and operators included in the query item; based on the corresponding relationship between the operator and the preset query grammar, determine the field value corresponding to each candidate query item, and determine the field value corresponding to each candidate query item, according to the corresponding field, operator and A query statement is generated for the field value to obtain a query statement corresponding to each candidate query item; the query statement corresponding to each candidate query item is combined to obtain a query statement corresponding to the target query condition.

本发明第三方面提供了一种计算机设备,包括:存储器和至少一个处理器,所述存储器中存储有指令;所述至少一个处理器调用所述存储器中的所述指令,以使得所述计算机设备执行上述的查询条件的页面展示方法。A third aspect of the present invention provides a computer device, comprising: a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor invokes the instructions in the memory, so that the computer The device executes the above-mentioned page display method of the query condition.

本发明的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述的查询条件的页面展示方法。A fourth aspect of the present invention provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium runs on a computer, the computer executes the above-mentioned page display method for query conditions.

本发明提供的技术方案中,对预置查询页面进行解析,得到对应的字段标识并通过所述字段标识从预置数据库中获取至少两个字段类型信息;根据所述至少两个字段类型信息进行条件生成,得到至少两个查询条件,其中,所述查询条件包括多个查询项,每一查询项与每一预设字段表达式一一对应;接收终端发送的查询条件展示请求并对所述查询条件展示请求进行响应,确定对应的条件筛选算法及目标字段;根据所述目标字段及所述条件筛选算法对所述至少两个查询条件进行筛选,得到对应的筛选结果,并根据所述筛选结果生成对应的条件展示组件;对所述条件展示组件进行渲染,得到对应的查询条件展示页面并展示所述查询条件展示页面。In the technical solution provided by the present invention, a preset query page is parsed to obtain a corresponding field identifier, and at least two field type information is obtained from a preset database through the field identifier; Condition generation, at least two query conditions are obtained, wherein the query conditions include multiple query items, and each query item corresponds to each preset field expression one-to-one; the query condition display request sent by the terminal is received and the query condition is The query condition display request is responded to, and the corresponding condition screening algorithm and target field are determined; the at least two query conditions are screened according to the target field and the condition screening algorithm, and corresponding screening results are obtained, and according to the screening As a result, a corresponding condition display component is generated; the condition display component is rendered to obtain a corresponding query condition display page and display the query condition display page.

本发明实施例中,筛选方式可以为通过对查询条件进行选定的方式,也即勾选需求的查询条件,筛选掉未被选定的查询条件,也可以为通过条件筛选算法对查询条件进行排除选定的形式,将选定的查询条件作为排除项,筛选出未选定的查询条件,服务器采用通过条件筛选算法对查询条件进行筛选的方式,可以方便用户配置查询条件,有效减少查询次数。而且根据筛选结果生成条件展示组件,以便于后续在页面中对条件展示组件进行渲染,展示在搜索界面中供用户查询使用,后续用户在查询时,只需要在条件展示组件中选择需求的查询条件就可以自动完成相应的查询工作,能够根据自身需求对搜索区域的查询条件进行自定义,减少不必要查询条件在搜索区域的干扰,大大提升搜索效率。In the embodiment of the present invention, the filtering method may be a method of selecting query conditions, that is, checking the required query conditions, and filtering out unselected query conditions, or selecting query conditions through a condition screening algorithm. Exclude the selected form, take the selected query condition as an exclusion item, and filter out the unselected query conditions. The server uses the condition filtering algorithm to filter the query conditions, which can facilitate the user to configure the query conditions and effectively reduce the number of queries. . In addition, the conditional display component is generated according to the screening results, so that the conditional display component can be rendered on the page and displayed in the search interface for users to query. When the user makes a query, they only need to select the required query conditions in the conditional display component. The corresponding query work can be automatically completed, the query conditions of the search area can be customized according to your own needs, the interference of unnecessary query conditions in the search area can be reduced, and the search efficiency can be greatly improved.

附图说明Description of drawings

图1为本发明实施例中查询条件的页面展示方法的一个实施例示意图;FIG. 1 is a schematic diagram of an embodiment of a page display method for query conditions in an embodiment of the present invention;

图2为本发明实施例中查询条件的页面展示方法的另一个实施例示意图;FIG. 2 is a schematic diagram of another embodiment of a page display method for query conditions in an embodiment of the present invention;

图3为本发明实施例中查询条件的页面展示装置的一个实施例示意图;3 is a schematic diagram of an embodiment of a page display device for query conditions in an embodiment of the present invention;

图4为本发明实施例中查询条件的页面展示装置的另一个实施例示意图;4 is a schematic diagram of another embodiment of a page display device for query conditions in an embodiment of the present invention;

图5为本发明实施例中计算机设备的一个实施例示意图。FIG. 5 is a schematic diagram of an embodiment of a computer device in an embodiment of the present invention.

具体实施方式Detailed ways

本发明实施例提供了一种查询条件的页面展示方法、装置、设备及存储介质,用于提高转账信息识别的效率。Embodiments of the present invention provide a page display method, device, device and storage medium for query conditions, which are used to improve the efficiency of identification of transfer information.

本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”或“具有”及其任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if present) in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed steps or units, but may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.

本申请实施例可以基于人工智能技术对相关的数据进行获取和处理。其中,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、机器人技术、生物识别技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。The embodiments of the present application may acquire and process related data based on artificial intelligence technology. Among them, artificial intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. . The basic technologies of artificial intelligence generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.

为便于理解,下面对本发明实施例的具体流程进行描述,请参阅图1,本发明实施例中查询条件的页面展示方法的一个实施例包括:For ease of understanding, the following describes the specific process of the embodiment of the present invention, referring to FIG. 1 , an embodiment of the method for displaying a query condition page in the embodiment of the present invention includes:

101、对预置查询页面进行解析,得到对应的字段标识并通过字段标识从预置数据库中获取至少两个字段类型信息;101. Parse a preset query page to obtain a corresponding field identifier, and obtain at least two field type information from a preset database through the field identifier;

可以理解的是,本发明的执行主体可以为查询条件的页面展示装置,还可以是服务器,具体此处不做限定。本发明实施例以服务器为执行主体为例进行说明。It can be understood that the execution body of the present invention may be a page display device for query conditions, or may be a server, which is not specifically limited here. The embodiments of the present invention are described by taking a server as an execution subject as an example.

需要说明的是,字段类型信息可以是本身预设在数据库中的,也可以是从本地存储器或者云服务器的中加载至数据库中得到的。字段类型信息在数据库中存储的方式可以为按照每一字段类型信息及其包含的各类字段数据的方式存储于数据库中,每一字段类型信息均包括与其相应的属性信息,比如,字段类型信息可以包括物流方式、状态、物流动态创建日期以及物流初始信息等信息。其中,创建日期包含的字段数据为以天为单位的具体创建日期。比如,2018-5-24、2009-4-13等,具体的,服务器对预置查询页面进行解析,确定与预置查询页面对应的字段标识,并根据字段标识从预置的数据库中获取至少两个字段类型信息。需要强调的是,为进一步保证上述集群标识信息的私密和安全性,上述字段类型信息还可以存储于一区块链的节点中。It should be noted that the field type information may be preset in the database itself, or may be loaded into the database from a local storage or a cloud server. The way the field type information is stored in the database can be stored in the database in the form of each field type information and the various types of field data it contains, and each field type information includes its corresponding attribute information, for example, the field type information It can include information such as logistics mode, status, logistics dynamic creation date, and logistics initial information. The field data included in the creation date is the specific creation date in days. For example, 2018-5-24, 2009-4-13, etc. Specifically, the server parses the preset query page, determines the field identifier corresponding to the preset query page, and obtains at least Two field type information. It should be emphasized that, in order to further ensure the privacy and security of the above-mentioned cluster identification information, the above-mentioned field type information can also be stored in a node of a blockchain.

102、根据至少两个字段类型信息进行条件生成,得到至少两个查询条件,其中,查询条件包括多个查询项,每一查询项与每一预设字段表达式一一对应;102. Perform condition generation according to at least two field type information to obtain at least two query conditions, wherein the query conditions include multiple query items, and each query item corresponds to each preset field expression one-to-one;

具体的,服务器根据该至少两个字段类型信息对应的属性信息进行关键词匹配,确定出每一字段类型信息对应的多个关键字信息,并将该多个关键字信息作为对应的查询项,进而根据该多个查询项进行查询条件生成,确定出相应的至少两个查询条件。Specifically, the server performs keyword matching according to the attribute information corresponding to the at least two field type information, determines a plurality of keyword information corresponding to each field type information, and uses the plurality of keyword information as corresponding query items, Then, query conditions are generated according to the plurality of query items, and at least two corresponding query conditions are determined.

103、接收终端发送的查询条件展示请求并对查询条件展示请求进行响应,确定对应的条件筛选算法及目标字段;103. Receive the query condition display request sent by the terminal and respond to the query condition display request, and determine the corresponding condition screening algorithm and target field;

需要说明的是,查询条件展示请求携带有对应的关键字信息,该关键字信息主要用于指示相应的筛选基准信息,服务器通过该筛选基准信息确定相应的条件筛选算法及与该关键字信息对应的目标字段,具体的服务器接收终端发送的查询条件展示请求并对查询条件展示请求进行响应,确定对应的条件筛选算法及目标字段。It should be noted that the query condition display request carries the corresponding keyword information, and the keyword information is mainly used to indicate the corresponding screening benchmark information, and the server determines the corresponding condition screening algorithm and the corresponding keyword information through the screening benchmark information. The specific server receives the query condition display request sent by the terminal and responds to the query condition display request, and determines the corresponding condition screening algorithm and target field.

104、根据目标字段及条件筛选算法对至少两个查询条件进行筛选,得到对应的筛选结果,并根据筛选结果生成对应的条件展示组件;104. Screen at least two query conditions according to the target field and the condition screening algorithm to obtain corresponding screening results, and generate corresponding condition display components according to the screening results;

需要说明的是,筛选方式可以为通过对查询条件进行选定的方式,也即勾选需求的查询条件,筛选掉未被选定的查询条件,也可以为通过条件筛选算法对查询条件进行排除选定的形式,将选定的查询条件作为排除项,筛选出未选定的查询条件,本发明实施例中主要采用通过条件筛选算法对查询条件进行筛选的方式,可以方便用户配置查询条件,有效减少查询次数。而且根据筛选结果生成条件展示组件,以便于后续在页面中对条件展示组件进行渲染,展示在搜索界面中供用户查询使用。It should be noted that the filtering method can be by selecting the query conditions, that is, by checking the required query conditions and filtering out the unselected query conditions, or by excluding the query conditions through the condition filtering algorithm. In the selected form, the selected query conditions are used as exclusion items, and unselected query conditions are filtered out. In the embodiment of the present invention, the method of filtering the query conditions through the condition screening algorithm is mainly adopted, which can facilitate the user to configure the query conditions. Effectively reduce the number of queries. Moreover, the conditional display component is generated according to the screening result, so that the conditional display component can be subsequently rendered on the page and displayed in the search interface for user query.

105、对条件展示组件进行渲染,得到对应的查询条件展示页面并展示所述查询条件展示页面。105. Render the condition display component to obtain a corresponding query condition display page and display the query condition display page.

需要说明的是,页面是有预设设置的组件构建生成,预先设定用于构建显示页面的预设组件,预设组件用于实现显示页面的各项功能,如实现参数请求的请求参数类组件、实现按钮功能的按钮组件、实现输入框功能的输入框组件、实现数据展示功能的数据组件等。同时针对不同的预设组件设定多种不同的属性,如按钮组件的属性至少包括按钮形状、尺寸、大小等,输入框组件的属性至少包括输入数据的范围、文本框还是下拉框等,数据组件的属性至少包括折线图、柱形图等展示形状,展示时间范围等。通过从预设组件中选择所需求的组件,并配置所选择组件的属性来形成页面进行渲染,得到最终的页面进行显示。具体的,服务器通过从预设组件模板中选择对应的目标组件模板,并配置该目标组件模板的属性来完成页面的渲染,得到最终的页面进行显示,后续用户在查询时,只需要在条件展示组件中选择需求的查询条件就可以自动完成相应的查询工作,能够根据自身需求对搜索区域的查询条件进行自定义,减少不必要查询条件在搜索区域的干扰,大大提升搜索效率。It should be noted that the page is built and generated by components with preset settings. The preset components used to build the display page are preset, and the preset components are used to implement various functions of the display page, such as the request parameter class for implementing parameter requests. Components, button components that implement button functions, input box components that implement input box functions, data components that implement data display functions, etc. At the same time, set a variety of different properties for different preset components. For example, the properties of the button component include at least the button shape, size, size, etc., and the properties of the input box component include at least the range of input data, text box or drop-down box, etc. The properties of the component include at least display shapes such as line charts and column charts, and display time ranges. By selecting the required components from the preset components, and configuring the properties of the selected components, a page is formed for rendering, and the final page is obtained for display. Specifically, the server selects the corresponding target component template from the preset component templates, and configures the properties of the target component template to complete the page rendering, and obtains the final page for display. When subsequent users query, they only need to display the conditional Selecting the required query conditions in the component can automatically complete the corresponding query work, and can customize the query conditions of the search area according to your own needs, reduce the interference of unnecessary query conditions in the search area, and greatly improve the search efficiency.

本发明实施例中,服务器采用通过条件筛选算法对查询条件进行筛选的方式,可以方便用户配置查询条件,有效减少查询次数,而且根据筛选结果生成条件展示组件,以便于后续在页面中对条件展示组件进行渲染,展示在搜索界面中供用户查询使用,后续用户在查询时,只需要在条件展示组件中选择需求的查询条件就可以自动完成相应的查询工作,能够根据自身需求对搜索区域的查询条件进行自定义,减少不必要查询条件在搜索区域的干扰,提升搜索效率。In the embodiment of the present invention, the server adopts the method of screening the query conditions through the conditional screening algorithm, which can facilitate the user to configure the query conditions, effectively reduce the number of queries, and generate a condition display component according to the screening result, so as to facilitate the subsequent display of the conditions on the page. The component is rendered and displayed in the search interface for users to query. When subsequent users query, they only need to select the required query conditions in the condition display component to automatically complete the corresponding query work, and can query the search area according to their own needs. The conditions can be customized to reduce the interference of unnecessary query conditions in the search area and improve the search efficiency.

请参阅图2,本发明实施例中查询条件的页面展示方法的另一个实施例包括:Referring to FIG. 2 , another embodiment of the page display method for query conditions in the embodiment of the present invention includes:

201、对预置查询页面进行解析,得到对应的字段标识并通过字段标识从预置数据库中获取至少两个字段类型信息;201. Parse a preset query page to obtain a corresponding field identifier, and obtain at least two field type information from a preset database through the field identifier;

具体的,在本实施例中,步骤201的具体实施方式与上述步骤101类似,此处不再赘述。Specifically, in this embodiment, the specific implementation ofstep 201 is similar to the above-mentionedstep 101, and details are not repeated here.

202、根据至少两个字段类型信息进行条件生成,得到至少两个查询条件,其中,查询条件包括多个查询项,每一查询项与每一预设字段表达式一一对应;202. Perform condition generation according to at least two field type information to obtain at least two query conditions, wherein the query conditions include multiple query items, and each query item corresponds to each preset field expression one-to-one;

具体的,服务器获取每一字段类型信息对应的属性信息,通过预置反射机制对每一字段类型信息对应的属性信息进行查询项匹配,得到对应的多个查询项;服务器通过对应的多个查询项进行查询条件生成,得到至少两个查询条件。Specifically, the server obtains attribute information corresponding to each field type information, and performs query item matching on the attribute information corresponding to each field type information through a preset reflection mechanism to obtain multiple corresponding query items; Items are used to generate query conditions, and at least two query conditions are obtained.

其中,服务器获取数据库中的每个字段类型信息的属性信息,通过反预置射机制每一字段类型信息对应的属性信息进行查询项匹配,并加载调取得到查询项信息以生成查询条件,具体的,服务器读取属性信息就能根据属性信息调取相关的对象,在后续用户进行初始查询时,可以获取全部可选的自定义条件,从而实现合理规划,提高查询效率。Among them, the server obtains the attribute information of each field type information in the database, matches the query items through the attribute information corresponding to each field type information through the reverse preset injection mechanism, and loads and retrieves the obtained query item information to generate query conditions. If the server reads the attribute information, it can retrieve the related objects according to the attribute information, and when the subsequent user performs an initial query, it can obtain all the optional custom conditions, so as to realize reasonable planning and improve the query efficiency.

203、接收终端发送的查询条件展示请求并对查询条件展示请求进行响应,确定对应的条件筛选算法及目标字段;203. Receive the query condition display request sent by the terminal and respond to the query condition display request, and determine the corresponding condition screening algorithm and target field;

具体的,在本实施例中,步骤203的具体实施方式与上述步骤103类似,此处不再赘述。Specifically, in this embodiment, the specific implementation ofstep 203 is similar to the above-mentionedstep 103, and details are not repeated here.

204、根据目标字段及条件筛选算法对至少两个查询条件进行筛选,得到对应的筛选结果,并根据筛选结果生成对应的条件展示组件;204. Screen at least two query conditions according to the target field and the condition screening algorithm to obtain corresponding screening results, and generate corresponding condition display components according to the screening results;

具体的,服务器基于目标字段,通过条件筛选算法对至少两个查询条件进行字段相似度计算,得到每一查询条件对应的相似度;服务器通过每一查询条件对应的相似度进行排序,得到对应的排序列表,并根据排序列表确定排在前列的M个查询条件并作为筛选结果,其中,M为大于或等于5的正整数;服务器通过筛选结果进行组件生成,得到对应的条件展示组件。Specifically, based on the target field, the server performs field similarity calculation on at least two query conditions through a conditional screening algorithm, and obtains the similarity corresponding to each query condition; the server sorts the similarity corresponding to each query condition to obtain the corresponding Sort the list, and determine the top M query conditions according to the sorted list and use them as the filtering results, where M is a positive integer greater than or equal to 5; the server generates components through the filtering results, and obtains the corresponding condition display components.

其中,服务器基于条件筛选算法,采用余弦相似度公式计算该至少两个查询条件中与目标字段的相似度,服务器获取至少两个查询条件,除去至少两个查询条件中非文字类数据得到训练语料,在得到训练语料中的每个词的词向量后,去掉至少两个查询条件中停用词以及词频小于预设阈值的词对应的词向量,余下的词对应的词向量组合形成词向量集合S,预设阈值位于5~10之间,进而得到每一查询条件的相似度,后续服务器根据相似度的数值进行排序,得到对应的排序列表,并根据排序列表确定排在前列的M个查询条件并作为筛选结果,其中,M为大于或等于5的正整数,将M的最低值设为5是基于展示页面的布局情况及用户在选择查询条件时关注区域面积两种因素进行综合分析得到的数值,可以避免用户在查询条件时因条件数量过少,关联度不高而导致用户在查询条件选取效率较低的情况,进而服务器根据筛选结果的样式标识,确定对应的组件类型,通过该筛选结果进行组件生成,得到对应的条件展示组件。Wherein, the server uses the cosine similarity formula to calculate the similarity between the at least two query conditions and the target field based on the conditional screening algorithm, the server obtains the at least two query conditions, and removes the non-text data in the at least two query conditions to obtain the training corpus , after obtaining the word vector of each word in the training corpus, remove the stop words in at least two query conditions and the word vector corresponding to the word whose word frequency is less than the preset threshold, and combine the word vectors corresponding to the remaining words to form a word vector set S, the preset threshold is between 5 and 10, and then the similarity of each query condition is obtained. The subsequent server sorts according to the value of the similarity to obtain the corresponding sorting list, and determines the top M queries according to the sorting list. condition and as the screening result, where M is a positive integer greater than or equal to 5, and setting the minimum value of M to 5 is based on the layout of the display page and the user's attention area when selecting query conditions. The value of , can avoid the situation that the user is inefficient in selecting query conditions due to too few conditions and low correlation when querying conditions, and then the server determines the corresponding component type according to the style identifier of the filtering result. Component generation is performed on the screening results, and the corresponding conditional display components are obtained.

205、从预先封装的多个预设组件模板中确定出与条件展示组件对应的目标组件模板;205. Determine a target component template corresponding to the conditional display component from a plurality of pre-packaged preset component templates;

具体的,服务器针对种类型的组件预先设定封装好的预设组件模板,服务器后续对于形成页面中的多种类型组件,通过对应的预设组件模板进行渲染,得到最终的页面显示,本发明实施例中,服务器从预先封装的多个预设组件模板中确定出与条件展示组件对应的目标组件模板。Specifically, the server pre-sets the packaged preset component templates for various types of components, and the server subsequently renders the various types of components forming the page through the corresponding preset component templates to obtain the final page display. The present invention In an embodiment, the server determines a target component template corresponding to the conditional display component from a plurality of pre-packaged preset component templates.

206、获取条件展示组件的属性信息,并将属性信息输入到目标组件模板进行渲染,获得条件展示组件的渲染结果;206. Obtain attribute information of the conditional display component, input the attribute information into the target component template for rendering, and obtain the rendering result of the conditional display component;

具体的,服务器通过属性配置指令对条件展示组件所配置的属性信息存储在条件展示组件的数据结构中的属性数据内,因而从条件展示组件的属性数据中获取出条件展示组件的属性信息,并且将项属性信息输入到与条件展示组件对应的目标组件模板,由目标组件模板依据其对应的渲染逻辑进行渲染,得到条件展示组件的渲染结果。Specifically, the attribute information configured by the server for the conditional display component through the attribute configuration instruction is stored in the attribute data in the data structure of the conditional display component, so the attribute information of the conditional display component is obtained from the attribute data of the conditional display component, and The item attribute information is input into the target component template corresponding to the conditional display component, and the target component template performs rendering according to its corresponding rendering logic to obtain the rendering result of the conditional display component.

207、将渲染结果显示在页面中,得到对应的查询条件展示页面并展示所述查询条件展示页面。207. Display the rendering result on the page, obtain a corresponding query condition display page, and display the query condition display page.

具体的,服务器在条件展示组件的属性信息均经渲染,得到条件展示组件的渲染结果后,则依据条件展示组件在页面中的显示位置,将渲染结果显示在页面中,以此完成页面的渲染。Specifically, after the server renders the attribute information of the conditional display component and obtains the rendering result of the conditional display component, the server displays the rendering result on the page according to the display position of the conditional display component on the page, so as to complete the rendering of the page. .

可选的,在步骤207之后,可以包括:Optionally, afterstep 207, it may include:

服务器接收终端发送的查询请求并对查询请求进行解析,得到对应的目标字段类型信息;服务器对目标字段类型信息进行查询条件匹配,得到对应的目标查询条件;服务器根据目标查询条件,确定与目标查询条件对应的数据查询类型;服务器通过数据查询类型对应的解析规则,对目标查询条件进行解析,获取目标查询条件对应的查询语句;服务器执行查询语句,获得目标查询条件对应的数据查询结果。The server receives the query request sent by the terminal and parses the query request to obtain the corresponding target field type information; the server matches the query condition of the target field type information to obtain the corresponding target query condition; the server determines the target query condition according to the target query condition The data query type corresponding to the condition; the server parses the target query condition through the parsing rules corresponding to the data query type, and obtains the query statement corresponding to the target query condition; the server executes the query statement to obtain the data query result corresponding to the target query condition.

其中,服务器接收到查询请求后,可以获取到该查询请求对应的查询条件对应的目标字段类型信息,查询条件包括多个查询项,多个查询项之间通过查询项连接词连接。通过查询请求,除了可以获取查询条件之外,还可以获取查询请求对应的识别方法,其中,识别方法可以用于识别出查询条件对应的数据查询类型,其中,数据查询类型可以包括合取查询和复杂查询,实际场景中,多数查询为合取查询,只有少量查询为复杂查询,具体的服务器通过数据查询类型对应的解析规则,对目标查询条件进行解析,获取目标查询条件对应的查询语句,服务器执行查询语句,获得目标查询条件对应的数据查询结果。After receiving the query request, the server can obtain target field type information corresponding to the query condition corresponding to the query request. The query condition includes multiple query items, and the multiple query items are connected by query item connectors. Through the query request, in addition to the query conditions, the identification method corresponding to the query request can also be obtained, wherein the identification method can be used to identify the data query type corresponding to the query condition, wherein the data query type can include conjunctive query and Complex queries. In actual scenarios, most queries are conjunctive queries, and only a small number of queries are complex queries. The specific server parses the target query conditions through the parsing rules corresponding to the data query type, and obtains the query statement corresponding to the target query condition. Execute the query statement to obtain the data query result corresponding to the target query condition.

可选的,数据查询类型对应的解析规则,对目标查询条件进行解析,获取目标查询条件对应的查询语句可以包括:若数据查询类型为合取查询,服务器则对目标查询条件进行扫描,确定对应的多个候选查询项,并根据每一候选查询项对应的目标字段表达式,获取目标查询条件对应的查询语句;若数据查询类型为复杂查询,服务器则通过预置模板引擎对目标查询条件进行解析,生成与目标查询条件对应的查询语句。Optionally, the parsing rule corresponding to the data query type, parses the target query condition, and obtains the query statement corresponding to the target query condition may include: if the data query type is a conjunctive query, the server scans the target query condition to determine the corresponding query condition. multiple candidate query items, and obtain the query statement corresponding to the target query condition according to the target field expression corresponding to each candidate query item; if the data query type is a complex query, the server will use the preset template engine to perform a query on the target query condition. Parse, and generate a query statement corresponding to the target query condition.

其中,若数据查询类型为合取查询,服务器获取与每一候选查询项对应的目标字段表达式,进而通过该目标字段表达式在与其对应的候选查询项的字段中使用注解,获取与目标查询条件对应的查询语句,若数据查询类型为复杂查询,服务器可以通过使用模板引擎动态构建查询语句,从而可以降低查询语句生成的复杂度。Wherein, if the data query type is a conjunctive query, the server obtains the target field expression corresponding to each candidate query item, and then uses the target field expression to use annotations in the field of the corresponding candidate query item to obtain the target query item corresponding to the target field expression. For the query statement corresponding to the condition, if the data query type is a complex query, the server can dynamically construct the query statement by using a template engine, thereby reducing the complexity of query statement generation.

可选的,对目标查询条件进行扫描,确定对应的多个候选查询项,并根据每一候选查询项对应的目标字段表达式,获取目标查询条件对应的查询语句可以包括:服务器对每一候选查询项对应的目标字段表达式进行解析,获得每一候选查询项包含的字段和运算符;服务器基于运算符与预置查询语法的对应关系,确定每一候选查询项对应的字段值,并根据每一候选查询项对应的字段、运算符及字段值进行查询语句生成,得到每一候选查询项对应的查询语句;服务器将每一候选查询项对应的查询语句进行组合,获取目标查询条件对应的查询语句。Optionally, scanning the target query conditions to determine a plurality of corresponding candidate query items, and obtaining the query statement corresponding to the target query conditions according to the target field expression corresponding to each candidate query item may include: The target field expression corresponding to the query item is parsed to obtain the fields and operators contained in each candidate query item; the server determines the field value corresponding to each candidate query item based on the correspondence between the operator and the preset query syntax, and determines the field value corresponding to each candidate query item according to the The field, operator and field value corresponding to each candidate query item are generated by query statement, and the query statement corresponding to each candidate query item is obtained; the server combines the query statements corresponding to each candidate query item to obtain the corresponding query statement of the target query condition. Check for phrases.

其中,服务器对针对多个查询项中的每一候选查询项,对每一候选查询项对应的字段表达式进行解析,得到每一候选查询项包含的字段和运算符,因此可以对每一候选查询项对应的字段表达式进行解析,得到每一候选查询项包含的字段和运算符,然后就可以得到每一候选查询项包含的字段及运算符,根据每一候选查询项包含的字段、运算符和字段值,生成每一候选查询项对应的查询语句。在得到每一候选查询项包含的字段、运算符和字段值,就可以按照运算符与查询语法的对应关系,生成每一候选查询项对应的查询语句。The server parses the field expression corresponding to each candidate query item for each candidate query item in the multiple query items, and obtains the fields and operators contained in each candidate query item, so that each candidate query item can be analyzed for each candidate query item. The field expression corresponding to the query item is parsed to obtain the fields and operators contained in each candidate query item, and then the fields and operators contained in each candidate query item can be obtained. character and field value to generate a query statement corresponding to each candidate query item. After obtaining the fields, operators and field values contained in each candidate query item, a query statement corresponding to each candidate query item can be generated according to the corresponding relationship between the operator and the query syntax.

本发明实施例中,服务器基于条件筛选算法,采用余弦相似度公式计算该至少两个查询条件中与目标字段的相似度,进而得到每一查询条件的相似度,后续服务器根据相似度的数值进行排序,得到对应的排序列表,并根据排序列表确定排在前列的至少5个查询条件并作为筛选结果,选择至少5个查询条件为5是基于展示页面的布局情况及用户在选择查询条件时关注区域面积两种因素进行综合分析得到的数值,可以避免用户在查询条件时因条件数量过少,关联度不高而导致用户在查询条件选取效率较低的情况,在查询语句的生成过程中,服务器可以通过使用模板引擎动态构建查询语句,从而可以降低查询语句生成的复杂度,进一步提升在数据查询时的效率。In the embodiment of the present invention, the server uses the cosine similarity formula to calculate the similarity between the at least two query conditions and the target field based on the condition screening algorithm, and then obtains the similarity of each query condition. Sort, get the corresponding sorting list, and determine at least 5 query conditions in the top row according to the sorting list and use it as the filter result, select at least 5 query conditions as 5 is based on the layout of the display page and the user's attention when selecting query conditions The value obtained from the comprehensive analysis of the two factors of the area and area can avoid the situation that the user is inefficient in selecting the query condition due to too few conditions and low correlation when querying the conditions. In the process of generating the query statement, The server can dynamically construct query statements by using a template engine, thereby reducing the complexity of query statement generation and further improving the efficiency of data query.

请参阅图3,本发明实施例中查询条件的页面展示装置的一个实施例包括:Referring to FIG. 3, an embodiment of a page display device for query conditions in an embodiment of the present invention includes:

解析模块3001,用于对预置查询页面进行解析,得到对应的字段标识并通过所述字段标识从预置数据库中获取至少两个字段类型信息;Aparsing module 3001, configured to parse a preset query page, obtain a corresponding field identifier, and obtain at least two field type information from a preset database through the field identifier;

生成模块3002,用于根据所述至少两个字段类型信息进行条件生成,得到至少两个查询条件,其中,所述查询条件包括多个查询项,每一查询项与每一预设字段表达式一一对应;Thegenerating module 3002 is configured to generate conditions according to the at least two field type information to obtain at least two query conditions, wherein the query conditions include multiple query items, each query item and each preset field expression one-to-one correspondence;

响应模块3003,用于接收终端发送的查询条件展示请求并对所述查询条件展示请求进行响应,确定对应的条件筛选算法及目标字段;Theresponse module 3003 is configured to receive the query condition display request sent by the terminal and respond to the query condition display request, and determine the corresponding condition screening algorithm and target field;

筛选模块3004,用于根据所述目标字段及所述条件筛选算法对所述至少两个查询条件进行筛选,得到对应的筛选结果,并根据所述筛选结果生成对应的条件展示组件;Thescreening module 3004 is configured to screen the at least two query conditions according to the target field and the condition screening algorithm, obtain corresponding screening results, and generate corresponding condition display components according to the screening results;

渲染模块3005,用于对所述条件展示组件进行渲染,得到对应的查询条件展示页面并展示所述查询条件展示页面。Therendering module 3005 is configured to render the condition display component, obtain a corresponding query condition display page, and display the query condition display page.

请参阅图4,本发明实施例中查询条件的页面展示装置的另一个实施例包括:Referring to FIG. 4 , another embodiment of the page display apparatus for query conditions in the embodiment of the present invention includes:

解析模块3001,用于对预置查询页面进行解析,得到对应的字段标识并通过所述字段标识从预置数据库中获取至少两个字段类型信息;Aparsing module 3001, configured to parse a preset query page, obtain a corresponding field identifier, and obtain at least two field type information from a preset database through the field identifier;

生成模块3002,用于根据所述至少两个字段类型信息进行条件生成,得到至少两个查询条件,其中,所述查询条件包括多个查询项,每一查询项与每一预设字段表达式一一对应;Thegenerating module 3002 is configured to generate conditions according to the at least two field type information to obtain at least two query conditions, wherein the query conditions include multiple query items, each query item and each preset field expression one-to-one correspondence;

响应模块3003,用于接收终端发送的查询条件展示请求并对所述查询条件展示请求进行响应,确定对应的条件筛选算法及目标字段;Theresponse module 3003 is configured to receive the query condition display request sent by the terminal and respond to the query condition display request, and determine the corresponding condition screening algorithm and target field;

筛选模块3004,用于根据所述目标字段及所述条件筛选算法对所述至少两个查询条件进行筛选,得到对应的筛选结果,并根据所述筛选结果生成对应的条件展示组件;Thescreening module 3004 is configured to screen the at least two query conditions according to the target field and the condition screening algorithm, obtain corresponding screening results, and generate corresponding condition display components according to the screening results;

渲染模块3005,用于对所述条件展示组件进行渲染,得到对应的查询条件展示页面并展示所述查询条件展示页面。Therendering module 3005 is configured to render the condition display component, obtain a corresponding query condition display page, and display the query condition display page.

可选的,所述生成模块3002具体用于:获取每一所述字段类型信息对应的属性信息,通过预置反射机制对所述每一所述字段类型信息对应的属性信息进行查询项匹配,得到对应的多个查询项;通过所述对应的多个查询项进行查询条件生成,得到至少两个查询条件。Optionally, thegenerating module 3002 is specifically configured to: obtain attribute information corresponding to each of the field type information, and perform query item matching on the attribute information corresponding to each of the field type information through a preset reflection mechanism, Obtain a plurality of corresponding query items; and generate query conditions by using the corresponding plurality of query items to obtain at least two query conditions.

可选的,所述筛选模块3004具体用于:基于所述目标字段,通过所述条件筛选算法对所述至少两个查询条件进行字段相似度计算,得到每一所述查询条件对应的相似度;通过每一所述查询条件对应的相似度进行排序,得到对应的排序列表,并根据所述排序列表确定排在前列的M个查询条件并作为所述筛选结果,其中,M为大于或等于5的正整数;通过所述筛选结果进行组件生成,得到对应的条件展示组件。Optionally, thescreening module 3004 is specifically configured to: based on the target field, perform field similarity calculation on the at least two query conditions through the condition screening algorithm, and obtain the similarity corresponding to each of the query conditions. ; Sort by the similarity corresponding to each said query condition, obtain the corresponding sorted list, and determine the M query conditions in the front row according to the said sorted list and use it as the said screening result, wherein, M is greater than or equal to A positive integer of 5; components are generated through the screening results, and corresponding conditional display components are obtained.

可选的,所述渲染模块3005具体用于:从预先封装的多个预设组件模板中确定出与所述条件展示组件对应的目标组件模板;获取所述条件展示组件的属性信息,并将所述属性信息输入到所述目标组件模板进行渲染,获得所述条件展示组件的渲染结果;将所述渲染结果显示在所述页面中,得到对应的查询条件展示页面并展示所述查询条件展示页面。Optionally, therendering module 3005 is specifically configured to: determine a target component template corresponding to the conditional display component from a plurality of pre-packaged preset component templates; The attribute information is input into the target component template for rendering, and the rendering result of the condition display component is obtained; the rendering result is displayed on the page, the corresponding query condition display page is obtained, and the query condition display page is displayed. page.

可选的,所述查询条件的页面展示装置还包括:Optionally, the page display device for the query conditions further includes:

接收模块3006,用于接收终端发送的查询请求并对所述查询请求进行解析,得到对应的目标字段类型信息;Thereceiving module 3006 is configured to receive the query request sent by the terminal and parse the query request to obtain corresponding target field type information;

匹配模块3007,用于对所述目标字段类型信息进行查询条件匹配,得到对应的目标查询条件;Thematching module 3007 is configured to perform query condition matching on the target field type information to obtain corresponding target query conditions;

确定模块3008,用于根据所述目标查询条件,确定与所述目标查询条件对应的数据查询类型;Adetermination module 3008, configured to determine a data query type corresponding to the target query condition according to the target query condition;

获取模块3009,用于通过所述数据查询类型对应的解析规则,对所述目标查询条件进行解析,获取所述目标查询条件对应的查询语句;an obtainingmodule 3009, configured to parse the target query condition through the parsing rule corresponding to the data query type, and obtain a query statement corresponding to the target query condition;

执行模块3010,用于执行所述查询语句,获得所述目标查询条件对应的数据查询结果。Theexecution module 3010 is configured to execute the query statement to obtain a data query result corresponding to the target query condition.

可选的,所述获取模块3009具体包括:Optionally, the obtainingmodule 3009 specifically includes:

扫描单元30091,用于若所述数据查询类型为合取查询,则对所述目标查询条件进行扫描,确定对应的多个候选查询项,并根据每一所述候选查询项对应的目标字段表达式,获取所述目标查询条件对应的查询语句;Scanning unit 30091, configured to scan the target query condition if the data query type is a conjunctive query, determine a plurality of corresponding candidate query items, and express according to the target field corresponding to each candidate query item formula to obtain the query statement corresponding to the target query condition;

解析单元30092,用于若所述数据查询类型为复杂查询,则通过预置模板引擎对所述目标查询条件进行解析,生成与所述目标查询条件对应的查询语句。Theparsing unit 30092 is configured to parse the target query condition through a preset template engine if the data query type is a complex query, and generate a query statement corresponding to the target query condition.

可选的,所述扫描单元30091具体用于:对每一所述候选查询项对应的目标字段表达式进行解析,获得所述每一候选查询项包含的字段和运算符;基于运算符与预置查询语法的对应关系,确定所述每一候选查询项对应的字段值,并根据所述每一候选查询项对应的字段、运算符及字段值进行查询语句生成,得到所述每一候选查询项对应的查询语句;将所述每一候选查询项对应的查询语句进行组合,获取所述目标查询条件对应的查询语句。Optionally, thescanning unit 30091 is specifically configured to: parse the target field expression corresponding to each candidate query item to obtain the fields and operators contained in each candidate query item; Set the corresponding relationship of the query syntax, determine the field value corresponding to each candidate query item, and generate a query statement according to the field, operator and field value corresponding to each candidate query item, and obtain each candidate query item The query statement corresponding to the item; the query statement corresponding to each candidate query item is combined to obtain the query statement corresponding to the target query condition.

图5是本发明实施例提供的一种计算机设备的结构示意图,该计算机设备500可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(centralprocessing units,CPU)510(例如,一个或一个以上处理器)和存储器520,一个或一个以上存储应用程序533或数据532的存储介质530(例如一个或一个以上海量存储设备)。其中,存储器520和存储介质530可以是短暂存储或持久存储。存储在存储介质530的程序可以包括一个或一个以上模块(图示没标出),每一模块可以包括对计算机设备500中的一系列指令操作。更进一步地,处理器510可以设置为与存储介质530通信,在计算机设备500上执行存储介质530中的一系列指令操作。5 is a schematic structural diagram of a computer device according to an embodiment of the present invention. Thecomputer device 500 may vary greatly due to different configurations or performance, and may include one or more processors (central processing units, CPU) 510 ( For example, one or more processors) andmemory 520, one or more storage media 530 (eg, one or more mass storage devices) storingapplications 533 ordata 532. Among them, thememory 520 and thestorage medium 530 may be short-term storage or persistent storage. The program stored in thestorage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instructions to operate on thecomputer device 500 . Furthermore, theprocessor 510 may be configured to communicate with thestorage medium 530 to execute a series of instruction operations in thestorage medium 530 on thecomputer device 500 .

计算机设备500还可以包括一个或一个以上电源540,一个或一个以上有线或无线网络接口550,一个或一个以上输入输出接口560,和/或,一个或一个以上操作系统531,例如Windows Serve,Mac OS,Uni,Linu,FreeBSD等等。本领域技术人员可以理解,图5示出的计算机设备结构并不构成对计算机设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Computer device 500 may also include one ormore power supplies 540, one or more wired or wireless network interfaces 550, one or more input andoutput interfaces 560, and/or, one ormore operating systems 531, such as Windows Server, Mac OS, Uni, Linu, FreeBSD and many more. Those skilled in the art can understand that the computer device structure shown in FIG. 5 does not constitute a limitation to the computer device, and may include more or less components than the one shown, or combine some components, or arrange different components.

本发明还提供一种计算机设备,所述计算机设备包括存储器和处理器,存储器中存储有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行上述各实施例中的所述查询条件的页面展示方法的步骤。The present invention also provides a computer device, the computer device includes a memory and a processor, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, causes the processor to execute the above-mentioned various embodiments. The steps of the page display method of the query condition.

本发明还提供一种计算机可读存储介质,该计算机可读存储介质可以为非易失性计算机可读存储介质,该计算机可读存储介质也可以为易失性计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得计算机执行所述查询条件的页面展示方法的步骤。The present invention also provides a computer-readable storage medium. The computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer-readable storage medium may also be a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to execute the steps of the method for displaying a page of the query condition.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk and other media that can store program codes.

本发明所指区块链是分布式数据存储,点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块,区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a series of data blocks that are associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its information. The validity (anti-counterfeiting) and the generation of the next block, the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.

Claims (10)

CN202111555569.0A2021-12-172021-12-17 Method, Apparatus, Equipment and Storage Medium for Displaying Query Conditions on a PagePendingCN114297535A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202111555569.0ACN114297535A (en)2021-12-172021-12-17 Method, Apparatus, Equipment and Storage Medium for Displaying Query Conditions on a Page

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202111555569.0ACN114297535A (en)2021-12-172021-12-17 Method, Apparatus, Equipment and Storage Medium for Displaying Query Conditions on a Page

Publications (1)

Publication NumberPublication Date
CN114297535Atrue CN114297535A (en)2022-04-08

Family

ID=80967982

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202111555569.0APendingCN114297535A (en)2021-12-172021-12-17 Method, Apparatus, Equipment and Storage Medium for Displaying Query Conditions on a Page

Country Status (1)

CountryLink
CN (1)CN114297535A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114722264A (en)*2022-04-112022-07-08曙光网络科技有限公司 A data query method, device, electronic device and storage medium
CN115203541A (en)*2022-07-012022-10-18浪潮云信息技术股份公司Method and system for realizing composite condition filtering component
CN115617878A (en)*2022-11-172023-01-17浪潮电子信息产业股份有限公司 A data query method, system, device, equipment and computer storage medium
CN115827670A (en)*2022-12-082023-03-21广东横琴数说故事信息科技有限公司DSL-based view processing method, system, device and storage medium
CN115858565A (en)*2022-11-152023-03-28中国联合网络通信集团有限公司Method, device and storage medium for field query
CN115935108A (en)*2022-12-292023-04-07中国联合网络通信集团有限公司Configuration method and device for ordering pages, electronic equipment and storage medium
CN116305255A (en)*2023-02-202023-06-23重庆蚂蚁消费金融有限公司Data query method, device, equipment and storage medium
CN117149849A (en)*2023-08-302023-12-01上海炎凰数据科技有限公司 Methods, devices and electronic devices for processing multiple query requests
CN117891847A (en)*2024-03-182024-04-16辽宁牧龙科技有限公司Data query device and method based on data center

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108446344A (en)*2018-03-062018-08-24政采云有限公司Custom condition querying method and system
CN111708537A (en)*2020-06-182020-09-25深圳前海微众银行股份有限公司 Component template-based page rendering method, device and readable storage medium
CN111930777A (en)*2020-10-092020-11-13武汉中科通达高新技术股份有限公司Query interface generation method and device, server and computer readable storage medium
CN112182022A (en)*2020-11-042021-01-05北京安博通科技股份有限公司Data query method and device based on natural language and translation model
CN113760969A (en)*2021-02-102021-12-07北京沃东天骏信息技术有限公司Data query method and device based on elastic search

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108446344A (en)*2018-03-062018-08-24政采云有限公司Custom condition querying method and system
CN111708537A (en)*2020-06-182020-09-25深圳前海微众银行股份有限公司 Component template-based page rendering method, device and readable storage medium
CN111930777A (en)*2020-10-092020-11-13武汉中科通达高新技术股份有限公司Query interface generation method and device, server and computer readable storage medium
CN112182022A (en)*2020-11-042021-01-05北京安博通科技股份有限公司Data query method and device based on natural language and translation model
CN113760969A (en)*2021-02-102021-12-07北京沃东天骏信息技术有限公司Data query method and device based on elastic search

Cited By (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114722264A (en)*2022-04-112022-07-08曙光网络科技有限公司 A data query method, device, electronic device and storage medium
CN114722264B (en)*2022-04-112025-02-28曙光网络科技有限公司 Data query method, device, electronic device and storage medium
CN115203541A (en)*2022-07-012022-10-18浪潮云信息技术股份公司Method and system for realizing composite condition filtering component
CN115858565A (en)*2022-11-152023-03-28中国联合网络通信集团有限公司Method, device and storage medium for field query
CN115617878A (en)*2022-11-172023-01-17浪潮电子信息产业股份有限公司 A data query method, system, device, equipment and computer storage medium
CN115617878B (en)*2022-11-172023-03-10浪潮电子信息产业股份有限公司 A data query method, system, device, equipment and computer storage medium
CN115827670A (en)*2022-12-082023-03-21广东横琴数说故事信息科技有限公司DSL-based view processing method, system, device and storage medium
CN115935108A (en)*2022-12-292023-04-07中国联合网络通信集团有限公司Configuration method and device for ordering pages, electronic equipment and storage medium
CN116305255A (en)*2023-02-202023-06-23重庆蚂蚁消费金融有限公司Data query method, device, equipment and storage medium
CN117149849A (en)*2023-08-302023-12-01上海炎凰数据科技有限公司 Methods, devices and electronic devices for processing multiple query requests
CN117891847A (en)*2024-03-182024-04-16辽宁牧龙科技有限公司Data query device and method based on data center

Similar Documents

PublicationPublication DateTitle
CN114297535A (en) Method, Apparatus, Equipment and Storage Medium for Displaying Query Conditions on a Page
JP7343568B2 (en) Identifying and applying hyperparameters for machine learning
US11100124B2 (en)Systems and methods for similarity and context measures for trademark and service mark analysis and repository searches
WO2024230117A1 (en)Question answering method and apparatus, and electronic device, computer-readable storage medium and computer program product
US20240143562A1 (en)Automatic splitting of a column into multiple columns
CN108984155B (en)Data processing flow setting method and device
JP2020500371A (en) Apparatus and method for semantic search
CA3138556A1 (en)Apparatuses, storage medium and method of querying data based on vertical search
KR20200007969A (en) Information processing methods, terminals, and computer storage media
WO2019169858A1 (en)Searching engine technology based data analysis method and system
CN112883030A (en)Data collection method and device, computer equipment and storage medium
CN112015771A (en)Data retrieval method and device, electronic equipment and computer storage medium
US20240289554A1 (en)Method and system for personalized embedding search engine
CN111143400A (en)Full-stack type retrieval method, system, engine and electronic equipment
CN113792129B (en)Intelligent session method, device, computer equipment and medium
CN117009492B (en)Graph query method and system based on local knowledge base and natural language big model
CN104484392A (en)Method and device for generating database query statement
CN117420998A (en)Client UI interaction component generation method, device, terminal and medium
US11507593B2 (en)System and method for generating queryeable structured document from an unstructured document using machine learning
Ruambo et al.Towards enhancing information retrieval systems: A brief survey of strategies and challenges
CN119025637A (en) A retrieval enhancement generation method based on a large language model and related products
CN117763126A (en) Knowledge retrieval methods, equipment, storage media and devices
CN116383234A (en)Search statement generation method and device, computer equipment and storage medium
CN118227736A (en)Text processing method, text processing device, electronic equipment and readable storage medium
CN111966830A (en)Text classification method, device, equipment and medium combining RPA and AI

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp