CN109918594B - Information display method and device - Google Patents

Information display method and device Download PDF

Info

Publication number
CN109918594B
CN109918594B CN201910075874.6A CN201910075874A CN109918594B CN 109918594 B CN109918594 B CN 109918594B CN 201910075874 A CN201910075874 A CN 201910075874A CN 109918594 B CN109918594 B CN 109918594B
Authority
CN
China
Prior art keywords
data
information
query
paging
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910075874.6A
Other languages
Chinese (zh)
Other versions
CN109918594A (en
Inventor
刘新
杨诗雨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN201910075874.6A priority Critical patent/CN109918594B/en
Publication of CN109918594A publication Critical patent/CN109918594A/en
Application granted granted Critical
Publication of CN109918594B publication Critical patent/CN109918594B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses an information display method and device. The method comprises the following steps: receiving an information inquiry request submitted by terminal equipment; the query request comprises query conditions and paging display parameters; inquiring pre-stored data in a database according to the inquiring conditions to obtain data to be processed; performing paging processing on the data to be processed according to the paging display parameters to obtain target display data; pushing the target display data to a terminal device and displaying the target display data. By adopting the scheme of the application, the query result is output to the user in the form of paging, so that the query result is clearer, and the time for the user to read the query result is saved.

Description

Information display method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to an information display method and apparatus.
Background
In order to meet the needs of storing and searching information, an Electronic Search (ES) engine with distributed multi-user capability is provided, and the ES is an open-source high-expansion distributed full-text Search engine capable of storing and searching data in near real time. Meanwhile, the system has good expansibility, can be expanded into hundreds of information display devices, processes data in a byte (PB) level, and has good application in the aspect of real-time query of big data.
But while Elastic Search can support real-time queries well, elastic Search does not support post-aggregate query paging from a performance and security perspective. For example, when required repair factory data is queried in mass repair factory data and displayed, the queried results cannot be displayed on the front end in a paging mode, all information meeting the requirements is displayed on a page, and cannot be displayed in a paging mode, so that the displayed results are very redundant, and the readability of the queried results is greatly reduced.
Disclosure of Invention
The embodiment of the application provides an information display method and device, which can page the result storage obtained by the aggregation query of an Elastic Search, can be displayed in a paging mode, and can increase the visibility and make the query result clearer.
In a first aspect, there is provided an information display method, the method including: receiving an information inquiry request submitted by terminal equipment; the query request comprises query conditions and paging display parameters; inquiring pre-stored data in a database according to the inquiring conditions to obtain data to be processed; performing paging processing on the data to be processed according to the paging display parameters to obtain target display data; pushing the target display data to a terminal device and displaying the target display data.
In one possible implementation manner, before receiving the information query request submitted by the terminal device, the method further includes: acquiring original information data and determining the dimension classification quantity of the original information data; carrying out structuring treatment on the original information to obtain form data consistent with the dimension classification quantity; and storing the form data.
In another possible implementation manner, the querying the pre-stored data in the database according to the query condition to obtain the data to be processed specifically includes: performing aggregation query on a first form data in the form data according to the query conditions to obtain aggregation data; and storing the aggregate data into an ordered hash chain table to obtain the data to be processed.
In a possible implementation manner, the paging processing is performed on the data to be processed according to the paging display parameter to obtain target display data, which specifically includes: the key value of the ordered hash chain table is given according to the key value of the first form data; storing the key value into a list; giving index of subscript of list according to the paging display parameter; and acquiring information corresponding to the form data according to the key value to obtain target display data.
In another possible implementation manner, the pushing and displaying the target data to the terminal device specifically includes: and packaging the target display data into an transliteration script language object numbered musical notation JSON format, and pushing the target display data to terminal equipment for display.
In a second aspect, there is provided an information display apparatus including: the receiving unit is used for receiving the information inquiry request submitted by the terminal equipment; the query request comprises query conditions and paging display parameters; the query unit is used for querying the pre-stored data in the database according to the query conditions to obtain data to be processed; the first processing unit is used for carrying out paging processing on the data to be processed according to the paging display parameters to obtain target display data; the pushing unit is used for pushing the target display data to the terminal equipment; and a display unit for displaying the target display data on the terminal device.
In one possible embodiment, the apparatus further comprises: an acquisition unit configured to acquire original information data; a determining unit for determining the dimension classification number of the original information data; the second processing unit is used for carrying out structuring processing on the original information to obtain form data consistent with the dimension classification quantity; and the storage unit is used for storing the form data.
In another possible implementation manner, the query unit is specifically configured to: performing aggregation query on a first form data in the form data according to the query conditions to obtain aggregation data; and storing the aggregate data into an ordered hash chain table to obtain the data to be processed.
In a further possible embodiment, the first processing unit is specifically configured to: the key value of the ordered hash chain table is given according to the key value of the first form data; storing the key value into a list; giving index of subscript of list according to the paging display parameter; and acquiring information corresponding to the form data according to the key value to obtain target display data.
In a possible embodiment, the display unit is specifically configured to: and packaging the target display data into an transliteration script language object numbered musical notation JSON format, and pushing the target display data to terminal equipment for display.
In a third aspect, an information display device is provided, which is characterized by comprising a processor, an input device, an output device and a memory, wherein the memory is configured to store a computer program, the computer program comprising program instructions, the processor being configured to invoke the program instructions to perform an information display method as described in the first aspect and any of its embodiments.
In a fourth aspect, there is provided a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of the first aspect described above.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
According to the information display method and device provided by the embodiment of the application, based on the paging instruction sent by the terminal equipment, the query result is paged, the subscript is given to the extracted elements in the query result, the search result of querying each element is returned according to the elements given with the subscript, the whole search result is integrated, the displayed information is determined and is output to the terminal equipment, and the terminal equipment displays the information and the paging result on the webpage in a paging mode according to the displayed information and the paging result, so that a user can see the query result from the webpage in a paging mode. The information display device can automatically carry out paging according to the paging instruction sent by the terminal equipment, and then outputs the query result and the paging result to the terminal equipment, so that a user can conveniently check the query result, the query result is output to the user in a paging mode, the query result is clearer, and the time for the user to read the query result is saved.
Drawings
Fig. 1 is a schematic flow chart of an information display method according to an embodiment of the present application;
FIG. 2 is a flowchart of another information display method according to an embodiment of the present application;
fig. 3a and fig. 3b are schematic views of an information display interface according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an information display device according to an embodiment of the present application;
fig. 5 is a schematic structural view of another information display apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
At present, due to the fact that the number of maintenance factories is large, daily requirements are that required maintenance factory data or data related to the maintenance factories are queried in massive vehicle maintenance factory data, when the data amount is too large, the data are displayed in a display interface without paging, so that the query results are very large in information displayed in the display interface, the readability of the query results is reduced, and the time of readers is further wasted. In view of the above problems, embodiments of the present application propose the following specific solving mechanism.
Referring to fig. 1, fig. 1 is a flow chart of an information display method according to an embodiment of the application. As shown in fig. 1, the method provided in the embodiment of the present application may be specifically described with reference to steps S101 to S104.
S101, receiving an information inquiry request submitted by a terminal device.
The terminal device may be a device located at the outermost periphery of the network in the computer network, or may be used for inputting information, outputting a processing result, and the like. For example, the terminal may be a cellular telephone, a mobile telephone, a cordless telephone, a smart watch, a wearable device, a tablet device, a session initiation protocol (session initiation protocol, SIP) phone, a wireless local loop (wireless local loop, WLL) station, a personal digital assistant (personal digital assistant, PDA), a wireless communication enabled handheld device, a computing device, an in-vehicle communication module, a smart meter, or other processing device connected to a wireless modem. In the embodiment of the application, the terminal equipment runs the application program of the web browser or the equipment for viewing the web page. Thus, this request may be a query condition and a page presentation parameter sent by the browser presenting the web page to the information display device. Namely, the user terminal equipment inputs information inquiry conditions and paging display parameters and submits the information inquiry conditions and the paging display parameters to the server. The server receives the information inquiry request submitted by the terminal device. The query request includes a query condition and a page display parameter.
The above query terms are understood to be a query interface. It will be appreciated that the query request is related to a pre-stored data structure, and that all fields in the data structure can be used as query conditions to query and provide a response, and that no fields in the data structure can be queried. It is understood that a data structure is a collection of data elements that have one or more relationships to each other. Query conditions are parameters related to the fields of the query.
For example, if a user wants to query data of a vehicle repair shop, before querying, a maintainer or an operator needs to insert one or more forms containing the vehicle repair shop into a data structure, where the one or more forms describe information of the repair shop, and when querying, basic information of the repair shop may be queried according to a name of the repair shop, or the repair shop may be queried directly, and when displaying a result, the repair shop information is displayed in a certain order, where the query condition may be: find the repair shop with 'Li' character in the name of repair shop.
The page presentation parameters are the number of pages presented and the number of presentations per page. It can be understood that if the query result is displayed on the web page without paging, the web page can slide down without limit when the terminal device displays the content, and the reading efficiency is greatly affected. The paging instruction is displayed in a mode that M pages are displayed on a webpage in each page, and N pages are displayed in total, wherein the query result is information of a form acquired from a table stored in an information display device of an Elastic Search. For example, the inquiry result may be repair shop repair data, wherein if the inquiry result is repair shop basic information, repair shop information arranged in descending order of the sum of repair shop repair vehicles and diagnostic reports, and if the instruction transmitted by the terminal device is that 10 pieces of repair shop data are displayed per page, and 10 pages are displayed in total, the user can check the data of 10 repair shops displayed per page on the terminal device web page, and the data of 100 repair shops are displayed in total, wherein the data of 100 repair shops arranged in descending order of the sum of repair shop repair vehicles and diagnostic reports.
S102, inquiring the pre-stored data in the database according to the inquiry conditions to obtain the data to be processed.
In one possible implementation manner, based on the information query request submitted by the receiving terminal device, the pre-stored data in the database, that is, the fields in the data structure, can be used as query conditions to query and provide a response, and the fields in the data structure cannot be queried. And under the condition that the data can be queried, the queried data is stored as a query result so as to be displayed after subsequent processing. The query may be an aggregate query or a common query, and it is understood that the results of the query may be sequential or non-sequential, and the data is stored in a table that may represent the sequence after the query results are obtained, so as to preserve the sequence.
And S103, performing paging processing on the data to be processed according to the paging display parameters to obtain target display data.
Based on the results of the query in step S102, the order of the query results is the presented order, and when the results are stored in the presented order, the results are stored in the form of keys and values (key-value), after the results are stored, the data of the keys are extracted and stored in a list (list), and the index of the table below is given to the data in the new list, and the index of the table below is used for paging operation. The paging parameter here is the number of displayed pages and the number of displayed pages of each page, that is, the display order can be determined according to the index of the subscript, and the start data and the last data of each page, that is, the start information and the end information of each page, can be obtained according to the paging instruction, and the information from the start information to the end information of each page is the target display information.
For example, the instruction sent by the terminal device may be to query the total number of maintenance vehicles in the maintenance factory from more to less, each page displays 10 pieces of maintenance factory data, 10 pages are displayed in total, if the queried result has 1000 pieces of maintenance factory records and is arranged according to descending order of maintenance vehicles, then the total 100 pieces of maintenance factory records in the terminal device can be displayed, and stored in the ordered hash chain, the values of the keys are stored in a key-value form, the values are extracted and stored in a list, paging subscripts are assigned to the data of different maintenance factories in the list, the elements stored herein may be the elements extracted sequentially from the queried data, i.e. the elements extracted from the data of the first 100 maintenance factories are assigned subscripts, such as subscripts of 0 to 99, i.e. the information of the maintenance factories displayed on the first page is the information of the maintenance factories assigned with subscripts of 0 to 9, the information of the maintenance factories displayed on the second page is the information assigned with subscripts of 10 to 19, and so on. After giving the subscript, it is known that the start information and the end information of each page are information with the reference numerals of 0 and 9, i.e., target information.
And S104, pushing the target display data to the terminal equipment and displaying the target display data.
In a possible implementation manner, based on the determined display information, the display information is output to the terminal device, when the browser of the terminal device receives the display information output by the information display device, the position where the result of each query is displayed can be determined according to the subscript information given to each element, and the terminal device displays the result of each query given to the subscript on a webpage and displays the result of each query on a user for reading. For example, when the terminal device receives the query results of the corresponding subscripts sent by the information display device, that is, each piece of information representing one maintenance factory, the information representing one maintenance factory is arranged in a certain rule (such as descending order of the sum of the number of maintenance vehicles and the number of diagnostic reports), and the names of the maintenance factories are given subscripts, when the terminal device receives the data, the data of each maintenance factory is displayed on the web page of the terminal device according to the sequence of the subscripts and the content of the paging instruction, and the data of each maintenance factory comprises the queried basic information of the maintenance factory. For example, the data of 10 repair factories displayed on the first page can be seen on the web page of the terminal device, the data of 10 repair factories displayed on the first page are ordered according to a certain rule, basic information of each repair factory is displayed on the web page, and if the user needs to browse the 11 th data after browsing the data of 10 repair factories on the first page, the user needs to manually turn pages to the second page to view the 11 th data of repair factories.
Before pushing to the terminal device, the obtained target data is encapsulated by using an interpreted script language object numbered musical notation JSON format.
According to the embodiment of the application, the information display device is used for paging the query result based on the paging instruction sent by the terminal equipment, giving the subscript to the extracted elements in the query result, returning the search result of querying each element according to the elements given with the subscript, integrating the whole search result, determining the displayed information, and outputting the information to the terminal equipment, wherein the terminal equipment displays the information on the webpage in a paging mode according to the displayed information and the paging result, so that a user can see the query result in a paging mode from the webpage. The information display device can automatically carry out paging according to the paging instruction sent by the terminal equipment, and then outputs the query result and the paging result to the terminal equipment, so that a user can conveniently check the query result, the query result is output to the user in a paging mode, the query result is clearer, and the time for the user to read the query result is saved.
Referring to fig. 2, fig. 2 is a flowchart illustrating another information display method according to an embodiment of the application. As shown in fig. 2, the method provided by the embodiment of the present application may be specifically described with reference to steps S201 to S211.
S201, acquiring original information data and determining the dimension classification quantity of the original information data.
The raw information data is all data containing the information that needs to be queried. Specifically, the original information data may be obtained by manually collecting the original information data, or may be obtained by capturing data on a network as the original information data. For example, the information data of the maintenance factories may be artificially integrated with the data of each maintenance factory as the original information data, or may be the data taken on the internet at the official website of each maintenance factory as the original information data.
For example, the raw information data is data of a repair shop, the data may be classified, and the determination may be classified into one category according to basic information of the repair shop, and may include information such as a name, a type of the repair shop, a phone call of the repair shop, an address of the repair shop, a latitude and longitude corresponding to the address, a time of creation, a brand of an overhaul vehicle, a serial number of a diagnostic product, and the like. The vehicle data information maintained by the maintenance factory can be classified by taking the vehicle data information maintained by the maintenance factory as dimensions, the original information can be contained by the maintenance vehicle name, the year and month identifier, the province, the city, the vehicle brand, the vehicle type, the year, the diagnosis report number, the vehicle number and the like of the maintenance factory, the vehicle data information can be but not limited to the two dimensions, and the original information can be arranged by taking the information of a vehicle repair technician as one dimension. It is understood that when the dimension is extended to 3 or more, the corresponding form data should be 3 or more.
S202, carrying out structuring processing on the original information to obtain form data consistent with the dimension classification quantity.
Specifically, form data corresponding to the currently determined dimension classification is obtained based on the determined dimension, i.e., one dimension may include more than one form, corresponding to the current dimension. And may be configured in multiple forms for fields in one piece of raw information, say the name of the repair shop, may be configured within the form for each dimension. It will be appreciated that all of the forms described above can be divided into two categories: static forms and dynamic forms, wherein the static forms comprise forms with unchanged data; while the data in the dynamic form may be data that changes over time or other factors.
In an example, for a maintenance factory form, the maintenance factory static form may include a maintenance factory information form, which may be in the maintenance factory as dimensions, and the fields included may include the name of the maintenance factory, the telephone of the maintenance factory, the address of the maintenance factory, the latitude and longitude corresponding to the address, the creation time, and the information such as the brand of the finished vehicle and the serial number of the diagnostic product, which do not change. The dynamic form of the repair shop may include a repair vehicle information table of the repair shop, that is, in the dimension of vehicle data, the included field may be in the dimension of repair vehicles of the repair shop, specifically including the name of repair vehicles of the repair shop, the year and month identifier, the province, the city, the vehicle brand, the vehicle type, the year, the number of diagnostic reports, the number of vehicles, and the like, and the repair vehicle data of the repair shop may change with time. It will be appreciated that one dimension corresponds to one or more forms, and that one or more common fields stored in a form may be used to query data of multiple forms simultaneously during a query, or may be used to establish an association between multiple forms.
The dimensions of the raw data have been determined to be classified with the dimensions of the data of the service factory, i.e. the form corresponding to the data of one or more service factories, or the dimensions of the service vehicle of the service factory have been determined to be corresponding to the form of the vehicle of one or more service factories, wherein the name of the service factory is the same in all the forms of all the dimensions, and thus the name of the service factory can be used as a key, so that when the query is made, for example, the form with the data of one service factory, and the form in which the service factory services the vehicle, the instruction to input the query is to query the service factory information with the largest number of service vehicles, i.e. the service factory with the largest number of service vehicles is first queried in the dimensions of the service vehicles, and the information of the service factory is queried in the dimensions of the service factory according to the name of the service factory.
S203, storing the form data.
Specifically, form data with consistent dimension classification numbers are stored so as to facilitate inquiry. Wherein the cluster of the distributed information display devices of the Elastic Search stores one or more forms containing the query information and makes an index, and the index refers to storing a document into the index so that the document can be searched or queried to facilitate subsequent aggregate query on the contents of the forms, wherein the index is different from the index of the index page. The form may be preset in the information display device in the form of a document, and the data of the form may be stored in the form of a document or may be stored in another way because the Elastic Search is directed to the document (document oriented), which is not limited in this application.
S204, receiving an information query request submitted by the terminal equipment, wherein the query request comprises a query condition and a paging display parameter.
The specific implementation process of step S204 may be referred to the description of step S101 in the embodiment corresponding to fig. 1, and the detailed description will not be repeated here.
S205, carrying out aggregation query on the first form data in the form data according to the query conditions to obtain aggregation data.
Specifically, the query is performed based on the first form previously configured in the Elastic Search information display apparatus, where the data of the first form may be any one of form data, and in the Elastic Search, the document (rather than the data in the rows and columns) may be indexed, searched, sorted, and filtered. This way of querying data is quite different from the past, which is also one of the reasons why Elastic Search can perform complex full-text searches.
In one possible implementation, aggregation (aggregation) in Elastic Search allows complex analysis statistics to be generated on the data after query, and after the query results have been obtained, the query results are output in a manner that the preset rules refer to statistical rules.
And receiving a query request, and if the query condition in the query request is that the information according to the repair shop in the repair shop needs to be searched, arranging the information according to the descending order of the sum of the repair vehicles and the diagnostic report number. When the input keyword is inquired, the proper sentence is added, so that the query result is output in a statistical rule mode when the information display device outputs the query result. If the descending order of the sum of the maintenance vehicles and the diagnostic report numbers is added at the time of inquiry, the information display device outputs the information of one maintenance factory, wherein the maintenance factory with the largest sum of the maintenance vehicles and the diagnostic report numbers is firstly output, and the information of the maintenance factory is orderly arranged in the descending order of the sum of the maintenance vehicles and the diagnostic report numbers in the output maintenance factory information.
After receiving the query instruction, the information display device queries the form stored in the information display device according to the query condition, obtains the query result, and then aggregates the current query result according to the aggregation statement in the query statement, and obtains the aggregated data after the aggregation is completed.
S206, storing the aggregated data into an ordered hash chain table to obtain data to be processed.
The data of the query result is stored in an ordered hash chain table (LinkedHashMap), which is a double-linked chain table running on all the items by maintaining a LinkedHashMap, so that the element iteration sequence is ensured. The iterative order may be an insertion order or an access order. Thus, linkedHashMap can be divided into: a linkedhassmap that maintains an insertion order and a linkedhassmap that maintains an access order, wherein a default implementation of the linkedhassmap is ordered in the insertion order.
The linked list and hash table data stored are accessed in the form of key-value, and the LinkedHashMap is an ordered table, and when data can be inserted in a predetermined order, data can be output in that order. This has the advantage that the order of aggregating query results in the Elastic Search can be represented in linkedhassmap.
The data after the aggregate query is stored in the ordered hash chain table, and the data to be processed is obtained, and can be processed according to the stored data to obtain a paging index so as to be conveniently pushed to the terminal equipment for display.
The data of the query repair shop is arranged according to the sequence of the repair shop with gradually decreasing sum of the repair vehicles and the diagnosis report numbers, and then the data are stored in the linkedhassMap, so that the sequence information of the repair shop information with the name of the repair shop as dimension can be well stored, and when the data are required to be obtained from the linkedhassMap in sequence in the follow-up process, the sequence of the repair shop displayed on the final display webpage can be arranged according to the sum of the repair vehicles and the diagnosis report numbers.
S207, according to the key value of the first form data, the key value of the ordered hash chain table is given.
Specifically, after the query, a query result may be obtained, where after the query condition is input, the query is performed in the first form data in the form data, and when the data in the first form is stored in a key-value manner, a key (key) corresponding to the query result information data in the first form is assigned to the key (key) of the ordered hash chain table, that is, the first step of completing the paging processing.
For example, in the case of querying the data of the repair shop, the query results are arranged according to the descending order of the number of repair vehicles in the repair shop, the vehicle data forms of the repair shop are aggregated and queried in the dimension of the repair vehicles in the repair shop to obtain aggregated data, and the aggregated data are stored in an ordered hash chain table, wherein the forms of the vehicle data of the repair shop are stored in a key-value manner, the key (key) may be the name of the repair shop, the value may be specific information of the repair shop, the key (key) of the corresponding data in the forms of the repair shop is assigned to the key (key) of the ordered hash chain table, and the first-step storage is completed to prepare for the operation of subsequent paging.
S208, storing the key value into a list.
It can be understood that, in the linkedhassmap, in order to ensure the sequence of storing and reading data, if the keys and the values of the linkedhassmap are directly subjected to calculation paging, the time and space overhead exceeds the time and space overhead of the query. Therefore, in the embodiment of the application, after the query result is stored in the LinkedHashMap, each key is extracted and stored in a list, and the list can be an array or a linked list, and the paging result is calculated in the list, so that the time and space expenditure can be greatly reduced.
Specifically, keys (keys) are extracted from LinkedHashMap, and in the above example, names of repair factories are extracted, and in the storage list, the keys are stored in an array or a linked list according to the order stored in LinkedHashMap.
S209, giving index of subscript of list according to the paging display parameter.
In one possible implementation, each key (key) in the list is given a subscript based on the key (key) stored in the list in step S208, where the subscript index (index) is an integer showing the paging result of the element, and increases from 0 until the last stored element.
S210, acquiring information corresponding to form data according to the key value to obtain target display data.
Specifically, based on the elements given with the subscripts, after determining the specific positions of the displayed contents, the information display device searches the corresponding information in the form of the query result returned by each element given with the subscripts, determines the information to be displayed by the final terminal device, and according to the information to be displayed and the paging display parameters, can determine the information content which can be displayed by each page, and further, can determine the start information and the end information which contain the display of each page, thereby obtaining the required target display data.
Optionally, according to each key given with a subscript, returning to the first form to perform query to obtain data corresponding to each key, for example, if the name of the repair shop is stored in the list as a key, querying in the first form according to the name of the repair shop to obtain information related to the repair shop, determining repair shop information displayed on each page according to the subscript index, and starting information and ending information of each page to obtain target display data so as to be pushed to the terminal device for display after subsequent encapsulation.
S211, packaging the target display data into an transliteration script language object numbered musical notation JSON format, and pushing the data to terminal equipment for display.
Specifically, the above-described formal notation format (JavaScript Object Notation, JSON) packaged as an interpreted scripting language object is a lightweight data exchange format. It stores and presents data in a text format that is completely independent of the programming language, based on a subset of ECMAScript (specification of the interpreted scripting language (JavaScript, JS) formulated by the european computer institute). The compact and clear hierarchical structure makes JSON an ideal data exchange language. Is easy to read and write by people, is easy to analyze and generate by machines, and effectively improves the network transmission efficiency. The encapsulation into JSON format refers to converting data obtained from the database into a string in JSON format in servlets.
The above-mentioned data in linkedshashmap containing subscript information may be packaged into JSON format by fastjson (open source JSON parsing library of aleba, which may parse strings in JSON format), gson (Gson is an open source JSON parsing library of Google) or JSON-lib (JSON-lib is a Java class library), which is not limited herein. After packaging, it is stored for subsequent processing.
In one possible implementation manner, after pushing the JSON format information to the terminal device, outputting the JSON format information to the terminal device, after receiving the JSON format information, the terminal device analyzes the packaged JSON information and displays the JSON information in a paging form on a webpage of the terminal device. The above-mentioned paging form can display the number of pages displayed and the number of maintenance factories and total number of pages on the interface displayed by the terminal equipment, and also only display the output content and the page turning button, and the application is not limited herein.
According to the embodiment of the application, the information display device is used for paging the query result based on the paging instruction sent by the terminal equipment, giving the subscript to the extracted elements in the query result, returning the search result of querying each element according to the elements given with the subscript, integrating the whole search result, determining the displayed information, and outputting the information to the terminal equipment, wherein the terminal equipment displays the information on the webpage in a paging mode according to the displayed information and the paging result, so that a user can see the query result in a paging mode from the webpage. The information display device can automatically carry out paging according to the paging instruction sent by the terminal equipment, and then outputs the query result and the paging result to the terminal equipment, so that a user can conveniently check the query result, the query result is output to the user in a paging mode, the query result is clearer, and the time for the user to read the query result is saved.
Further, please refer to fig. 3a and fig. 3b, which are an interface schematic diagram of a method for paging display according to an embodiment of the present application. Under the condition that the query results in the figure 3a are not displayed in a paging mode, the display after being output to the terminal equipment is as shown in the figure 3a, and in the aspect of query result display, the query results can be infinitely slid down to the last query result, so that visual fatigue is increased. If the information display device receives the paging command, calculates the paging result according to the query result, and pages the query result, the information display device displays 5 pages according to the paging command on the condition that the information display device is displayed on the webpage as shown in fig. 3b, and displays X pages in total.
According to the information display device provided by the embodiment of the application, the query results can be paged based on the paging instruction sent by the terminal equipment, the subscript is given to the extracted elements in the query results, the search results for querying each element are returned according to the elements given with the subscript, the whole search results are integrated, the displayed information is determined and output to the terminal equipment, and the terminal equipment displays the information and the paging results on the webpage in a paging mode according to the displayed information and the paging results, so that a user can see the query results from the webpage in a paging mode. The information display device can automatically carry out paging according to the paging instruction sent by the terminal equipment, and then outputs the query result and the paging result to the terminal equipment, so that a user can conveniently check the query result, the query result is output to the user in a paging mode, the query result is clearer, and the time for the user to read the query result is saved.
Fig. 4 is a schematic structural diagram of an information display device according to an embodiment of the present application, and the information display device 3000 includes:
a receiving unit 301, configured to receive an information query request submitted by a terminal device; the query request comprises query conditions and paging display parameters;
the query unit 302 is configured to query the pre-stored data in the database according to the query condition, so as to obtain data to be processed;
the first processing unit 303 is configured to perform a paging process on the data to be processed according to the paging display parameter, so as to obtain target display data;
a pushing unit 304, configured to push the target display data to a terminal device
A display unit 305 for displaying the target display data on the terminal device.
In one possible implementation manner, the information display apparatus 3000 further includes:
an obtaining unit 306, configured to obtain the original information data and determine the dimension classification number of the original information data;
a second processing unit 307, configured to perform a structuring process on the original information, so as to obtain form data consistent with the dimension classification number;
and a storage unit 308, configured to store the form data.
In another possible implementation manner, the query unit 302 is specifically configured to:
Performing aggregation query on a first form data in the form data according to the query conditions to obtain aggregated data;
and storing the aggregate data into an ordered hash chain table to obtain the data to be processed.
In yet another possible implementation manner, the first processing unit 303 is specifically configured to:
the key value of the ordered hash chain table is given according to the key value of the first form data;
storing the key value into a list;
assigning a subscript index of the list according to the paging display parameters;
and obtaining information corresponding to the form data according to the key value to obtain target display data.
In one possible implementation, the pushing unit 304 and the display unit 305 are specifically configured to: and packaging the target display data into an transliteration script language object numbered musical notation JSON format, and pushing the data to terminal equipment for display.
According to the information display device provided by the embodiment of the application, the query results can be paged based on the paging instruction sent by the terminal equipment, the subscript is given to the extracted elements in the query results, the search results for querying each element are returned according to the elements given with the subscript, the whole search results are integrated, the displayed information is determined and output to the terminal equipment, and the terminal equipment displays the information and the paging results on the webpage in a paging mode according to the displayed information and the paging results, so that a user can see the query results from the webpage in a paging mode. The information display device can automatically carry out paging according to the paging instruction sent by the terminal equipment, and then outputs the query result and the paging result to the terminal equipment, so that a user can conveniently check the query result, the query result is output to the user in a paging mode, the query result is clearer, and the time for the user to read the query result is saved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an information display apparatus 4000 according to an embodiment of the application. The information display device 4000 in the present embodiment as shown in fig. 5 may include: a processor 401, an input device 402, an output device 403, and a memory 404. The memory 404 is used for storing a computer program comprising program instructions and the processor 401 is used for executing the program instructions stored in the memory 404. Wherein the processor 401 is configured to invoke program instructions to perform the steps of:
receiving an information inquiry request submitted by terminal equipment; the query request comprises query conditions and paging display parameters;
inquiring pre-stored data in a database according to the inquiring conditions to obtain data to be processed;
performing paging processing on the data to be processed according to the paging display parameters to obtain target display data;
pushing the target display data to the terminal equipment and displaying the target display data.
In one implementation, the processor 401 is further configured to, before executing the information query request submitted by the receiving terminal device, execute the following steps:
acquiring original information data and determining the dimension classification quantity of the original information data;
Carrying out structuring treatment on the original information to obtain form data consistent with the dimension classification quantity;
and storing the form data.
In another possible implementation manner, the step of querying, by the processor 401, the pre-stored data in the database according to the query condition to obtain the data to be processed specifically includes:
performing aggregation query on a first form data in the form data according to the query conditions to obtain aggregated data;
and storing the aggregate data into an ordered hash chain table to obtain the data to be processed.
In a possible implementation manner, the step of performing, by the processor 401, the paging processing on the data to be processed according to the paging display parameter to obtain target display data specifically includes:
the key value of the ordered hash chain table is given according to the key value of the first form data;
storing the key value into a list;
assigning a subscript index of the list according to the paging display parameters;
and obtaining information corresponding to the form data according to the key value to obtain target display data.
In a possible implementation manner, the step of pushing and displaying the target data to the terminal device by the processor 401 specifically includes:
And packaging the target display data into an transliteration script language object numbered musical notation JSON format, and pushing the data to terminal equipment for display.
It should be appreciated that in embodiments of the present application, the processor 401 may be a central processing unit (Central Processing Unit, CPU), which may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The output device 402 is for transmitting data and the input device 403 is for receiving data.
The memory 404 may include read only memory and random access memory and provide instructions and data to the processor 404. A portion of memory 404 may also include non-volatile random access memory. For example, memory 404 may also store information of device type.
In a specific implementation, the processor 401, the output device 402, and the output device 403 described in the embodiments of the present application may execute the information display embodiment provided in fig. 1 or fig. 2 of the embodiments of the present application, which are not described herein again.
Furthermore, it should be noted here that: the embodiment of the present application further provides a computer storage medium, in which a computer program executed by the aforementioned server is stored, and the computer program includes program instructions, when executed by a processor, can execute the description of the method for displaying information in the embodiment corresponding to fig. 1 or fig. 2, and therefore, a detailed description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer storage medium according to the present application, please refer to the description of the method embodiments of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the division of the unit is merely a logic function division, and there may be another division manner when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted or not performed. The coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted across a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a read-only memory (ROM), or a random-access memory (random access memory, RAM), or a magnetic medium, such as a floppy disk, a hard disk, a magnetic tape, a magnetic disk, or an optical medium, such as a digital versatile disk (digital versatile disc, DVD), or a semiconductor medium, such as a Solid State Disk (SSD), or the like.

Claims (4)

1. An information display method, which is applied to data query of a maintenance factory, the method comprising:
acquiring original information data and determining the dimension classification quantity of the original information data;
carrying out structuring treatment on the original information to obtain form data consistent with the dimension classification quantity;
storing the form data;
receiving an information inquiry request submitted by terminal equipment; the query request comprises query conditions and paging display parameters;
inquiring the pre-stored data in the database according to the inquiring condition to obtain the data to be processed, wherein the method comprises the following steps: performing aggregation query on a first form data in the form data according to the query conditions to obtain aggregation data; storing the aggregate data into an ordered hash chain table to obtain data to be processed;
paging the data to be processed according to the paging display parameters to obtain target display data, wherein the paging display parameters comprise: the key value of the ordered hash chain table is given according to the key value of the first form data; storing the key value into a list; giving index of subscript of list according to the paging display parameter; acquiring information corresponding to form data according to the key value to obtain target display data;
Pushing the target display data to a terminal device and displaying the target display data.
2. The method according to claim 1, wherein pushing and displaying the target display data to a terminal device specifically comprises:
and packaging the target display data into an transliteration script language object numbered musical notation JSON format, and pushing the target display data to terminal equipment for display.
3. An information display device, which is applied to data query of a maintenance factory, comprising:
an acquisition unit configured to acquire original information data;
a determining unit for determining the dimension classification number of the original information data;
the second processing unit is used for carrying out structuring processing on the original information to obtain form data consistent with the dimension classification quantity;
the storage unit is used for storing the form data;
the receiving unit is used for receiving the information inquiry request submitted by the terminal equipment; the query request comprises query conditions and paging display parameters;
the query unit is used for querying the pre-stored data in the database according to the query conditions to obtain the data to be processed, and comprises the following steps: performing aggregation query on a first form data in the form data according to the query conditions to obtain aggregation data; storing the aggregate data into an ordered hash chain table to obtain data to be processed;
The first processing unit is configured to perform paging processing on the data to be processed according to the paging display parameter, to obtain target display data, and includes: the key value of the ordered hash chain table is given according to the key value of the first form data; storing the key value into a list; giving index of subscript of list according to the paging display parameter; acquiring information corresponding to form data according to the key value to obtain target display data;
a pushing unit, configured to push the target display data to a terminal device
And the display unit is used for displaying the target display data on the terminal equipment.
4. An information display device comprising a processor, an input device, an output device and a memory, wherein the memory is for storing a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform an information display method as claimed in claim 1 or 2.
CN201910075874.6A 2019-01-25 2019-01-25 Information display method and device Active CN109918594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910075874.6A CN109918594B (en) 2019-01-25 2019-01-25 Information display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910075874.6A CN109918594B (en) 2019-01-25 2019-01-25 Information display method and device

Publications (2)

Publication Number Publication Date
CN109918594A CN109918594A (en) 2019-06-21
CN109918594B true CN109918594B (en) 2023-12-05

Family

ID=66960767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910075874.6A Active CN109918594B (en) 2019-01-25 2019-01-25 Information display method and device

Country Status (1)

Country Link
CN (1) CN109918594B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110472752A (en) * 2019-07-23 2019-11-19 上海易点时空网络有限公司 Handle the method and device of data
CN110955294B (en) * 2019-11-25 2021-02-05 重庆大学 Configurable ordered key value class data simulation generation method and generation device thereof
CN112100226A (en) * 2020-09-18 2020-12-18 腾讯科技(深圳)有限公司 Data query method and computer-readable storage medium
CN112347396A (en) * 2020-10-22 2021-02-09 杭州安恒信息技术股份有限公司 Webpage table display method, system and device based on IndexDB database
CN112328925A (en) * 2020-10-28 2021-02-05 北京鸿腾智能科技有限公司 Page data loading method, device, equipment and storage medium
CN115329223A (en) * 2021-05-11 2022-11-11 北京字节跳动网络技术有限公司 Paging processing method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011054148A (en) * 2009-08-04 2011-03-17 Nippon Telegr & Teleph Corp <Ntt> Retrieval device and method, and program
CN102880685A (en) * 2012-09-13 2013-01-16 北京航空航天大学 Method for interval and paging query of time-intensive B/S (Browser/Server) with large data size
CN106227894A (en) * 2016-08-24 2016-12-14 中国农业银行股份有限公司 A kind of data page querying method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011054148A (en) * 2009-08-04 2011-03-17 Nippon Telegr & Teleph Corp <Ntt> Retrieval device and method, and program
CN102880685A (en) * 2012-09-13 2013-01-16 北京航空航天大学 Method for interval and paging query of time-intensive B/S (Browser/Server) with large data size
CN106227894A (en) * 2016-08-24 2016-12-14 中国农业银行股份有限公司 A kind of data page querying method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
用PHP+MYSQL实现分页查询;党群;;军民两用技术与产品(01);全文 *

Also Published As

Publication number Publication date
CN109918594A (en) 2019-06-21

Similar Documents

Publication Publication Date Title
CN109918594B (en) Information display method and device
US11252245B2 (en) Information pushing method and device
US11687600B2 (en) Ranking search results based upon content creation trends
TWI777010B (en) Prediction of information conversion rate, information recommendation method and device
CN108804532B (en) Query intention mining method and device and query intention identification method and device
US10140368B2 (en) Method and apparatus for generating a recommendation page
CN108572990B (en) Information pushing method and device
CN108549569B (en) Method and equipment for searching information in application program
US20090077065A1 (en) Method and system for information searching based on user interest awareness
CN108595642A (en) The method and apparatus of information in a kind of search for application
CN106445963B (en) Advertisement index keyword automatic generation method and device of APP platform
US20130290138A1 (en) Search Method, Apparatus and Server for Online Trading Platform
CN112287206A (en) Information processing method and device and electronic equipment
CN112131220B (en) Data report processing method and device
CN107885875B (en) Synonymy transformation method and device for search words and server
CN105786858A (en) Information search system and method
CN111259274A (en) Information processing method, device, equipment and information display device
CN111488386B (en) Data query method and device
CN112162905A (en) Log processing method and device, electronic equipment and storage medium
CN111339452A (en) Method, terminal, server and system for displaying search result
CN110825976B (en) Website page detection method and device, electronic equipment and medium
JP5538459B2 (en) Information processing apparatus and method
CN112256719A (en) Entity query method, device, readable medium and electronic equipment
CN111930954B (en) Intention recognition method and device, storage medium and electronic equipment
CN111177146B (en) Data analysis method, device and 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
GR01 Patent grant
GR01 Patent grant