CN113010596B - Method, device, equipment and storage medium for constructing dynamic performance view - Google Patents

Method, device, equipment and storage medium for constructing dynamic performance view Download PDF

Info

Publication number
CN113010596B
CN113010596B CN202110298263.5A CN202110298263A CN113010596B CN 113010596 B CN113010596 B CN 113010596B CN 202110298263 A CN202110298263 A CN 202110298263A CN 113010596 B CN113010596 B CN 113010596B
Authority
CN
China
Prior art keywords
dynamic performance
performance view
information
target
view
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
CN202110298263.5A
Other languages
Chinese (zh)
Other versions
CN113010596A (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.)
Shanghai Dameng Database Co Ltd
Original Assignee
Shanghai Dameng Database 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 Shanghai Dameng Database Co Ltd filed Critical Shanghai Dameng Database Co Ltd
Priority to CN202110298263.5A priority Critical patent/CN113010596B/en
Publication of CN113010596A publication Critical patent/CN113010596A/en
Application granted granted Critical
Publication of CN113010596B publication Critical patent/CN113010596B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/26Visual data mining; Browsing structured data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a storage medium for constructing a dynamic performance view, wherein the method comprises the following steps: acquiring target information input by a user, and determining information to be constructed according to the target information; determining basic information of a target dynamic performance view according to the information to be constructed and a predetermined dynamic performance view array; and constructing the target dynamic performance view according to the basic information of the target dynamic performance view. The method solves the problem that when the dynamic performance view is changed, the database must be upgraded, the dynamic performance view is constructed through the dynamic performance view array, and the dynamic performance view array depends on the execution of the server, so after the dynamic performance view is modified, the server can normally access the new dynamic performance view after updating, the basic information of the dynamic performance view is not required to be recorded in a system table, the database is not required to be upgraded, the normal use and work of a user are not influenced, the user time is not required to be saved, and the user experience is improved.

Description

Method, device, equipment and storage medium for constructing dynamic performance view
Technical Field
The embodiment of the invention relates to the technical field of databases, in particular to a method, a device, equipment and a storage medium for constructing a dynamic performance view.
Background
The dynamic performance view is used to query the database for information that varies with system state, such as execution records of SQL statements, cache pool usage status, initialization (INI) parameters for the current session, and so forth. In fact, in some databases, the data of the dynamic performance view is not stored on disk, but rather the corresponding interface is invoked by the server to construct the data in real time when the user accesses the dynamic performance view.
In the original implementation of the database, the basic information of the dynamic performance view is firstly recorded in a system table, and when the dynamic performance view is accessed, the basic information is loaded from the system table to create the dynamic performance view. When a new dynamic performance view is added or an original dynamic performance view is modified or deleted, the system table in the database of the user needs to be synchronously modified, so that after the server is updated, in order to ensure that the updated server can normally access the new dynamic performance view, an upgrade process is also required to be carried out on the database of the user to update the system table in the database. Frequent upgrades affect normal use and work of the user, and waste user time and reduce user experience.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for constructing a dynamic performance view, which are used for realizing rapid construction of the dynamic performance view.
In a first aspect, an embodiment of the present invention provides a method for constructing a dynamic performance view, where the method includes:
acquiring target information input by a user, and determining information to be constructed according to the target information;
determining basic information of a target dynamic performance view according to the information to be constructed and a predetermined dynamic performance view array;
and constructing the target dynamic performance view according to the basic information of the target dynamic performance view.
In a second aspect, an embodiment of the present invention further provides an apparatus for building a dynamic performance view, where the apparatus includes:
the acquisition module is used for acquiring target information input by a user and determining information to be constructed according to the target information;
the information determining module is used for determining basic information of a target dynamic performance view according to the information to be constructed and a predetermined dynamic performance view array;
and the view construction module is used for constructing the target dynamic performance view according to the basic information of the target dynamic performance view.
In a third aspect, an embodiment of the present invention further provides a computer apparatus, including:
one or more processors;
storage means for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement a method for building a dynamic performance view according to any one of the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention further provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for building a dynamic performance view according to any of the embodiments of the present invention.
The embodiment of the invention provides a method, a device, equipment and a storage medium for constructing a dynamic performance view, which are used for acquiring target information input by a user and determining information to be constructed according to the target information; determining basic information of a target dynamic performance view according to the information to be constructed and a predetermined dynamic performance view array; the method solves the problem that the database must be upgraded when the dynamic performance view is changed, and the dynamic performance view array is constructed by the dynamic performance view array, and the dynamic performance view array depends on the execution of the server, so after the dynamic performance view is modified, the server can normally access the new dynamic performance view after updating, the basic information of the dynamic performance view is not required to be recorded in a system table, the database is not required to be upgraded, the normal use and work of a user are not influenced, the user time is not required to be saved, and the user experience is improved.
Drawings
FIG. 1 is a flow chart of a method for constructing a dynamic performance view in accordance with a first embodiment of the present invention;
FIG. 2 is a diagram showing basic information of a dynamic performance view according to a first embodiment of the present invention;
FIG. 3 is a flow chart of a method for constructing a dynamic performance view in a second embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a construction device for dynamic performance view in the third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device in a fourth embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings. It should be understood that the described embodiments are merely some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
In the description of this application, it should be understood that the terms "first," "second," "third," and the like are used merely to distinguish between similar objects and are not necessarily used to describe a particular order or sequence, nor should they be construed to indicate or imply relative importance. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art as the case may be. Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Example 1
Fig. 1 is a flowchart of a method for constructing a dynamic performance view according to a first embodiment of the present invention, where the method may be performed by a computer device loaded with a database, and the method may be implemented by running the database, where the computer device may be configured by two or more physical entities or may be configured by one physical entity, where the method may be applicable to a case where the dynamic performance view may be quickly constructed without upgrading a database system when the database is used. In general, the computer device may be a notebook, desktop, smart tablet, or the like.
It should be noted that, an application environment of the method for implementing the dynamic performance view according to this embodiment may be described as follows: when a user uses the database, if the user needs to perform data query through the dynamic performance view, the dynamic performance view is constructed first. In existing implementations, the dynamic performance view is built from a system table stored in a database. However, since the functionality of the database is continuously perfected, if a developer of the database modifies the dynamic performance view of the database, for example, adds, modifies, deletes, etc., the server on which the database depends is updated. At this time, if the user needs to use the latest version of the database, the user needs to update the system table in the database, so as to construct a dynamic performance view by using the latest system table later. Therefore, when the dynamic performance view is constructed by the construction method in the prior art, if the dynamic performance view is changed, the database used by the construction method needs to be updated, the system table is updated, the normal use and work of a user are affected, and meanwhile, the time of the user is wasted by system updating.
The method for constructing the dynamic performance view can construct the dynamic performance view through the dynamic performance view array, and can quickly construct the dynamic performance view without updating a database after the dynamic performance view is modified, so that the problems of the prior art are overcome.
As shown in fig. 1, the method for constructing a dynamic performance view provided in the first embodiment specifically includes the following steps:
s110, acquiring target information input by a user, and determining information to be constructed according to the target information.
In this embodiment, the target information may be specifically understood as information input when the user has a need to access the dynamic performance view. In practical application, when a user uses the database, if the user wants to query certain information queried through the dynamic performance view, the user only needs to input target information on the input interface. The information to be constructed can be understood in particular as the information required for constructing the dynamic performance view.
The target information input by the user is obtained through monitoring the operation of the user, when the user uses the database to query data, the queried information can be real-time information constructed and obtained through the dynamic performance view or information stored in other modes, and the target information in the embodiment of the application is information required for constructing the dynamic performance view. That is, when a user queries the database, the query mode needs to be distinguished, and the query mode can be a query through a dynamic performance view or other modes, and information input by the user needing to be queried through the dynamic performance view is used as target information. Therefore, it is necessary to distinguish whether the information input by the user is target information according to the information input by the user, and in order to provide a method for constructing a dynamic performance view, the method for distinguishing whether the information input by the user is target information may be consistent with the existing method for distinguishing target information when constructing the dynamic performance view, which is not limited in the embodiments of the present application. The information to be constructed required for constructing the dynamic performance view is determined according to the target information input by the user, and the target information can be directly used as the information to be constructed, or the information associated with the target information can be used as the information to be constructed.
S120, basic information of the target dynamic performance view is determined according to the information to be constructed and the preset dynamic performance view array.
In this embodiment, the dynamic performance view array may be specifically understood as a global array storing basic information of one or more dynamic performance views. The size of the dynamic performance view array is determined according to the specific situation, and if the number of the dynamic performance views is more, the number of the members of the dynamic performance view array is more; if the number of dynamic performance views is smaller, then fewer members of the dynamic performance view array are available. Generally, the number of members of the dynamic performance view array is the same as the number of dynamic performance views, and a group of members corresponds to a dynamic performance view and describes basic information of a dynamic performance view. The target dynamic performance view can be specifically understood as a dynamic performance view matched with the target information, namely, a dynamic performance view corresponding to the information to be queried by the user.
Searching a dynamic performance view array through the information to be constructed, finding a dynamic performance view matched with the information to be constructed in the dynamic performance view array, taking the dynamic performance view as a target dynamic performance view, and determining corresponding basic information. It is known that each dynamic performance view corresponds to a set of basic information.
Further, the basic information includes at least one of: table names of dynamic performance views, table identifications of dynamic performance views, belonging mode identifications, column information, index information and synonym information; wherein, the column information, the index information and the synonym information are all arrays. Each member of the column array corresponding to the column information describes a column name, a column identification, a type, an accuracy, whether the column can be empty or not, and a default value of one column in the dynamic performance view; each member of the index array corresponding to the index information describes an index name, index identity, and KEY value (KEY) array of an index in the dynamic performance view; each member of the synonym array corresponding to the synonym information describes each synonym of the dynamic performance view. For example, fig. 2 provides an exhibition diagram of basic information of a dynamic performance view, and the basic information of the dynamic performance view shown in fig. 2 includes a table name, a table identifier, a belonging mode identifier, column information, index information and synonym information, where the column information, the index information and the synonym information are each an array, and the exhibition diagram is directly shown in an array form. The column array and the index array each include a plurality of different information, and the members in the synonym array describe synonyms.
By defining the global array, the basic information of the dynamic performance view is stored, so that the memory object is directly constructed through the information in the array when the dynamic performance view is accessed, and a system table is not required to be accessed.
S130, constructing a target dynamic performance view according to the basic information of the target dynamic performance view.
After the target dynamic performance view which is required to be constructed currently is positioned in the dynamic performance view array, the target dynamic performance view is directly created according to the acquired basic information of the target dynamic performance view, and loading of the target dynamic performance view is completed. I.e. the framework of the target dynamic performance view is formed from the basic information of the target dynamic performance view.
The embodiment of the invention provides a construction method of a dynamic performance view, which comprises the steps of obtaining target information input by a user and determining information to be constructed according to the target information; determining basic information of a target dynamic performance view according to the information to be constructed and a predetermined dynamic performance view array; the method solves the problem that a database must be upgraded when the dynamic performance view is changed, and the dynamic performance view array is constructed by the dynamic performance view array, and the dynamic performance view array depends on a server for execution, so after the dynamic performance view is modified, the server can normally access a new dynamic performance view after updating, the basic information of the dynamic performance view is not required to be recorded in a system table, the storage resource of the system table is not occupied, the consumption of the dynamic performance view on the storage resource is eliminated, the database is not required to be upgraded, the normal use and work of a user are not influenced, the time of the user is not required to be saved by upgrading, and the user experience is improved. When loading the dynamic performance view, the dynamic performance view array is directly accessed to construct the dynamic performance view without scanning a system table and then constructing the dynamic performance view, so that the loading performance of the dynamic performance view is improved.
Example two
Fig. 3 is a flowchart of a method for constructing a dynamic performance view according to a second embodiment of the present invention. The technical scheme of the embodiment is further refined on the basis of the technical scheme, and specifically mainly comprises the following steps:
s210, acquiring target information input by a user, and determining information to be constructed according to the target information.
In this embodiment, the target information includes a table name of the dynamic performance view or a table identifier of the dynamic performance view; accordingly, determining the information to be constructed according to the target information may be optimized as:
A. when the target information is the table name of the dynamic performance view, determining the table name of the dynamic performance view as the information to be constructed; or determining the table identifier of the dynamic performance view according to the table name of the dynamic performance view and a predetermined table mapping relation, and determining the table identifier of the dynamic performance view as the information to be constructed.
In this embodiment, the table mapping relationship may be specifically understood as a mapping relationship between a table name and a table identifier (i.e., a table ID). When the target information is the table name of the dynamic performance view, the table name of the dynamic performance view can be directly used as the information to be constructed, or the table identifier of the corresponding dynamic performance view can be used as the information to be constructed by inquiring the table mapping relation determined in advance through the table name of the dynamic performance view.
It is known that in the database, the table names and the table identifications are unique and have a one-to-one correspondence, and when the table is created, the table names and the table identifications are uniquely determined.
B. When the target information is the table identifier of the dynamic performance view, the table identifier of the dynamic performance view is used as the information to be constructed; or determining the table name of the dynamic performance view according to the table identification of the dynamic performance view and a predetermined table mapping relation, and determining the table name of the dynamic performance view as the information to be constructed.
When the target information is the table identifier of the dynamic performance view, the table identifier of the dynamic performance view can be directly used as the information to be constructed, and the table name of the corresponding dynamic performance view can be used as the information to be constructed by inquiring the mapping relation of the table identifier of the dynamic performance view.
When the information to be constructed is the table name of the dynamic performance view, S220-S240 are executed; when the information to be constructed is a table identification of a dynamic performance view, S250-S270 are performed. S220-S240 and S250-S270 are two parallel schemes, and according to the specific data type of the information to be constructed, the basic information of the target dynamic performance view is determined in which way. After S240 or S270 is performed, S280 is performed.
S220, determining a key value corresponding to the table name according to the table name.
In a computer programming language, data storage may be selected by key values and corresponding values, such as hash tables, mapping keys (key values) to given values. The embodiment of the application determines basic information of the target dynamic performance view by means of a global hash table. And calculating a key value corresponding to the table name through a hash algorithm.
S230, inquiring a predetermined hash table according to the key value, and determining the target memory address.
In this embodiment, the target memory address may be specifically understood as a memory address in the dynamic performance view array. For example, the memory address corresponding to a member of the dynamic performance view array.
A hash table is generated in advance, and the hash table is a global hash table. The hash table is stored in the memory, and the hash table is required to be constructed every time the server is started, so that the dynamic performance view array is traversed once when the server is started, the key value is calculated by the table name of the dynamic performance view through a calculation mode of collecting the hash algorithm, the memory address of the dynamic performance view array item corresponding to the key value is stored in the hash table, and the hash table is formed through the mode.
And searching the hash table through the key value, finding the key value matched with the key value in the hash table, and determining the memory address corresponding to the key value as the target memory address.
S240, determining the basic information of the dynamic performance view corresponding to the target memory address in the dynamic performance view array as the basic information of the target dynamic performance view.
After the target memory address is determined, the dynamic performance view array is queried according to the target memory address, and the basic information of the corresponding dynamic performance view is determined as the basic information of the target dynamic performance view.
S250, acquiring a minimum dynamic performance view identifier.
In this embodiment, the minimum dynamic performance view identifier may be specifically understood as the minimum identifier in each dynamic performance view identifier.
Specifically, when defining the dynamic performance view array, the dynamic performance view arrays are sequentially arranged according to the order from small to large of the table identifiers. After the dynamic performance view array is determined, the minimum dynamic performance view identifier is determined, and the minimum dynamic performance view identifier can be stored and directly obtained from a storage address when needed.
S260, determining the difference value between the table identifier and the minimum dynamic performance view identifier as a target array index.
In this embodiment, the target array subscript may be specifically understood as an array subscript in the dynamic performance view array, which corresponds to the information to be constructed. And calculating the difference between the table identifier and the minimum dynamic performance view identifier, and determining the difference as a target array index.
It should be noted that, in the embodiment of the present application, the dynamic performance view arrays are sequentially arranged in the order from small to large according to the table identifier, or may be sequentially arranged in the order from large to small. Correspondingly, the method for determining the target array subscript is as follows: obtaining a maximum dynamic performance view identifier; and determining the difference value between the maximum dynamic performance view identifier and the table identifier as a target array index.
S270, determining the basic information of the dynamic performance view corresponding to the target array subscript in the dynamic performance view array as the basic information of the target dynamic performance view.
And inquiring the dynamic performance view array according to the target array subscript, and determining the basic information of the corresponding dynamic performance view as the basic information of the target dynamic performance view. For example, the dynamic performance view array arr [ ] includes five dynamic performance views, v1, v2, v3, v4, v5 in turn, wherein the minimum dynamic performance view is identified as 1, if the table of the target dynamic performance view is identified as 3, the difference 2 between 3 and 1 is used as the target array subscript, and the basic information of the dynamic performance view v3 corresponding to arr 2 is the basic information of the target dynamic performance view.
S280, constructing a target dynamic performance view according to the basic information of the target dynamic performance view.
S290, the target dynamic performance view is put into a cache, and the construction of the memory object of the target dynamic performance view is completed.
After the construction of the target dynamic performance view is completed, the target dynamic performance view is put into a cache, and the construction of the memory object of the target dynamic performance view can be completed.
And S291, when the user has the access right of the target view, filling data into the memory object of the target dynamic performance view, and displaying the filled memory object to the user.
After the memory object construction of the target dynamic performance view is completed, data is needed to be filled and inserted, so that information can be displayed to a user in response to the query of the user (namely, the target information input by the user). Before data filling, whether the user has the access right of the target view is judged, if the user has the access right of the target view, the data filling is carried out on the memory object of the target dynamic performance view, the data is inserted, the filled memory object is displayed for the user, and the response to the query operation of the user is realized.
Further, determining whether the user has the target view access right includes:
if the user accords with at least one of the following conditions, determining that the user has the target view access right;
the situations include:
the user has access to all dynamic performance views;
the user has the right to access the target dynamic performance view;
a system role in which the user has access to all dynamic performance views;
the user has a system role with access to the target dynamic performance view.
The user corresponds to any of the above cases, i.e. has the target view access rights. When the user is actually verified to have the target view access right, the user can be sequentially verified, and when one condition is met, the user is determined to have the target view access right, and other conditions are not verified.
For verification of system roles where the user has access to all dynamic performance views, in prior art implementations, some system roles VTIs will be granted access to all dynamic performance views at database initialization and these rights will be recorded in the system table SYSGRANTS. When the dynamic performance view is added, modified, or deleted, the system role VTI needs to be re-authorized, and the records in the system table SYSGRANTS need to be synchronously modified. Therefore, if the original implementation manner is still adopted, the modification of the system table is still avoided after the dynamic performance view is newly added, modified and deleted, namely, the user still needs to upgrade the database.
In order to thoroughly solve the problem that a user needs to upgrade the database of the user after adding, modifying and deleting dynamic performance views, the embodiment of the invention adjusts the authority checking strategy to a certain extent: the system role does not have actual authority, only serves as a mark, and directly judges whether the user has the system role meeting the requirements when the authority check is carried out, if the user has the system role meeting the requirements (namely, the user has the system role with the authority for accessing all dynamic performance views), the user is considered to have the authority for accessing all dynamic performance views; if not, continuing to judge whether the user meets other cases with the query authority according to the flow. Because the system role after adjustment no longer has actual authority, the authority of the system role does not need to be recorded in the system table SYSGRANTS, and therefore, after the dynamic performance view is newly added, modified and deleted, the record in the system table SYSGRANTS does not need to be modified, and a user does not need to upgrade the database.
The embodiment of the invention provides a construction method of dynamic performance views, provides two basic information determination modes of different target dynamic performance views, can determine different information to be constructed according to target information input by a user, and further selects the determination mode of the basic information of the corresponding target dynamic performance view according to the different information to be constructed so as to quickly position the target dynamic performance view in a dynamic performance view array. The method solves the problem that when the dynamic performance view is changed, the database is required to be upgraded, the dynamic performance view is constructed through the dynamic performance view array, and the dynamic performance view array depends on the execution of the server, so after the dynamic performance view is modified, the server can normally access the new dynamic performance view after updating, the basic information of the dynamic performance view is not required to be recorded in a system table, the storage resources of the system table are not occupied, the consumption of the storage resources by the dynamic performance view is eliminated, the upgrading processing of the database is not required, the normal use and the work of a user are not influenced, the time of the user is not required to be saved, and the user experience is improved. When loading the dynamic performance view, the dynamic performance view array is directly accessed to construct the dynamic performance view without scanning a system table and then constructing the dynamic performance view, so that the loading performance of the dynamic performance view is improved. Meanwhile, the original checking strategy of the access rights of the target view of the user is optimized, the access rights of the target view of the user can be checked without a system table, and the system table is prevented from being updated.
Example III
Fig. 4 is a schematic structural diagram of a device for constructing a dynamic performance view according to a third embodiment of the present invention, where the device includes: an acquisition module 31, an information determination module 32 and a view construction module 33.
The acquiring module 31 is configured to acquire target information input by a user, and determine information to be constructed according to the target information; an information determining module 32, configured to determine basic information of a target dynamic performance view according to the information to be constructed in combination with a predetermined dynamic performance view array; and a view construction module 33, configured to construct a target dynamic performance view according to the basic information of the target dynamic performance view.
The embodiment of the invention provides a construction device of a dynamic performance view, which solves the problem that a database must be upgraded when the dynamic performance view is changed, and the dynamic performance view array is constructed by the dynamic performance view array and depends on a server for execution, so that after the dynamic performance view is modified, the server can normally access a new dynamic performance view without recording basic information of the dynamic performance view in a system table, the storage resource of the system table is not occupied, the consumption of the dynamic performance view on the storage resource is eliminated, the database is not required to be upgraded, normal use and work of a user are not influenced, the user time is saved without upgrading, and the user experience is improved. When loading the dynamic performance view, the dynamic performance view array is directly accessed to construct the dynamic performance view without scanning a system table and then constructing the dynamic performance view, so that the loading performance of the dynamic performance view is improved.
Further, the target information comprises a table name of the dynamic performance view or a table identification of the dynamic performance view; correspondingly, the acquisition module 31 comprises:
a first construction unit, configured to determine, when the target information is a table name of a dynamic performance view, the table name of the dynamic performance view as information to be constructed; or determining the table identifier of the dynamic performance view according to the table name of the dynamic performance view and a predetermined table mapping relation, and determining the table identifier of the dynamic performance view as information to be constructed;
the second construction unit is used for taking the table identifier of the dynamic performance view as information to be constructed when the target information is the table identifier of the dynamic performance view; or determining the table name of the dynamic performance view according to the table identification of the dynamic performance view and a predetermined table mapping relation, and determining the table name of the dynamic performance view as information to be constructed.
Further, the information determination module 32 includes:
a key value determining unit, configured to determine, when the information to be configured is a table name of a dynamic performance view, a key value corresponding to the table name according to the table name;
the address determining unit is used for inquiring a predetermined hash table according to the key value and determining a target memory address;
the first information determining unit is used for determining the basic information of the dynamic performance view corresponding to the target memory address in the dynamic performance view array as the basic information of the target dynamic performance view.
Further, the information determination module 32 includes:
the identification acquisition unit is used for acquiring a minimum dynamic performance view identification when the information to be constructed is the table identification of the dynamic performance view;
a subscript determining unit, configured to determine a difference between the table identifier and the minimum dynamic performance view identifier as a target array subscript;
and the second information determining unit is used for determining the basic information of the dynamic performance view corresponding to the target array subscript in the dynamic performance view array as the basic information of the target dynamic performance view.
Further, the apparatus further comprises:
the object construction module is used for placing the target dynamic performance view into a cache to finish the construction of the memory object of the target dynamic performance view;
and the filling module is used for carrying out data filling on the memory object of the target dynamic performance view when the user has the access right of the target view, and displaying the filled memory object to the user.
Further, the apparatus further comprises:
the permission judging module is used for judging whether the user has the access permission of the target view;
the permission judging module is specifically configured to determine that the user has a target view access permission if the user meets at least one of the following conditions;
the situations include:
the user has the right to access all dynamic performance views;
the user has the right to access the target dynamic performance view;
the user has a system role with authority to access all dynamic performance views;
the user has a system role of rights to access the target dynamic performance view.
Further, the basic information includes at least one of: table names of dynamic performance views, table identifications of dynamic performance views, belonging mode identifications, column information, index information and synonym information;
wherein, the column information, the index information and the synonym information are all arrays.
The device for constructing the dynamic performance view provided by the embodiment of the invention can execute the method for constructing the dynamic performance view provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 5 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention, and as shown in fig. 5, the device includes a processor 40, a memory 41, an input device 42 and an output device 43; the number of processors 40 in the device may be one or more, one processor 40 being taken as an example in fig. 5; the processor 40, the memory 41, the input means 42 and the output means 43 in the device may be connected by a bus or by other means, in fig. 5 by way of example.
The memory 41 is a computer-readable storage medium that can be used to store a software program, a computer-executable program, and modules, such as program instructions/modules corresponding to the method of constructing a dynamic performance view in the embodiment of the present invention (e.g., the acquisition module 31, the information determination module 32, and the view construction module 33 in the apparatus for constructing a dynamic performance view). The processor 40 executes various functional applications of the device and data processing by running software programs, instructions and modules stored in the memory 41, i.e. implements the above-described construction method of the dynamic performance view.
The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 41 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 41 may further include memory located remotely from processor 40, which may be connected to the device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 42 may be used to receive entered numeric or character information and to generate key signal inputs related to user settings and function control of the device. The output means 43 may comprise a display device such as a display screen.
Example five
A fifth embodiment of the present invention also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method of building a dynamic performance view, the method comprising:
acquiring target information input by a user, and determining information to be constructed according to the target information;
determining basic information of a target dynamic performance view according to the information to be constructed and a predetermined dynamic performance view array;
and constructing the target dynamic performance view according to the basic information of the target dynamic performance view.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present invention is not limited to the method operations described above, and may also perform the related operations in the method for building the dynamic performance view provided in any embodiment of the present invention.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
It should be noted that, in the embodiment of the apparatus for constructing a dynamic performance view, each unit and module included in the apparatus are only divided according to the functional logic, but not limited to the above division, so long as the corresponding function can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (9)

1. A method for constructing a dynamic performance view, comprising:
acquiring target information input by a user, and determining information to be constructed according to the target information, wherein the target information comprises a table name of a dynamic performance view or a table identifier of the dynamic performance view;
determining basic information of a target dynamic performance view according to the information to be constructed and a predetermined dynamic performance view array, wherein the dynamic performance view array is a global array for storing basic information of one or more dynamic performance views, and the dynamic performance view array is executed by a server;
constructing a target dynamic performance view according to the basic information of the target dynamic performance view;
when the information to be constructed is the table name of the dynamic performance view, determining basic information of the target dynamic performance view according to the information to be constructed and combining a predetermined dynamic performance view array, wherein the basic information comprises the following steps:
determining a key value corresponding to the table name according to the table name;
inquiring a predetermined hash table according to the key value, and determining a target memory address;
and determining the basic information of the dynamic performance view corresponding to the target memory address in the dynamic performance view array as the basic information of the target dynamic performance view.
2. The method of claim 1, wherein determining information to be constructed from the target information comprises:
when the target information is the table name of the dynamic performance view, determining the table name of the dynamic performance view as information to be constructed; or,
determining a table identifier of the dynamic performance view according to the table name of the dynamic performance view and a predetermined table mapping relation, and determining the table identifier of the dynamic performance view as information to be constructed;
when the target information is the table identifier of the dynamic performance view, the table identifier of the dynamic performance view is used as the information to be constructed; or,
and determining the table name of the dynamic performance view according to the table identification of the dynamic performance view and a predetermined table mapping relation, and determining the table name of the dynamic performance view as information to be constructed.
3. The method according to claim 1, wherein when the information to be constructed is a table identifier of a dynamic performance view, correspondingly, determining basic information of a target dynamic performance view according to the information to be constructed in combination with a predetermined dynamic performance view array includes:
acquiring a minimum dynamic performance view identifier;
determining a difference value between the table identifier and the minimum dynamic performance view identifier as a target array subscript;
and determining the basic information of the dynamic performance view corresponding to the target array subscript in the dynamic performance view array as the basic information of the target dynamic performance view.
4. The method as recited in claim 1, further comprising:
the target dynamic performance view is put into a cache, and the construction of the memory object of the target dynamic performance view is completed;
and when the user has the access right of the target view, filling data into the memory object of the target dynamic performance view, and displaying the filled memory object to the user.
5. The method of claim 4, wherein determining whether the user has access to the target view comprises:
if the user accords with at least one of the following conditions, determining that the user has the target view access right;
the situations include:
the user has the right to access all dynamic performance views;
the user has the right to access the target dynamic performance view;
the user has a system role with authority to access all dynamic performance views;
the user has a system role of rights to access the target dynamic performance view.
6. The method according to any one of claims 1-5, wherein the basic information comprises at least one of: table names of dynamic performance views, table identifications of dynamic performance views, belonging mode identifications, column information, index information and synonym information;
wherein, the column information, the index information and the synonym information are all arrays.
7. A dynamic performance view building apparatus, comprising:
the acquisition module is used for acquiring target information input by a user and determining information to be constructed according to the target information, wherein the target information comprises a table name of a dynamic performance view or a table identifier of the dynamic performance view;
the information determining module is used for determining basic information of a target dynamic performance view according to the information to be constructed and a predetermined dynamic performance view array, wherein the dynamic performance view array is a global array for storing basic information of one or more dynamic performance views, and the dynamic performance view array is executed by a server;
the view construction module is used for constructing a target dynamic performance view according to the basic information of the target dynamic performance view;
the information determination module includes:
a key value determining unit, configured to determine, when the information to be configured is a table name of a dynamic performance view, a key value corresponding to the table name according to the table name;
the address determining unit is used for inquiring a predetermined hash table according to the key value and determining a target memory address;
the first information determining unit is used for determining the basic information of the dynamic performance view corresponding to the target memory address in the dynamic performance view array as the basic information of the target dynamic performance view.
8. A computer device, the device comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of building a dynamic performance view as recited in any of claims 1-6.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a method of constructing a dynamic performance view according to any of claims 1-6.
CN202110298263.5A 2021-03-19 2021-03-19 Method, device, equipment and storage medium for constructing dynamic performance view Active CN113010596B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110298263.5A CN113010596B (en) 2021-03-19 2021-03-19 Method, device, equipment and storage medium for constructing dynamic performance view

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110298263.5A CN113010596B (en) 2021-03-19 2021-03-19 Method, device, equipment and storage medium for constructing dynamic performance view

Publications (2)

Publication Number Publication Date
CN113010596A CN113010596A (en) 2021-06-22
CN113010596B true CN113010596B (en) 2024-02-23

Family

ID=76403655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110298263.5A Active CN113010596B (en) 2021-03-19 2021-03-19 Method, device, equipment and storage medium for constructing dynamic performance view

Country Status (1)

Country Link
CN (1) CN113010596B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103390066A (en) * 2013-08-08 2013-11-13 上海新炬网络技术有限公司 Database overall automation optimizing early warning device and processing method thereof
CN103631911A (en) * 2013-11-27 2014-03-12 中国人民大学 OLAP query processing method based on array storage and vector processing
CN103984726A (en) * 2014-05-16 2014-08-13 上海新炬网络技术有限公司 Local revision method for database execution plan
CN108027763A (en) * 2016-04-19 2018-05-11 森斯班克株式会社 The adjusting apparatus and method of relevant database
CN110168523A (en) * 2016-10-28 2019-08-23 微软技术许可有限责任公司 Change monitoring to inquire across figure
CN111698228A (en) * 2020-05-28 2020-09-22 中国平安财产保险股份有限公司 System access authority granting method, device, server and storage medium
CN112199390A (en) * 2020-09-30 2021-01-08 上海达梦数据库有限公司 Data query method, device, equipment and storage medium in database

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8402017B2 (en) * 2006-12-08 2013-03-19 International Business Machines Corporation Method for altering database views dependent on rules
US9430665B2 (en) * 2013-07-22 2016-08-30 Siemens Aktiengesellschaft Dynamic authorization to features and data in JAVA-based enterprise applications
US9544198B2 (en) * 2013-09-20 2017-01-10 Oracle International Corporation Dynamic role-based view definitions in a repository system
US11570004B2 (en) * 2019-06-13 2023-01-31 Fidelity Information Services, Llc Dynamic self-defined API via digital signatures

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103390066A (en) * 2013-08-08 2013-11-13 上海新炬网络技术有限公司 Database overall automation optimizing early warning device and processing method thereof
CN103631911A (en) * 2013-11-27 2014-03-12 中国人民大学 OLAP query processing method based on array storage and vector processing
CN103984726A (en) * 2014-05-16 2014-08-13 上海新炬网络技术有限公司 Local revision method for database execution plan
CN108027763A (en) * 2016-04-19 2018-05-11 森斯班克株式会社 The adjusting apparatus and method of relevant database
CN110168523A (en) * 2016-10-28 2019-08-23 微软技术许可有限责任公司 Change monitoring to inquire across figure
CN111698228A (en) * 2020-05-28 2020-09-22 中国平安财产保险股份有限公司 System access authority granting method, device, server and storage medium
CN112199390A (en) * 2020-09-30 2021-01-08 上海达梦数据库有限公司 Data query method, device, equipment and storage medium in database

Also Published As

Publication number Publication date
CN113010596A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
US11106816B2 (en) Database public interface
CN107480198B (en) Distributed NewSQL database system and full-text retrieval method
CN111464615B (en) Request processing method, device, server and storage medium
US20170161511A1 (en) Database public interface
CN111125169B (en) Data query method, control device, control medium and computer equipment
CN110298189B (en) Database authority management method and device
CN111061766A (en) Business data processing method and device, computer equipment and storage medium
CN113094370B (en) Data index construction method and device, storage medium and electronic equipment
CN115438087B (en) Data query method, device, storage medium and equipment based on cache library
CN113010476A (en) Metadata searching method, device and equipment and computer readable storage medium
CN111506611A (en) Data query method, device, equipment and storage medium
CN113010224A (en) Front-end micro-service method, device, computer equipment and storage medium
US20210149870A1 (en) Method, apparatus, and computer program product for improved tracking of state data
CN113010596B (en) Method, device, equipment and storage medium for constructing dynamic performance view
CN111639087B (en) Data updating method and device in database and electronic equipment
CN109254858B (en) Data sharing method, device and equipment of active window and storage medium
CN116450607A (en) Data processing method, device and storage medium
CN115114325A (en) Data query method and device, electronic equipment and storage medium
CN113420088A (en) Method, device and terminal for synchronizing cache database and database
CN111488360B (en) Line-level security realization method, device, equipment and storage medium
CN114020319A (en) Interface calling method, device, server and computer readable storage medium
CN107679093B (en) Data query method and device
CN112685474A (en) Application management method, device, equipment and storage medium
US11748203B2 (en) Multi-role application orchestration in a distributed storage system
CN111506606A (en) Report query method and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant