CN108241657B - Web data list processing method and device - Google Patents

Web data list processing method and device Download PDF

Info

Publication number
CN108241657B
CN108241657B CN201611210340.2A CN201611210340A CN108241657B CN 108241657 B CN108241657 B CN 108241657B CN 201611210340 A CN201611210340 A CN 201611210340A CN 108241657 B CN108241657 B CN 108241657B
Authority
CN
China
Prior art keywords
web
background server
index
target data
data
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
CN201611210340.2A
Other languages
Chinese (zh)
Other versions
CN108241657A (en
Inventor
吴小炎
陈丹
金博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Boco Inter Telecom Technology Co ltd
Original Assignee
Beijing Boco Inter Telecom Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Boco Inter Telecom Technology Co ltd filed Critical Beijing Boco Inter Telecom Technology Co ltd
Priority to CN201611210340.2A priority Critical patent/CN108241657B/en
Publication of CN108241657A publication Critical patent/CN108241657A/en
Application granted granted Critical
Publication of CN108241657B publication Critical patent/CN108241657B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation

Landscapes

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

Abstract

The application provides a web data list processing method and device. The method comprises the following steps: establishing connection between a web front end and a background server; constructing a hash mapping table; the web front end sends a subscription condition to the background server; a background server receives a subscription condition request sent by a web front end; the background server side constructs a target data record containing indexes and values according to the subscription condition request, and returns the target data record to the web front end; the web front end receives the target data record and establishes a web index cache; and the web front end queries the web data list through the web index cache and executes page turning, filtering and/or sequencing operations. The scheme adopts an index mode to reduce the weight of the transmission data, thereby avoiding transmission waste; data searching is carried out based on index cache, so that the communication frequency of the web front end and the background server is reduced, the smoothness of operation is guaranteed, and the user experience is improved.

Description

Web data list processing method and device
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a web data list processing method and apparatus.
Background
The service data is also called equipment failure, each service data has an attribute exceeding 100 fields, mainly comprises dictionary data and character string data, and can be used for describing the failure generated by the equipment, and mainly comprises failure position information, equipment configuration information (version, model and the like), failure type, region and state, failure maintenance suggestions, influences on the service and the equipment, associated equipment information and the like.
The service data is presented in a comprehensive mode which meets a certain style and is convenient to operate on the basis of a web list. And the web list data supports real-time changes, including adding data, changing the value of the existing data field, deleting the excess data, and the like.
In the prior art, a web front end receives a service data record queue transmitted by a background server, and each data record actually contains a field name and a value, wherein the field names are the same in all the data records and only the values are different. That is, if 10 ten thousand service data records are transmitted at the web front end and the background server end, the field name in each data record needs to be repeatedly transmitted 10 ten thousand times, which causes great field redundancy and extreme transmission waste.
In the prior art, operations such as secondary filtering, sorting, dragging and the like are performed on a web data list, and a request needs to be temporarily sent to a background server, and a response of the background server is waited, that is, the background server pushes data to a web front end. The whole process comprises the steps of web front-end operation organization conditions, interface calling and transmission to a background server; and the background server executes logic, organizes data and pushes the data to be transmitted to the web front end. The processes all need to consume time, and especially when the capacity of the web data list is larger, the time consumption of the processes is larger, so that the subsequent operations of sorting, dragging, filtering and the like for the web data list are delayed, the user perception is insufficient, and the experience is poor.
Disclosure of Invention
The application provides a web data list processing method and device, which are used for solving the problems of data transmission waste, frequent communication, large occupation of data memory of a web front end, delayed data list operation and poor user experience of the web front end and a background server in the prior art.
The application discloses a web data list processing method, which comprises the following steps:
the web front end is connected with the background server;
the method comprises the steps that a web front end and a background server construct a hash mapping table containing field names and indexes;
the web front end sends a subscription condition to the background server;
a background server receives a subscription condition request sent by a web front end;
the background server side constructs a target data record containing indexes and values according to the subscription condition request, and returns the target data record to the web front end;
the web front end receives the target data record returned by the background server end and establishes a web index cache;
the web front end draws a web data list according to the subscription condition;
and the web front end queries the web data list through the web index cache and executes page turning, filtering and/or sequencing operations.
Further, the web front end and the background server construct a hash mapping table containing field names and indexes, including:
the background server accesses the relational database, acquires the field names, analyzes the field names and the serial numbers corresponding to the field names, namely indexes, constructs a hash mapping table from the field names to the indexes, and caches the hash mapping table in the internal memory of the background server;
the method comprises the steps that a web front end obtains a hash mapping table from a field name to an index, cached by a background server, and caches the hash mapping table in a memory of the web front end; and converting according to the hash mapping table from the field name to the index, constructing the hash mapping table from the index to the field name, and caching the hash mapping table in a memory at the front end of the web.
Further, the receiving, by the background server, the subscription condition request sent by the web front end includes:
the background server receives subscription conditions sent by the web front end, the subscription conditions inform a data range needing to be subscribed, registration service is executed, after subscription is successful, database information is inquired, a data refreshing thread is started, and business data are monitored.
Further, the background server requests to construct a target data record containing an index and a value according to the subscription condition, and returns the target data record to the web front end, including:
the background server side obtains service data from a database and a real-time message queue, replaces field names in the service data with indexes according to a hash mapping table from the field names to the indexes cached by the background server side, constructs target data records containing indexes and values, and returns the target data records to the web front end.
Further, the web front end receives the target data record returned by the background server, and establishes a web index cache, including:
loading and displaying a preset number of target data records for the first time;
and performing supplementary conversion of resources according to the returned target data records:
the indexes in the target data records are corresponding to the field names through a hash mapping table cached at the front end of the web from the indexes to the field names, and then the resource equipment types corresponding to the values are searched from a resource dictionary according to the field names;
taking the index and the resource equipment type or the index and the value after the supplement conversion as resource data, and loading the resource data into a web index cache, wherein the web index cache is stored at the front end of the web;
and the web front end is in long connection with the background server, acquires a newly added target data record from the background server, supplements and converts the target data record as resources, and then adds the target data record into the web index cache until the total capacity of the web index cache reaches the set value of the capacity.
Preferably, after the steps of receiving, by the web front end, the target data record sent by the background server and establishing the web index cache, the method further includes:
the web front end acquires the changed target data record from the background server and updates the web index cache;
and deleting the index cache data exceeding the set value of the web index cache capacity.
Further, the web front end draws a web data list according to the subscription condition, including:
the web front end queries a user interface display template, analyzes the content contained in the column head of the display template and the display sequence of the content, and draws a web data list based on the content and the display sequence of the content.
Further, the web front end queries the web data list through the web index cache, and performs page turning, filtering and/or sorting operations, including:
dragging an upper scroll bar and a lower scroll bar in the web data list, executing page turning operation, corresponding to the field name to the index through a hash mapping table from the field name to the index cached at the front end of the web, and acquiring and displaying data corresponding to a dragged area of the scroll bar from a web index cache according to the index;
selecting a funnel icon in a certain column head in the web data list, expanding an enumeration value list, selecting at least one enumeration value, executing filtering operation, corresponding to an index from a field name through a hash mapping table from the field name to the index cached at the front end of the web, filtering data from a web index cache according to the index, and pushing the filtered data to a user interface;
selecting a certain column in the web data list, executing sorting operation, corresponding the field name to the index through a hash mapping table from the field name to the index cached at the front end of the web, sorting the data of the column from the web index cache according to the index, rearranging the data, and pushing the rearranged data to a user interface.
The application discloses a web data list processing apparatus, includes:
the connection module is used for connecting the web front end with the background server;
the hash mapping table building module is used for building a hash mapping table containing field names and indexes by the web front end and the background server side;
the sending module is used for sending the subscription conditions to the background server by the web front end;
the receiving module is used for receiving the subscription condition request sent by the web front end by the background server;
the response module is used for the background server side to construct a target data record containing indexes and values according to the subscription condition request and return the target data record to the web front end;
the web index cache constructing module is used for receiving the target data record returned by the background server at the web front end and establishing a web index cache;
the web data list drawing module is used for drawing a web data list by the web front end according to the subscription condition;
and the query module is used for the web front end to query the web data list through the web index cache and execute page turning, filtering and/or sequencing operations.
Further, the web index cache building module includes:
the display unit is used for loading and displaying a preset number of target data records for the first time;
the conversion unit is used for performing supplementary conversion on resources according to the returned target data record, and specifically comprises:
the indexes in the target data records are corresponding to the field names through a hash mapping table cached at the front end of the web from the indexes to the field names, and then the resource equipment types corresponding to the values are searched from a resource dictionary according to the field names;
taking the index and the resource equipment type or the index and the value after the supplement conversion as resource data, and loading the resource data into a web index cache, wherein the web index cache is stored at the front end of the web;
and the adding unit is used for keeping long connection between the web front end and the background server, acquiring a newly added target data record from the background server, performing resource supplement conversion on the target data record, and adding the target data record into the web index cache until the total capacity of the web index cache reaches the set value of the capacity.
Compared with the prior art, the method has the following advantages:
according to the method and the system, the field names are replaced by the indexes at the web front end and the background server, so that the transmitted redundant fields are effectively solved, the transmission efficiency is improved, and the feasibility of caching data at the web front end is ensured; the web front-end index cache is newly added, so that the interaction frequency of the web front-end and the background server is reduced; the web data list query operation walks the index cache of the web front end, so that the operation efficiency is improved, and the user perception is improved.
Drawings
The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart of a web data list processing method according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for processing a web data list according to another embodiment of the present application;
fig. 3 is a schematic structural diagram of a web data list processing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
In the description of the present application, it is to be understood that the meaning of "a plurality" is two or more unless specifically limited otherwise. The terms "comprising," including, "and the like are to be construed as open-ended terms, i.e.," including/including but not limited to. The term "based on" is "based, at least in part, on". The term "an embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment". Relevant definitions for other terms will be given in the following description.
The web front end builds a JavaScript object under the Ember. Js framework based on a hypertext Markup Language (HTML) 5 platform. Each data object may be used to describe a device that has failed once. The background server side runs java service to provide data, the two sides subscribe data based on websocket long connection, a transmission object is PB (protocol buffers), and serialization and deserialization of structured data are performed based on PB.
Referring to fig. 1, a flowchart of a web data list processing method according to an embodiment of the present application is shown, where the preferred method embodiment includes the following steps:
step S101: the web front end is connected with the background server.
Step S102: the method comprises the following steps that a web front end and a background server construct a Hash mapping table (Hash Map) containing field names and indexes, and specifically comprises the following steps:
a background server accesses a Relational Database (RDB, Relational Database), acquires a field name, analyzes the field name and a number corresponding to the field name, constructs a Hash Map from the field name to an index, and caches the Hash Map in a memory of the background server;
the method comprises the steps that a web front end calls an interface, a Hash Map from a field name to an index cached by a background server is obtained and cached in a memory of the web front end; and converting according to the Hash Map from the field name to the index, constructing the Hash Map from the index to the field name, and caching the Hash Map in a memory at the front end of the web.
The Hash Map from the field names to the indexes can be used for searching when the background server internally processes data, and can also provide a mapping relation from the field names to the indexes which are synchronous and consistent with the web front-end query.
The steps realize the synchronization of the Hash Map of the web front end and the background server, and simultaneously construct the Hash Map from the index to the field name, so that the field name is replaced by the index when the web front end and the background server transmit data, only the really needed data is transmitted, and the field redundancy and the transmission waste are avoided; meanwhile, the data slimming is beneficial to index caching at the front end of the web, only the data records really needed are cached, the phenomenon that the occupied memory is reduced due to repeated storage of the data field names is avoided, and the storage efficiency is improved; the query operation of the web front end on the data list is performed aiming at the index cache without temporary acquisition from the background server, so that the communication frequency of the web front end and the background server is greatly reduced, the efficiency of the operation aiming at the web data list is greatly improved, the smoothness of the operation is guaranteed, and the user perception and satisfaction are improved.
Step S103: the web front end sends the subscription condition to the background server.
And after the web front end sends the subscription conditions, starting subscription data.
Step S104: and the background server receives the subscription condition request sent by the web front end. The method specifically comprises the following steps:
the background server receives a subscription condition sent by the web front end, and the subscription condition informs the background server of a data range needing subscription;
executing a registration service;
after the subscription is successful, inquiring database information; and starting a data refreshing thread and monitoring the service data.
Step S105: and the background server side constructs a target data record containing indexes and values according to the subscription condition request, and returns the target data record to the web front end. The method specifically comprises the following steps:
the background server side obtains service data from a database and a real-time message queue, replaces field names in the service data with indexes according to Hash Map from the field names to the indexes, constructs target data records containing the indexes and values, and returns the target data records to the web front end.
Step S106: and the web front end receives the target data record returned by the background server end and establishes a web index cache. The method specifically comprises the following steps:
step (1): loading and displaying a preset number of target data records for the first time; preferably, the predetermined number is 1000.
In specific implementation, the data can be loaded and displayed preferentially, such as 100 pieces; and subsequently, synchronizing the residual data step by step, preferably to 1000 pieces, namely finishing the first loading and displaying a preset number of target data records.
Step (2): performing supplementary replacement of resources according to the returned target data record, specifically comprising:
the indexes in the target data records correspond to the field names through a Hash Map cached at the front end of the web and from the indexes to the field names, and then the resource equipment types corresponding to the values are searched from a resource dictionary according to the field names;
and taking the indexes and the resource equipment types after the supplement conversion as resource data, and loading the resource data into a web index cache, wherein the web index cache is stored at the front end of the web.
For example, one target data record returned to the web front end by the backend server is index "7" and value "200", and needs to be converted into the corresponding resource device type.
First, according to the Hash Map cached at the front end of the web from the index to the field name, the index "7" is corresponding to the field name "object _ class".
There are about 100 or more similar fields ("object _ class"), most of which have resource dictionaries stored in system-level resource warehouses maintained by the system, and the number of resource dictionaries corresponding to each field name is almost more than dozens, while the ID of a resource dictionary between field names, i.e., the value "200", may be repeated, but the resource dictionary ID of a field name, i.e., the value is unique.
Therefore, by finding the field name "object _ class" with the index "7", narrowing the range of the search value improves the search efficiency and avoids the possibility of error searching.
Then, the resource device type "Base Station Controller (BSC)" corresponding to the value "200" is found through the resource dictionary range defined by the field name "object _ class".
And loading the index '7' and the resource device type 'BSC' as the resource data into a web index cache.
It should be noted that some field names are common field names, and there is no corresponding resource dictionary, such as a character string field, a time field, a quantity field, and the like. The values of these fields do not need to search for the corresponding resource device type, and the indexes and values in the target data record are directly loaded into the web index cache as the resource data.
The web index cache is data available to a User Interface (UI).
And (3): the web front end is in long connection with the background server, newly added target data records are obtained from the background server, the target data records are added into the web index cache after the target data records are subjected to the supplementary conversion of the resources in the step (2), and the target data records are added into the web index cache until the total capacity of the web index cache reaches a set value of the capacity; the setting value is preferably 10 ten thousand.
Step S107: and the web front end draws a web data list according to the subscription condition. The method specifically comprises the following steps:
the web front end inquires a UI display template, analyzes the content contained in the column head of the display template and the display sequence of the content, and draws a web data list based on the content and the display sequence of the content.
Step S108: the web front end queries the web data list through the web index cache, and performs page turning, filtering and/or sorting operations, including:
dragging an upper scroll bar and a lower scroll bar in the web data list, executing page turning operation, corresponding to the field name to the index through a Hash Map cached at the front end of the web from the field name to the index, and acquiring and displaying data corresponding to a dragged area of the scroll bar from a web index cache according to the index;
selecting a funnel icon in a certain column head in the web data list, expanding an enumeration value list, selecting at least one enumeration value, executing filtering operation, corresponding the field name to an index through a Hash Map from the field name to the index cached at the front end of the web, filtering data from the web index cache according to the index, and pushing the filtered data to a UI (user interface);
and selecting a certain column in the web data list, executing sorting operation, corresponding the field name to the index through a Hash Map from the field name to the index cached at the front end of the web, sorting the data of the column from the web index cache according to the index, rearranging data records, and pushing the rearranged data to the UI.
The operation of the web front end is directly carried out on the query of the web index cache, then the query result is directly bound to the UI, and no interaction or network transmission exists between the web front end and the background server.
Referring to fig. 2, another embodiment of a web data list processing method of the present application is shown.
Steps S201 to S207 are the same as those in embodiments S101 to S107, and step S209 is the same as step S108, and are not repeated herein.
A maintenance step S208 for the web index cache may also be included after step S207:
the web front end acquires the changed target data record from the background server, replaces the original web index cache data after the resource is supplemented and converted, and updates the web index cache;
when the total capacity of the web index cache exceeds the set value of the capacity and a new target data record is transmitted, deleting the index cache data exceeding the set value of the web capacity, performing resource supplementary conversion on the new target data record, and adding the data after the supplementary conversion into the web index cache.
The web index caches are arranged in descending order according to the time sequence by default, and the index cache transmitted latest is stored in the top row of the web index caches. And when the index cache data needs to be deleted, deleting the latest index cache data, namely the earliest transmitted index cache data, in the web index cache, and adding the new target data record into the web index cache after performing resource supplement conversion. Wherein the number of pieces of deleted data is the same as the number of pieces of newly transmitted target data records.
The above deletion method is the preferred configuration of the present invention, and other arrangement orders of the web index cache and data positions of the deleted web index cache are not limited by the above description of the present application, and it is well known to those skilled in the art that the order may adopt other setting manners according to the present application.
For simplicity of description, the foregoing method embodiments are described as a series of acts or combination of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts described, as some steps may, in accordance with the present application, occur in other orders and concurrently; further, those skilled in the art should also appreciate that the above-described method embodiments are preferred embodiments and that the acts and modules involved are not necessarily required for the application.
Referring to fig. 3, a schematic structural diagram of an embodiment of a web data list processing apparatus according to the present application is shown, which specifically includes:
the connection module 31 is used for connecting the web front end with the background server;
the Hash mapping table building module 32 is used for the web front end and the background server side to build a Hash Map containing field names and indexes;
the sending module 33 is used for the web front end to send the subscription condition to the background server;
a receiving module 34, configured to receive, by the background server, a subscription condition request sent by the web front end;
the response module 35 is configured to construct, by the background server, a target data record including an index and a value according to the subscription condition request, and return the target data record to the web front end;
the web index cache constructing module 36 is used for receiving the target data record returned by the background server at the web front end and establishing a web index cache;
the web data list drawing module 37 is used for drawing a web data list by the web front end according to the subscription condition;
and the query module 38 is used for the web front end to query the web data list through the web index cache and perform page turning, filtering and/or sorting operations.
The web index cache building module 36 specifically includes:
the display unit is used for loading and displaying a preset number of target data records for the first time; the preset number is preferably 1000;
the conversion unit is used for performing supplementary conversion on resources according to the returned target data record, and specifically comprises:
the indexes in the target data records correspond to the field names through a Hash Map cached at the front end of the web and from the indexes to the field names, and then the resource equipment types corresponding to the values are searched from a resource dictionary according to the field names;
and loading the index and the resource equipment type or the index and the value after the supplement conversion into a web index cache as resource data, wherein the web index cache is stored at the front end of the web.
And the adding unit is used for keeping long connection between the web front end and the background server, acquiring a newly added target data record from the background server, performing resource supplement conversion on the target data record, and adding the target data record into the web index cache until the total capacity of the web index cache reaches the set value of the capacity. The setting value is preferably 10 ten thousand.
The query module 38 specifically includes:
a page turning unit for performing a page turning operation: dragging an upper scroll bar and a lower scroll bar in the web data list, executing page turning operation, corresponding to the field name to the index through a Hash Map cached at the front end of the web from the field name to the index, and acquiring and displaying data corresponding to a dragged area of the scroll bar from a web index cache according to the index;
a filtering unit for performing a filtering operation: selecting a funnel icon in a certain column head in the web data list, expanding an enumeration value list, selecting at least one enumeration value, executing filtering operation, corresponding the field name to an index through a Hash Map from the field name to the index cached at the front end of the web, filtering data from the web index cache according to the index, and pushing the filtered data to a UI (user interface);
a sorting unit for performing a sorting operation: and selecting a certain column in the web data list, executing sorting operation, corresponding the field name to the index through a Hash Map from the field name to the index cached at the front end of the web, sorting the data of the column from the web index cache according to the index, rearranging data records, and pushing the rearranged data to the UI.
Preferably, the apparatus may further include a maintenance module, configured to maintain the web index cache, and specifically include:
an updating unit, configured to update the web index cache: the web front end acquires the changed target data record from the background server, replaces the original web index cache data after the resource is supplemented and converted, and updates the web index cache;
a deletion unit configured to delete redundant index caches: when the total capacity of the web index cache exceeds the set value of the capacity and a new target data record is transmitted, deleting the index cache data exceeding the set value of the web capacity, performing resource supplementary conversion on the new target data record, and adding the data after the supplementary conversion into the web index cache.
The web index caches are arranged in descending order according to the time sequence by default, and the index cache transmitted latest is stored in the top row of the web index caches. And when the index cache data needs to be deleted, deleting the latest index cache data, namely the earliest transmitted index cache data, in the web index cache, and adding the new target data record into the web index cache after performing resource supplement conversion. Wherein the number of pieces of deleted data is the same as the number of pieces of newly transmitted target data records.
It should be noted that the above device embodiments belong to preferred embodiments, and the units and modules involved are not necessarily essential to the present application.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the device embodiments of the present application, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The web data list processing method and device provided by the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and the implementation manner of the present application, and the description of the above embodiment is only used to help understanding the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A method for processing a web data list, the method comprising:
the web front end is connected with the background server;
the method comprises the steps that a web front end and a background server construct a hash mapping table containing field names and indexes;
the web front end sends a subscription condition to the background server;
a background server receives a subscription condition request sent by a web front end;
the background server side constructs a target data record containing indexes and values according to the subscription condition request, and returns the target data record to the web front end;
the web front end receives the target data record returned by the background server end and establishes an index cache;
the web front end draws a web data list according to the subscription condition;
the web front end queries a web data list through the index cache and executes page turning, filtering and/or sequencing operations;
the method for constructing the hash mapping table containing the field names and the indexes by the web front end and the background server comprises the following steps:
the background server accesses the relational database, acquires the field names, analyzes the field names and the serial numbers corresponding to the field names, namely indexes, constructs a hash mapping table from the field names to the indexes, and caches the hash mapping table in the internal memory of the background server;
the method comprises the steps that a web front end obtains a hash mapping table from a field name to an index, cached by a background server, and caches the hash mapping table in a memory of the web front end; and converting according to the hash mapping table from the field name to the index, constructing the hash mapping table from the index to the field name, and caching the hash mapping table in a memory at the front end of the web.
2. The method of claim 1, wherein the receiving, by the backend server, the subscription condition request sent by the web front end comprises:
the background server receives subscription conditions sent by the web front end, the subscription conditions inform a data range needing to be subscribed, registration service is executed, after subscription is successful, database information is inquired, a data refreshing thread is started, and business data are monitored.
3. The method of claim 1, wherein the background server constructs a target data record containing an index and a value according to the subscription condition request, and returns the target data record to the web front end, and the method comprises:
the background server side obtains service data from a database and a real-time message queue, replaces field names in the service data with indexes according to a hash mapping table from the field names to the indexes cached by the background server side, constructs target data records containing indexes and values, and returns the target data records to the web front end.
4. The method of claim 1, wherein the web front end receives the target data record returned by the background server, and establishes an index cache, including:
loading and displaying a preset number of target data records for the first time;
and performing supplementary conversion of resources according to the returned target data records:
the indexes in the target data records are corresponding to the field names through a hash mapping table cached at the front end of the web from the indexes to the field names, and then the resource equipment types corresponding to the values are searched from a resource dictionary according to the field names;
taking the indexes and resource equipment types or indexes and values after the supplement conversion as resource data, and loading the resource data into an index cache, wherein the index cache is stored at the front end of the web;
and the web front end is in long connection with the background server, acquires a newly added target data record from the background server, supplements and converts the target data record as resources, and then adds the target data record into the index cache until the total capacity of the index cache reaches the set value of the capacity.
5. The method of claim 1, wherein after the steps of receiving a target data record sent by a background server at the web front end and establishing an index cache, the method further comprises:
the web front end acquires the changed target data record from the background server and updates the index cache;
and deleting the index cache data exceeding the set value of the index cache capacity.
6. The method of claim 1, wherein the web front end renders a list of web data according to the subscription condition, comprising:
the web front end queries a user interface display template, analyzes the content contained in the column head of the display template and the display sequence of the content, and draws a web data list based on the content and the display sequence of the content.
7. The method of claim 1, wherein the web front end queries the web data list through an index cache, and performs page turning, filtering and/or sorting operations, including:
dragging an upper scroll bar and a lower scroll bar in the web data list, executing page turning operation, corresponding to the field name to the index through a hash mapping table from the field name to the index cached at the front end of the web, and acquiring and displaying data corresponding to a scroll bar dragging area from the index cache according to the index;
selecting a funnel icon in a certain column head in the web data list, expanding an enumeration value list, selecting at least one enumeration value, executing filtering operation, corresponding to an index from a field name through a hash mapping table from the field name to the index cached at the front end of the web, filtering data from the index cache according to the index, and pushing the filtered data to a user interface;
selecting a certain column in the web data list, executing sorting operation, corresponding the field name to the index through a hash mapping table from the field name to the index cached at the front end of the web, sorting the data of the column from the index cache according to the index, rearranging the data, and pushing the rearranged data to a user interface.
8. A web data list processing apparatus, characterized in that the apparatus comprises:
the connection module is used for connecting the web front end with the background server;
the hash mapping table building module is used for building a hash mapping table containing field names and indexes by the web front end and the background server side;
the sending module is used for sending the subscription conditions to the background server by the web front end;
the receiving module is used for receiving the subscription condition request sent by the web front end by the background server;
the response module is used for the background server side to construct a target data record containing indexes and values according to the subscription condition request and return the target data record to the web front end;
the index cache construction module is used for receiving the target data record returned by the background server at the web front end and establishing an index cache;
the web data list drawing module is used for drawing a web data list by the web front end according to the subscription condition;
the query module is used for the web front end to query the web data list through the index cache and execute page turning, filtering and/or sequencing operations;
the index cache construction module comprises:
the display unit is used for loading and displaying a preset number of target data records for the first time;
the conversion unit is used for performing supplementary conversion on resources according to the returned target data record, and specifically comprises:
corresponding the index in the target data record to an universe name through a hash mapping table cached at the front end of the web from the index to the universe name, and searching a resource equipment type corresponding to a value from a resource dictionary according to the universe name;
taking the indexes and resource equipment types or indexes and values after the supplement conversion as resource data, and loading the resource data into an index cache, wherein the index cache is stored at the front end of the web;
and the adding unit is used for keeping long connection between the web front end and the background server, acquiring a newly added target data record from the background server, performing resource supplement conversion on the target data record, and adding the target data record into the index cache until the total capacity of the index cache reaches the set value of the capacity.
CN201611210340.2A 2016-12-24 2016-12-24 Web data list processing method and device Active CN108241657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611210340.2A CN108241657B (en) 2016-12-24 2016-12-24 Web data list processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611210340.2A CN108241657B (en) 2016-12-24 2016-12-24 Web data list processing method and device

Publications (2)

Publication Number Publication Date
CN108241657A CN108241657A (en) 2018-07-03
CN108241657B true CN108241657B (en) 2022-01-07

Family

ID=62704537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611210340.2A Active CN108241657B (en) 2016-12-24 2016-12-24 Web data list processing method and device

Country Status (1)

Country Link
CN (1) CN108241657B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651406B (en) * 2020-05-21 2023-07-25 杭州明讯软件技术有限公司 Automatic carrier scheduling system file reading method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102479207A (en) * 2010-11-29 2012-05-30 阿里巴巴集团控股有限公司 Information search method, system and device
CN104077397A (en) * 2014-07-01 2014-10-01 成都康赛信息技术有限公司 Response method for distributed big data classification retrieval webpage
CN104462455A (en) * 2014-12-16 2015-03-25 北京京东尚科信息技术有限公司 Method and device for displaying and processing network data
CN105122243A (en) * 2013-03-15 2015-12-02 亚马逊科技公司 Scalable analysis platform for semi-structured data

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101499097B (en) * 2009-03-16 2011-03-23 浙江工商大学 Hash table based data stream frequent pattern internal memory compression and storage method
CN102831120B (en) * 2011-06-15 2017-07-21 腾讯科技(深圳)有限公司 A kind of data processing method and system
GB2513140B (en) * 2013-04-16 2016-05-04 Canon Kk Methods, devices, and computer programs for streaming partitioned timed media data
IN2013MU04016A (en) * 2013-12-23 2015-08-07 Tata Consultancy Services Ltd
US9330104B2 (en) * 2014-04-30 2016-05-03 International Business Machines Corporation Indexing and searching heterogenous data entities

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102479207A (en) * 2010-11-29 2012-05-30 阿里巴巴集团控股有限公司 Information search method, system and device
CN105122243A (en) * 2013-03-15 2015-12-02 亚马逊科技公司 Scalable analysis platform for semi-structured data
CN104077397A (en) * 2014-07-01 2014-10-01 成都康赛信息技术有限公司 Response method for distributed big data classification retrieval webpage
CN104462455A (en) * 2014-12-16 2015-03-25 北京京东尚科信息技术有限公司 Method and device for displaying and processing network data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Clustered Segment Index Scheme for P2P VOD Service on Virtual Mesh Overlay Network";Pheng-Un Lim 等;《The transactions of The Korean Institute of Electrical Engineers》;20160601;第65卷(第6期);第1052-1059页 *

Also Published As

Publication number Publication date
CN108241657A (en) 2018-07-03

Similar Documents

Publication Publication Date Title
CN110659430B (en) Block chain browsing method supporting multi-block chain network
US10747951B2 (en) Webpage template generating method and server
JP4579501B2 (en) Application server and application program
CN110609865B (en) Information synchronization method, device and system
CN104348859B (en) File synchronisation method, device, server, terminal and system
CN105681477B (en) A kind of data access method and a kind of server
CN102291416A (en) Two-way synchronizing method and system of client-side and server-side
CN111221469B (en) Method, device and system for synchronizing cache data
CN111090674B (en) Search engine system based on hot words and cache
CN107506464A (en) A kind of method that HBase secondary indexs are realized based on ES
CN102882974A (en) Method for saving website access resource by website identification version number
CN104902327A (en) Method for updating and issuing page content, smart television and system
CN105100144A (en) Application updating method and device
CN105335186B (en) Data downloading management method and system
CN111414361A (en) Label data storage method, device, equipment and readable storage medium
CN108052661B (en) Aggregation retrieval method and device in distributed environment and readable storage medium
CN101751443A (en) Data searching and processing system as well as method
CN108241657B (en) Web data list processing method and device
CN102982034A (en) Internet website information search method and search system
CN105260486A (en) Data processing method, device and system
CN111177159A (en) Data processing system and method and data updating equipment
CN112689170B (en) Content playing method of display terminal, display terminal and readable storage medium
CN101808218A (en) Method, device and system for acquiring and updating content of electronic program guide
JPH1031615A (en) Distributed hyper media system
CN110334076B (en) Data processing method, system, server and device

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