CN108629003B - Content loading method and device - Google Patents

Content loading method and device Download PDF

Info

Publication number
CN108629003B
CN108629003B CN201810415867.1A CN201810415867A CN108629003B CN 108629003 B CN108629003 B CN 108629003B CN 201810415867 A CN201810415867 A CN 201810415867A CN 108629003 B CN108629003 B CN 108629003B
Authority
CN
China
Prior art keywords
data
identifier
result set
content loading
identifiers
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
CN201810415867.1A
Other languages
Chinese (zh)
Other versions
CN108629003A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201810415867.1A priority Critical patent/CN108629003B/en
Publication of CN108629003A publication Critical patent/CN108629003A/en
Application granted granted Critical
Publication of CN108629003B publication Critical patent/CN108629003B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The disclosure provides a content loading method and device. The content loading method comprises the following steps: responding to the content loading message, and acquiring a user identifier and a first preset number of data identifiers; inquiring the access authority of the user identifier to the data identifier, and adding the data corresponding to the data identifier with the access authority into a result set; and when the number of the data in the result set reaches a second preset number, displaying the data in the result set. The content loading method provided by the disclosure can improve the efficiency of loading the authority content and optimize the user experience.

Description

Content loading method and device
Technical Field
The present disclosure relates to the field of database technologies, and in particular, to a method and an apparatus for loading rights content based on a relational database.
Background
Data which is invisible to a user often needs to be filtered in a high-dimensional authority system, and data which the user does not have the right to view often needs to be filtered in a resource list for better user experience.
In the related art, the resource list is usually presented to the user by presenting a data identifier (key) or a small number of data items. Because a group of data is usually associated with a plurality of data tables, when a permission of a complex dimension exists, for example, access to a black and white list in a key value pair memory database, and also need to associate a data source other than a local database, a user often needs to click a data identifier or a data item for multiple times to access the database or other data sources for multiple times to obtain further information of the data. In the process, if the authority information of the data is located in a data table or other data sources with a deeper level, the data is difficult to be filtered in time, and the situation that a user clicks many times and finally finds that the data is not authorized to be referred is easy to occur.
Therefore, a method capable of efficiently filtering data invisible to a user when loading a resource list is required.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
An object of the present disclosure is to provide a content loading method and a content loading apparatus for overcoming, at least to some extent, the problem of inefficiency in filtering unauthorized viewing data due to limitations and disadvantages of the related art.
According to a first aspect of the embodiments of the present disclosure, there is provided a content loading method, including: responding to the content loading message, and acquiring a user identifier and a first preset number of data identifiers; inquiring the access authority of the user identifier to the data identifier, and adding the data corresponding to the data identifier with the access authority into a result set; and when the number of the data in the result set reaches a second preset number, displaying the data in the result set.
In an exemplary embodiment of the present disclosure, the fetching of the user identifier and the first preset number of data identifiers includes:
storing the data identifier in a hash table.
In an exemplary embodiment of the present disclosure, the querying access rights of the user identifier to the data identifier, and adding data corresponding to the data identifier having the access rights to a result set includes:
inquiring the validity of the data corresponding to the data identifier, and recording valid data;
and judging the access authority of the user identifier to the effective data, and adding the effective data with the access authority of the user identifier to the result set.
In an exemplary embodiment of the disclosure, the displaying the data in the result set when the number of data in the result set reaches a second preset number includes:
and when the data quantity in the result set reaches a second preset quantity, recording the currently inquired data identifier as a node identifier, and thus acquiring a first preset quantity of data identifiers by taking the next data identifier of the node identifier as a starting point when responding to the content loading message next time.
In an exemplary embodiment of the present disclosure, the obtaining the user identifier and the first preset number of data identifiers includes obtaining a ranking of the user identifiers; the querying the access right of the user identifier to the data identifier comprises:
and inquiring the access right of the user identifier to the data identifier in a data right table according to the sequence.
In an exemplary embodiment of the present disclosure, the content loading message includes a page open message and a page pull message.
In an exemplary embodiment of the present disclosure, further comprising:
and after querying the data identifiers with the first preset number, if the number of the data in the result set does not reach the second preset number, displaying the data in the result set.
According to a second aspect of the embodiments of the present disclosure, there is provided a content loading apparatus including:
the data loading module is set to respond to the content loading message and acquire the user identifier and a first preset number of data identifiers;
the authority filtering module is used for inquiring the access authority of the user identifier to the data identifier and adding the data corresponding to the data identifier with the access authority into a result set;
and the result display module is set to display the data in the result set when the number of the data in the result set reaches a second preset number.
According to a third aspect of the present disclosure, there is provided a content loading apparatus including: a memory; and a processor coupled to the memory, the processor configured to perform the method of any of the above based on instructions stored in the memory.
According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a program which, when executed by a processor, implements a content loading method as recited in any of the above.
According to the content loading method, the data which the user does not have the right to check is automatically filtered when the page is loaded, the complete field of the data which the user has the right to check is directly displayed, and the efficiency of checking the right data by the user can be improved. By setting the data quantity loaded each time and displaying the data when the data with the minimum display quantity is acquired each time, the data loading speed can be improved. In addition, the data identifier to be loaded is stored as the hash table, so that the page loading response speed can be further improved, and the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
Fig. 1 schematically shows a flowchart of a content loading method in an exemplary embodiment of the present disclosure.
Fig. 2 schematically shows a flowchart of a content loading method in an exemplary embodiment of the present disclosure.
Fig. 3 schematically illustrates a flow chart of a content loading method in an exemplary embodiment of the present disclosure.
Fig. 4 schematically illustrates a block diagram of a content loading apparatus in an exemplary embodiment of the present disclosure.
Fig. 5 schematically illustrates a block diagram of an electronic device in an exemplary embodiment of the disclosure.
Fig. 6 schematically illustrates a schematic diagram of a computer-readable storage medium in an exemplary embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Further, the drawings are merely schematic illustrations of the present disclosure, in which the same reference numerals denote the same or similar parts, and thus, a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The following detailed description of exemplary embodiments of the disclosure refers to the accompanying drawings.
Fig. 1 schematically shows a flowchart of a content loading method in an exemplary embodiment of the present disclosure. Referring to fig. 1, the content loading method 100 may include:
step S1, responding to the content loading message, and acquiring a user identifier and a first preset number of data identifiers;
step S2, inquiring the access authority of the user identifier to the data identifier, and adding the data corresponding to the data identifier with the access authority into a result set;
and step S3, when the number of the data in the result set reaches a second preset number, displaying the data in the result set.
According to the content loading method, the data which the user does not have the right to check is automatically filtered when the page is loaded, the complete field of the data which the user has the right to check is directly displayed, and the efficiency of checking the right data by the user can be improved. By setting the data quantity loaded each time and displaying the data when the data with the minimum display quantity is acquired each time, the data loading speed can be improved.
The steps of the content loading method 100 are explained in detail below.
In step S1, in response to the content loading message, the user identifier and the first preset number of data identifiers are acquired.
In an exemplary embodiment of the present disclosure, the content loading message includes a page open message and a page pull message. The page open message includes an open message of each page in the contents displayed in pages and an open message of the first screen in the contents displayed in succession. The page drop down message includes a view message of the continuously presented content showing content outside the first screen.
Because the method provided by the disclosure is mainly used for hiding the data which the User does not have the right to view and directly displaying the data which the User has the right to view, when the User opens a page, the User identifier (User ID) and the first preset number of data identifiers can be obtained for further permission judgment and data screening. At this time, the first preset number may be, for example, a value greater than the number of data for one page. For example, when there are 10 data per page on average, the first preset number may be 20 or more, for example. The larger the first preset quantity is, the more the data response speed can be guaranteed, but the more the memory is occupied correspondingly; the smaller the first preset number is, the smaller the memory occupation is, but accordingly, the page display meeting the conditions after one loading may not be met, and data needs to be loaded again. The setting of the first preset number can be set by a person skilled in the art according to the actual situation, and the disclosure is not limited thereto.
When the user pulls down the page, the first preset amount may be the same as the data set for the first screen data, or may be automatically adjusted according to the page pull-down progress. For example, the number of the first screen data is 10, and when a user opens a first screen page, 20 data are automatically loaded for screening; after the user pulls down the half page, the other 20 data can be continuously loaded for screening, and the other 10 data can be continuously loaded for screening according to the ratio of the page pulled down by the user to the screen and the loading quantity of the first screen. The adjustment strategy of the first preset number can be set by a person skilled in the art according to the actual situation, and the disclosure does not make any special limitation on this.
In an exemplary embodiment of the present disclosure, the taking the user identifier and the first preset number of data identifiers includes storing the data identifiers in a hash table.
A hash table (also called hash table) is a data structure that directly accesses a memory storage location (Value) according to a Key (Key). In the hash table, a function related to a key value is calculated, and data to be queried is mapped to a position in a memory to access a record, so that the searching speed is accelerated. This mapping function is called a hash function, and the array storing the records is called a hash table or hash table. By storing these data identifiers in the form of a hash table, the efficiency of data identification can be improved.
Step S2, querying the access right of the user identifier to the data identifier, and adding the data corresponding to the data identifier with access right to the result set.
Fig. 2 is a flow chart of an embodiment of the present disclosure. Referring to fig. 2, in some embodiments, step S2 may include:
step S21, inquiring the validity of the data corresponding to the data identifier, and recording the valid data;
step S22, determining the access right of the user identifier to the valid data, and adding the valid data with the access right of the user identifier to the result set.
In an exemplary embodiment of the present disclosure, the obtaining the user identifier and the first preset number of data identifiers includes obtaining a ranking of the user identifiers, and the querying of the access right of the user identifier to the data identifiers includes querying the access right of the user identifier to the data identifiers in a data rights table according to the ranking.
For example, the validity of the data (value) corresponding to the data identifier (key) may be sequentially identified according to the user identifier sorting. The validity may be, for example, whether the data is deleted. In the query process, the complete field of the effective data can be directly obtained, so that when the authority of the effective data is judged in the next step, other fields of the data do not need to be loaded repeatedly according to the data identifier in the loop body, and the method is equivalent to combining multiple independent SQL queries into one query operation, thereby reducing the times of database query operation, and reducing the network time consumption and the time consumption of operations such as lexical methods, grammar resolvers and the like as much as possible.
Next, it can be determined in various ways whether the user identifier has access to the valid data, and if so, the valid data is added to the result set. For example, for high dimensional access rights involving multi-table queries, it may be identified by the return value of the Canview function. The parameters of the Canview function are a user identifier and a data identifier, the return value is whether the user identifier has access right to the data pointed by the data identifier, the right is returned to 1, and the no right is returned to 0. No matter the method for inquiring the authority is adopted, user operation is not needed, interaction time and access times of the database are greatly saved, response efficiency is improved, and user experience is optimized.
And step S3, when the number of the data in the result set reaches a second preset number, displaying the data in the result set.
The preset minimum display quantity parameter, namely the second preset quantity, can be obtained, and when the quantity of the data in the result set reaches the second preset value, the data in the result set, namely the complete field of the effective data which the user has the right to read, is displayed for the user. The second preset number may be a number of one page of data. For example, the number of data of one page is 10, the first preset number set in step S1 is 20, and the second preset number set in this step may also be 10. Therefore, when 10 or more than 10 data meeting the conditions are screened out from the 20 data, a whole page of data can be displayed for the user, and the user is effectively prevented from perceiving the missing invalid or unauthorized data.
When the user pulls down the page, the second preset number may be the same as the setting of the first screen, or may be changed according to the page pull-down condition. As in the previous example, when the user pulls down the half-page, 10 new data may be returned as in the first screen, and even if only 5 new data can be displayed to the user, 5 new data may be directly returned to the user for loading after the user continues to pull down the page. In the exemplary embodiment of the disclosure, the second preset number is set to be an unchangeable value, so that the computing resources can be saved, data is loaded in advance for the user to pull down the page again, and the response speed is improved.
In addition, if the data quantity in the result set does not reach the second preset quantity after the first preset quantity of data identifiers are inquired, whether the first preset quantity of data covers the last data in the data to be checked or not can be judged, if so, the data in the result set does not have the possibility of further increase, and the data in the result set can be directly displayed; if not, the first preset number of identifiers can be automatically obtained again, and query and screening are carried out on the new data until the data in the result set reach the second preset number.
In an embodiment, the data identifiers may also be queried in batches with the second preset number as a limit, and whether to query the next batch is determined according to the query result. For example, if the first preset number is 20 and the second preset number is 10, the first 10 data identifiers may be queried first, and if the number of data in the result set after querying reaches 10, the second batch of querying is not needed; otherwise, inquiring the 10 subsequent data identifiers, judging whether the number of the data in the result set reaches 10, if so, returning the data in the result set, if not, acquiring the first preset number of data identifiers again, and inquiring the next batch until the number of the data in the result set reaches 10 or no new data identifiers can be acquired.
In addition, when the amount of data in the result set reaches a second preset amount, the data identifier of the current query may be recorded as the node identifier, so that the first preset amount of data identifiers is obtained starting from the next data identifier of the node identifier when the content loading message is responded next time. For example, if the data in the result set is judged to be equal to the second preset number 10 after the complete field of the data corresponding to the 15 th data identifier is added to the result set among the 20 acquired data identifiers, the 15 th data identifier may be recorded as the node identifier so that the number is counted from the 16 th data identifier when the data identifier is acquired next time. In some embodiments, the difference between the first predetermined amount and the last remaining amount may be obtained directly at the next time the data identifier is obtained for improvement. Also, as described in the above example, when there are 5 data identifiers not to be queried in the first display of the data in the result set, and the data identifiers are obtained again and the first preset number is still 20, 15 data identifiers may be obtained again so that the total number of data identifiers to be queried reaches 20 again.
The method and the device efficiently realize the loading of the data content of the filtering authority on the basis of not changing the original database structure. By circularly executing the mode of obtaining the data identifier in a paging mode and then filtering the access authority of the data identifier, the paging loading problem of high-dimensional authority resources in the relational database is efficiently solved. In order to accelerate execution and reduce the times of database query operations, all fields of data are loaded once instead of data identifiers when the query data is valid, so that the condition that other fields of the data are repeatedly loaded according to the data identifiers in a loop body when the access right is filtered is ensured, and equivalently, multiple independent SQL queries are combined into one query operation, the network time consumption and the time consumption of operations such as lexical methods and grammar resolvers are reduced as much as possible, and the response speed can be improved. In addition, the method provided by the invention does not need to accurately limit the number of each page of data, and can be widely applied to a wireless pull-down loading mechanism used by a mobile internet terminal.
The method 100 is described in detail below with specific application scenarios.
Fig. 3 is a flow chart of one embodiment of the present disclosure.
Referring to fig. 3, in step S301, a first preset number of data identifiers may be obtained and stored in the ordered identification array files, and the number size of elements in the array is set to the first preset number.
For example, when the first predetermined number is equal to 13, after obtaining 13 data identifiers, the array fields is [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], and size is equal to 13.
In step S302, the ordered tag array fields is converted to Hull, with Map < tag: the form of location > is cached.
The hash table may be initialized and cached according to fields (in the disclosed embodiment the relationship of data identifier key and data integrity field value uses "═ connection):
{2=>1,3=>2,4=>3,5=>4,6=>5,7=>6,8=>7,9=>8,10=>9,11=>10,12=>11,13=>12,14=>13}。
the caching method may be, for example, initializing i to 0, writing the key-value pair of < files [ i ]: i > into the hash table when i is smaller than size, and incrementing i by 1 until i equals size.
In step S033, a minimum display number parameter (a second preset number) per page per _ page, a query node parameter end _ id, and a result set results are obtained, and the above parameters are initialized if they do not exist. For example, per _ page may be initialized to 5, end _ id to 0, and results to an empty set.
In step S304, it is determined whether the result set results is less than per _ page, and if so, the process proceeds to step S35, otherwise, the process proceeds to S39.
In step S305, whether end _ id +1 is smaller than size is judged, if yes, the flow goes to step S306 to set the identifier array to be queried, fields2, to fields [ end _ id + 1-end ], otherwise, fields2 is set to be an empty array.
After initializing end _ id to 0, fields2 is [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] since end _ id +1< 13.
In step S307, with fields2 as the range of the in statement, the database is queried for valid data in fields2 with limit _ per _ page, and the full field of the valid data is added to the temporary set tmp.
The valid data may be looked up through a data table as shown in table 1.
TABLE 1
Identification id Whether deleted or not Permission-related field CanView Resource content
1 Whether or not 1
2 Is that 1
3 Whether or not 0
4 Whether or not 1
5 Whether or not 1
6 Is that 1
7 Whether or not 1
8 Whether or not 0
9 Whether or not 1
10 Is that 1
11 Whether or not 1
12 Whether or not 1
13 Whether or not 0
14 Whether or not 1
15 Whether or not 1
In table 1, the data identifier ID field identifies a data whose deleted indicates whether the data has been soft-deleted, is 1, or is 0. To simplify the irrelevant content, a plurality of data content fields that may appear in table 1 are shown merged for one field content.
With the data of fields2 as the query range, a valid SQL query is executed on the database by determining whether the deleted is 0, and the complete field of the valid data is returned, and finally the temporary set tmp is generated [ resource 4, resource5, resource7, resource8 ].
In step S308, it is determined whether the temporary set tmp is empty, if so, indicating that no available resources are subsequently available, the loop jumps to step S311, otherwise, the process proceeds to step S309.
In step S309, access rights are filtered for the temporary set tmp by using the CanView function, resulting in result sets results, and the last data identifier of the temporary result set is obtained by end _ id ═ map.
As shown in table 1, assuming that the current user is user and the data identifier is ID, the high-dimensional-rights field (possibly related to other database tables) can be converted into a field CanView with a value of 0 or 1 through a function CanView (ID, user). And judging tmp according to a CanView function, and acquiring a set of data with the CanView field equal to 1. Get (8) is 7 when end _ id is updated if the first query results set [ resource 4, resource5, resource7 ].
In step S310, it is determined that the number of elements included in results is less than per _ page, if yes, the process returns to step S305, otherwise, the process proceeds to step S311.
Continuing to step S309, when finding that the number of elements contained in the results is 3, which is less than the size, returning to step S35, updating field 2 ═ 9, 10, 11, 12, 13, 14], continuing to execute an SQL query to the database using the new end _ id and field 2, resulting in a temporary set tmp of valid data ═ resource9, resource11, resource12, resource13, resource14], then performing the authority filtering operation again according to the CanView function, resulting in new results being [ resource 4, resource5, resource7, resource9, resource11, resource12, resource14], finding that the number of elements contained in the results is greater than or equal to the size, and entering step S39.
At step S39, end _ id and final result set results are returned. The end _ id is used as a parameter when the client or the front end requests content loading again, and indicates the position of the current data screening.
Subsequent pull-down page loads to the same fields need only start from step S33 and may reuse the map, with queries requiring only the time complexity of O (1).
The beneficial technical effects of this application include at least:
(1) the infinite pull-down paging loading mode has good adaptability, and in the era of mobile internet, the authority filtering based on the relational database is required to be used in various websites comprising the authority system, so that the application range is wide.
(2) The problems that complex authority filtering is difficult to realize only by using a standard SQL language in a relational database and multi-table connection efficiency is low are solved.
(3) The data location information is stored by a hash table, so that only the time complexity of O (1) is needed for repeatedly searching data.
(4) The execution efficiency on a computer and a relational database is high, and SQL queries are not required to be executed for multiple times in a loop body in the authority filtering stage.
Corresponding to the above method embodiment, the present disclosure also provides a content loading apparatus, which may be used to execute the above method embodiment.
Fig. 4 schematically illustrates a block diagram of a content loading apparatus in an exemplary embodiment of the present disclosure.
Referring to fig. 4, the content loading apparatus 400 may include:
a data loading module 402 configured to respond to the content loading message and obtain a user identifier and a first preset number of data identifiers;
an authority filtering module 404 configured to query the access authority of the user identifier to the data identifier, and add the data corresponding to the data identifier having the access authority to a result set;
a result display module 406 configured to display the data in the result set when the number of data in the result set reaches a second preset number.
Since the functions of the apparatus 400 have been described in detail in the corresponding method embodiments, the disclosure is not repeated herein.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 500 according to this embodiment of the invention is described below with reference to fig. 5. The electronic device 500 shown in fig. 5 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the electronic device 500 is embodied in the form of a general purpose computing device. The components of the electronic device 500 may include, but are not limited to: the at least one processing unit 510, the at least one memory unit 520, and a bus 530 that couples various system components including the memory unit 520 and the processing unit 510.
Wherein the storage unit stores program code that is executable by the processing unit 510 to cause the processing unit 510 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, the processing unit 510 may execute step S1 as shown in fig. 1: responding to the content loading message, and acquiring a user identifier and a first preset number of data identifiers; step S2: inquiring the access authority of the user identifier to the data identifier, and adding the data corresponding to the data identifier with the access authority into a result set; step S3: and when the number of the data in the result set reaches a second preset number, displaying the data in the result set.
The memory unit 520 may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM)5201 and/or a cache memory unit 5202, and may further include a read only memory unit (ROM) 5203.
Storage unit 520 may also include a program/utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 530 may be one or more of any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 500 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 500, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 500 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 550. Also, the electronic device 500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 560. As shown, the network adapter 560 communicates with the other modules of the electronic device 500 over the bus 530. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 6, a program product 600 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (9)

1. A method for loading content, comprising:
responding to the content loading message, and acquiring a user identifier and a first preset number of data identifiers;
inquiring the validity of the data corresponding to the data identifier, recording valid data, and acquiring a complete field of the valid data;
judging the access authority of the user identifier to the valid data, and adding the complete field of the valid data with the access authority of the user identifier into a result set;
inquiring the data identifiers in batches with a second preset quantity as a limit, and judging whether to inquire the next batch according to an inquiry result;
and when the quantity of the data in the result set reaches the second preset quantity, displaying the data in the result set.
2. The content loading method of claim 1, wherein the taking the user identifier and the first preset number of data identifiers comprises:
storing the data identifier in a hash table.
3. The content loading method of claim 1, wherein displaying the data in the result set when the amount of data in the result set reaches a second preset amount comprises:
and when the data quantity in the result set reaches a second preset quantity, recording the currently inquired data identifier as a node identifier, and thus acquiring a first preset quantity of data identifiers by taking the next data identifier of the node identifier as a starting point when responding to the content loading message next time.
4. The content loading method of claim 1, wherein the obtaining the user identifier and the first preset number of data identifiers comprises obtaining a ranking of the user identifiers; the querying the access right of the user identifier to the data identifier comprises:
and inquiring the access right of the user identifier to the data identifier in a data right table according to the sequence.
5. The content loading method of claim 1, wherein the content loading message comprises a page open message and a page pull down message.
6. The content loading method according to claim 1, further comprising:
and after querying the data identifiers with the first preset number, if the number of the data in the result set does not reach the second preset number, displaying the data in the result set.
7. A content loading apparatus, comprising:
the data loading module is set to respond to the content loading message and acquire the user identifier and a first preset number of data identifiers;
the data query module is set to query the validity of the data corresponding to the data identifier, record the valid data and acquire the complete field of the valid data;
the authority filtering module is used for judging the access authority of the user identifier to the effective data and adding the complete field of the effective data with the access authority of the user identifier into a result set;
the batch query module is used for querying the data identifiers in batches with a second preset quantity as a limit and judging whether to query the next batch according to a query result;
and the result display module is set to display the data in the result set when the data quantity in the result set reaches the second preset quantity.
8. An electronic device, comprising:
a memory; and
a processor coupled to the memory, the processor configured to perform the content loading method of any of claims 1-6 based on instructions stored in the memory.
9. A computer-readable storage medium on which a program is stored, the program implementing the content loading method according to any one of claims 1 to 6 when executed by a processor.
CN201810415867.1A 2018-05-03 2018-05-03 Content loading method and device Active CN108629003B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810415867.1A CN108629003B (en) 2018-05-03 2018-05-03 Content loading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810415867.1A CN108629003B (en) 2018-05-03 2018-05-03 Content loading method and device

Publications (2)

Publication Number Publication Date
CN108629003A CN108629003A (en) 2018-10-09
CN108629003B true CN108629003B (en) 2021-05-11

Family

ID=63695308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810415867.1A Active CN108629003B (en) 2018-05-03 2018-05-03 Content loading method and device

Country Status (1)

Country Link
CN (1) CN108629003B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113761088A (en) * 2020-07-01 2021-12-07 北京沃东天骏信息技术有限公司 Method and device for processing position data

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9195759B2 (en) * 2012-03-27 2015-11-24 Varonis Systems, Ltd. Method and apparatus for enterprise-level filtered search
CN102663144A (en) * 2012-05-22 2012-09-12 山西优府信息技术开发有限公司 Complex permission information paging scheme
CN103942213B (en) * 2013-01-21 2018-09-04 腾讯科技(深圳)有限公司 data paging method and device
CN104615726B (en) * 2015-02-06 2017-12-22 北京神舟航天软件技术有限公司 A kind of method based on slow loading technique displaying a large number of services object
CN105843956A (en) * 2016-04-14 2016-08-10 北京搜狐新媒体信息技术有限公司 Paging query method and system
CN107515879B (en) * 2016-06-16 2021-03-19 伊姆西Ip控股有限责任公司 Method and electronic equipment for document retrieval
CN106126753B (en) * 2016-08-23 2019-03-05 易联众信息技术股份有限公司 The method of increment extraction based on big data
CN107784009A (en) * 2016-08-29 2018-03-09 中兴通讯股份有限公司 Data query, data query processing method and processing device

Also Published As

Publication number Publication date
CN108629003A (en) 2018-10-09

Similar Documents

Publication Publication Date Title
US9002905B2 (en) Rapidly deploying virtual database applications using data model analysis
KR101976220B1 (en) Recommending data enrichments
US8868595B2 (en) Enhanced control to users to populate a cache in a database system
US20100125828A1 (en) Data transformation based on a technical design document
CN108153716B (en) Form processing method and device, storage medium and electronic equipment
CN112434015B (en) Data storage method and device, electronic equipment and medium
CN112181924A (en) File conversion method, device, equipment and medium
CN115729912A (en) Database access system, database access method, computer device, and storage medium
US9043371B1 (en) Storing information in a trusted environment for use in processing data triggers in an untrusted environment
CN108629003B (en) Content loading method and device
CN108694172B (en) Information output method and device
CA3089289C (en) System and methods for loading objects from hash chains
WO2021108416A1 (en) Object-based search processing
US10956386B2 (en) Methods and apparatuses for automated performance tuning of a data modeling platform
US11157506B2 (en) Multiform persistence abstraction
CN111753141A (en) Data management method and related equipment
CN111367500A (en) Data processing method and device
CN110716911A (en) Data processing method and device, electronic equipment and storage medium
US8224822B2 (en) Template based entity transformation
CN113722007A (en) Configuration method, device and system of VPN branch equipment
CA2839571A1 (en) Data driven synthesizer
CN116257673A (en) Data query method, device, equipment and storage medium based on elastic search
CN116048468A (en) Method, device, electronic equipment and medium for loading cache data and processing data
CN114723532A (en) Order operation limiting method, device, equipment and storage medium
CN113779078A (en) Cache data acquisition method 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