CN109101595B - Information query method, device, equipment and computer readable storage medium - Google Patents

Information query method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN109101595B
CN109101595B CN201810846114.6A CN201810846114A CN109101595B CN 109101595 B CN109101595 B CN 109101595B CN 201810846114 A CN201810846114 A CN 201810846114A CN 109101595 B CN109101595 B CN 109101595B
Authority
CN
China
Prior art keywords
attribute
information query
attributes
resource object
query request
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
CN201810846114.6A
Other languages
Chinese (zh)
Other versions
CN109101595A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810846114.6A priority Critical patent/CN109101595B/en
Publication of CN109101595A publication Critical patent/CN109101595A/en
Application granted granted Critical
Publication of CN109101595B publication Critical patent/CN109101595B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an information query method, an information query device, information query equipment and a computer readable storage medium, wherein the method comprises the following steps: receiving an information query request; if the attribute of the information query request is a preset general attribute, acquiring general attributes and corresponding attribute values of all resource objects in a resource object class corresponding to the information query request, searching the attribute values of the attribute corresponding to the information query request from the general attributes and returning; if the attribute of the information query request is a preset proprietary attribute, all attributes and corresponding attribute values of a specific resource object in the resource object class corresponding to the information query request are obtained, and the attribute value of the attribute corresponding to the information query request is searched and returned. Therefore, the purposes of short response time and slow response speed are achieved; and the effects of resource separation and attribute separation are achieved, on one hand, the expenses of a CPU and a memory are saved, on the other hand, the attributes are loosely coupled, and the expansion and maintenance are easier.

Description

Information query method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of storage technologies, and in particular, to an information query method, apparatus, device, and computer-readable storage medium.
Background
In storage management software, a GUI (Graphical User Interface) is responsible for presenting a large amount of information such as stored resource objects, alarm events, performance indexes, state information, and the like, and when it needs to respond to an information query request input by a User and output attribute values of corresponding resource objects to the User, attributes corresponding to the information query request are usually searched from all attributes included in all resource objects, and then the attribute values of the queried attributes are returned to the User, but this traversal query manner leads to a slow query speed, and further leads to a long response time and a slow response speed of the GUI.
In summary, the information query scheme of the GUI in the prior art has the problems of long time and slow speed for responding to the information query request.
Disclosure of Invention
The invention aims to provide an information query method, an information query device, information query equipment and a computer readable storage medium, which can solve the problems of long time and low speed for responding an information query request in an information query scheme of a GUI (graphical user interface) in the prior art.
In order to achieve the above purpose, the invention provides the following technical scheme:
an information query method, comprising:
receiving an information query request;
if the attribute of the information query request is a preset general attribute, acquiring general attributes and corresponding attribute values of all resource objects in a resource object class corresponding to the information query request, searching the attribute values of the attribute corresponding to the information query request from the general attributes and returning; if the attribute of the information query request is a preset proprietary attribute, acquiring all attributes and corresponding attribute values of specific resource objects in the resource object class corresponding to the information query request, searching the attribute values of the attributes corresponding to the information query request from the attribute values and returning the attribute values; wherein the attributes include generic attributes and proprietary attributes.
Preferably, before acquiring the attribute and the corresponding attribute value, the method further includes:
defining a resource object interface which has a one-to-one correspondence relation with each resource object class, and defining each attribute, attribute value of each attribute, attribute element contained in each attribute and attribute element value of each attribute element contained in all the resource objects in the corresponding resource object class in the resource object interface for obtaining.
Preferably, the obtaining of the general attributes and the corresponding attribute values of all resource objects in the resource object class corresponding to the information query request includes:
executing an mcsinq Is VDisk command to acquire general attributes and corresponding attribute values of all corresponding resource objects for the resource object class corresponding to the information query request, wherein the VDisk in the mcsinq Is VDisk command Is the name of a resource object interface of the resource object class corresponding to the information query request;
acquiring all attributes and corresponding attribute values of specific resource objects in the resource object class corresponding to the information query request, wherein the acquiring includes:
and executing an mcsinq Is VDisk ID command to obtain all attributes and corresponding attribute values of the specific resource object in the resource object class corresponding to the information query request, wherein the VDisk in the mcsinq Is VDisk ID command Is the name of a resource object interface of the resource object class corresponding to the information query request, and the ID Is the unique identifier of the specific resource object.
Preferably, after the mcsinq Is VDisk command Is executed to obtain the generic attributes and the corresponding attribute values of all the corresponding resource objects, the method further comprises the following steps:
storing a result obtained by executing an mcsinq Is VDisk command in a memory list according to lines as a first information list, wherein the first line of the first information list Is each attribute, and each resource object of each other line of the first information list corresponds to an attribute value of each attribute;
and separating each attribute or attribute value contained in each row in the first information list by using separators, and storing the attributes and the corresponding attribute values into key value pairs for searching the required attribute values.
Preferably, after the mcsinq Is VDisk ID command Is executed to acquire all the attributes and corresponding attribute values of the specific resource object, the method further includes:
storing a result obtained by executing the mcsinq Is VDisk ID in a memory list according to lines as a second information list, wherein each line in the second information list comprises each attribute and a corresponding attribute value of the specific resource object in a one-to-one corresponding mode;
and separating the attribute and the attribute value contained in each row in the second information list by using separators, and storing the attribute and the corresponding attribute value into key value pairs for searching the required attribute value.
Preferably, the searching for the attribute value of the attribute corresponding to the information query request includes:
and searching the attribute value of the attribute corresponding to the information query request from the key value pair corresponding to the first information list or the second information list, and decoding the searched attribute value into the attribute element value of the attribute element, namely the data type corresponding to the attribute.
An information inquiry apparatus comprising:
a receiving module to: receiving an information query request;
a first query module to: if the attribute of the information query request is a preset general attribute, acquiring general attributes and corresponding attribute values of all resource objects in a resource object class corresponding to the information query request, searching the attribute values of the attribute corresponding to the information query request from the general attributes and returning;
a second query module to: if the attribute of the information query request is a preset proprietary attribute, acquiring all attributes and corresponding attribute values of specific resource objects in the resource object class corresponding to the information query request, searching the attribute values of the attributes corresponding to the information query request from the attribute values and returning the attribute values; wherein the attributes include generic attributes and proprietary attributes.
Preferably, the method further comprises the following steps:
a definition module to: before the attributes and the corresponding attribute values are obtained, a resource object interface which has a one-to-one correspondence relation with each resource object class is defined, and each attribute, the attribute value of each attribute, the attribute element contained in each attribute and the attribute element value of each attribute element contained in all the resource objects in the corresponding resource object class are defined in the resource object interface for obtaining.
An information inquiry apparatus comprising:
a memory for storing a computer program;
a processor for implementing the steps of the information query method as described in any one of the above when the computer program is executed.
A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the information query method as set forth in any one of the preceding claims.
The invention provides an information query method, an information query device, information query equipment and a computer readable storage medium, wherein the method comprises the following steps: receiving an information query request; if the attribute of the information query request is a preset general attribute, acquiring general attributes and corresponding attribute values of all resource objects in a resource object class corresponding to the information query request, searching the attribute values of the attribute corresponding to the information query request from the general attributes and returning; if the attribute of the information query request is a preset proprietary attribute, acquiring all attributes and corresponding attribute values of specific resource objects in the resource object class corresponding to the information query request, searching the attribute values of the attributes corresponding to the information query request from the attribute values and returning the attribute values; wherein the attributes include generic attributes and proprietary attributes. In the technical scheme disclosed by the application, after an information query request of a user is received, when the information query request corresponds to a general attribute, the general attribute and the corresponding attribute value of all resource objects of a corresponding resource object class are obtained, then a required attribute value is queried from the general attribute and returned, when the information query request corresponds to a special attribute, all the attributes and the corresponding attribute values of a specific resource object of a corresponding resource object class are obtained, then the required attribute value is queried from the attribute values and returned, so that the method is different from the prior art that all the attributes of all the resource objects are traversed to obtain the corresponding attribute values and returned, but is equivalent to dividing the attributes of the same resource object class into different attribute sets, further when the information query request corresponds to different attributes, different attribute sets are obtained firstly, then the required attribute is queried from the obtained attribute sets, and the query range is greatly reduced by two-layer search, therefore, the query speed is improved, and the purposes of short response time and low response speed are achieved; in addition, the effects of resource separation and attribute separation are achieved through the method, on one hand, the expenses of a CPU and a memory are saved, on the other hand, the attributes are loosely coupled, and the expansion and maintenance are easier.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of an information query method according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a result of querying general attributes and corresponding attribute values of all volumes in an information querying method according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a result of querying all attributes and corresponding attribute values of a specific volume in an information querying method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an information query apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of an information query method according to an embodiment of the present invention is shown, where the method includes:
s11: an information query request is received.
It should be noted that, the subject of execution of the information query method provided by the embodiment of the present invention may be a corresponding device, and the device may be disposed in the GUI, so that the subject of execution of the information query method provided by the embodiment of the present invention may be the GUI, and the subject of execution is described as the GUI in the embodiment of the present invention. The information query request can be directly input into a computer to which the GUI belongs by a user, or can be sent to the GUI by the user through a terminal, or can be set according to actual needs; the information query request may carry names of resource objects and attributes that a user needs to query, the resource objects in the present application may include resource objects of multiple categories (resource object categories), such as a storage volume, computing software, and the like, and any category may include multiple resource objects of the same category.
S12: and if the attribute of the information query request is the preset general attribute, acquiring the general attributes and the corresponding attribute values of all resource objects in the resource object class corresponding to the information query request, searching the attribute values of the attribute corresponding to the information query request from the general attributes and returning.
It should be noted that, in the present application, the general attribute and the proprietary attribute may be set by the staff according to actual needs, generally speaking, for any resource object class, a probability threshold may be set, if the probability of any attribute included in the any resource object class is greater than the probability threshold, it is determined that any attribute is the general attribute, otherwise, it is the proprietary attribute; for any resource object class, an access threshold may be set, and if the frequency of any attribute contained in the resource object class, which is acquired by the user within the current preset time period (the time period set according to actual needs), is greater than the access threshold, it is determined that the attribute is a general attribute, otherwise, it is a specific attribute; other settings can be performed according to actual needs; in short, generic attributes are commonly used attributes, while proprietary attributes are less commonly used attributes. If the attribute name carried in the information query request corresponds to the general attribute, the general attributes of all resource objects in the resource object class corresponding to the resource object name carried in the information query request and the attribute value of each general attribute are firstly obtained, then the attribute values of the resource objects corresponding to the resource object name and the attribute name carried in the information query request are searched, and the attribute values are returned to the user.
S13: if the attribute of the information query request is a preset special attribute, acquiring all attributes and corresponding attribute values of specific resource objects in the resource object class corresponding to the information query request, searching the attribute values of the attributes corresponding to the information query request from the attribute values and returning; the attributes include generic attributes and proprietary attributes.
If the attribute name carried in the information query request corresponds to the proprietary attribute, all the attributes of a specific resource object (usually a specific resource object corresponding to the information query request) in the resource object class corresponding to the resource object name carried in the information query request and the attribute value of each attribute in all the attributes are firstly obtained, then the attribute value of the resource object corresponding to the resource object name and the attribute name carried in the information query request is searched, and the attribute value is returned to the user.
In the technical scheme disclosed by the application, after an information query request of a user is received, when the information query request corresponds to a general attribute, the general attribute and the corresponding attribute value of all resource objects of a corresponding resource object class are obtained, then a required attribute value is queried from the general attribute and returned, when the information query request corresponds to a special attribute, all the attributes and the corresponding attribute values of a specific resource object of a corresponding resource object class are obtained, then the required attribute value is queried from the attribute values and returned, so that the method is different from the prior art that all the attributes of all the resource objects are traversed to obtain the corresponding attribute values and returned, but is equivalent to dividing the attributes of the same resource object class into different attribute sets, further when the information query request corresponds to different attributes, different attribute sets are obtained firstly, then the required attribute is queried from the obtained attribute sets, and the query range is greatly reduced by two-layer search, therefore, the query speed is improved, and the purposes of short response time and low response speed are achieved; in addition, the effects of resource separation and attribute separation are achieved through the method, on one hand, the expenses of a CPU and a memory are saved, on the other hand, the attributes are loosely coupled, and the expansion and maintenance are easier.
Specifically, the information query method provided by the invention is universal and is suitable for all scenes related to query and display of resource objects; in addition, the attributes of the resource object are decoupled and separated from each other, so that the expandability and maintainability are improved, and the failure of one attribute analysis does not influence the analysis of other attributes; and only the concerned attribute is inquired to obtain the corresponding attribute value, thereby reducing the CPU occupation and the memory expenditure.
Before obtaining the attribute and the corresponding attribute value, the information query method provided in the embodiment of the present invention may further include:
defining a resource object interface which has a one-to-one correspondence relation with each resource object class, and defining each attribute, attribute value of each attribute, attribute element contained in each attribute and attribute element value of each attribute element contained in all the resource objects in the corresponding resource object class in the resource object interface for obtaining.
It should be noted that the present invention can be applied to medium-low end storage and also to high-end storage, where the result obtained by obtaining the general attributes and corresponding attribute values of all resource objects of a certain resource object class is referred to as a compact view, and the result obtained by obtaining all attributes and corresponding attribute values of a certain specific resource object is referred to as a detailed view for description. In the application, resource object interfaces having a one-to-one correspondence relationship with each resource object class can be defined, so that the attributes of the resource objects in the corresponding resource object classes are obtained from the resource object interfaces. Specifically, each attribute, attribute value, attribute element included in each attribute, and attribute element value corresponding to all resource objects may be defined in the resource object interface, where an attribute element is a specific description of a corresponding attribute, such as a name of an attribute, a data type of an attribute, and the like, and is specifically described by taking a resource object as a storage volume (hereinafter, referred to as a volume) as an example, and an attribute of a volume may include an ID of the volume, a name of the volume, a capacity of the volume, an MDisk name to which the volume belongs, an IO Group name to which the volume belongs, and the like; the attribute elements of each attribute may include the name of the attribute, the data type of the attribute, the description information of the attribute, whether the attribute belongs to the compact view or the detailed view, and the like; for example, the name of the volume CAPACITY of the property volume is "CAPACITY", the data type is long and integer, the description information is "Capacity of the VDisk", and the property volume belongs to the compact view. Therefore, the storage of the related information is realized by defining the resource object interface, which not only facilitates the information storage, but also facilitates the unified query and acquisition.
The information query method provided in the embodiments of the present invention obtains the general attributes and corresponding attribute values of all resource objects in the resource object class corresponding to the information query request, and may include:
executing an mcsinq Is VDisk command to acquire general attributes and corresponding attribute values of all corresponding resource objects for a resource object class corresponding to the information query request, wherein the VDisk in the mcsinq Is VDisk command Is the name of a resource object interface of the resource object class corresponding to the information query request;
acquiring all attributes and corresponding attribute values of a specific resource object in a resource object class corresponding to the information query request may include:
and for a specific resource object in the resource object class corresponding to the information query request, executing an mcsinq Is VDisk ID command to acquire all attributes and corresponding attribute values of the specific resource object, wherein the VDisk in the mcsinq Is VDisk ID command Is the name of a resource object interface of the resource object class corresponding to the information query request, and the ID Is the unique identifier of the specific resource object.
It should be noted that, in the present application, the command may be called by calling a command line interface included in an MCS (Multiple Controller System), specifically, taking a resource object as a volume as an example, a result obtained by executing an mcsinq Is VDisk command to obtain general attributes and corresponding attribute values of all corresponding resource objects Is a compact view, as shown in fig. 2, a result obtained by executing an mcsinq Is VDisk ID command to obtain all attributes and corresponding attribute values of a specific resource object Is a detailed view, as shown in fig. 3 (a resource object interface name of a volume Is set to VDisk, and an ID of a specific resource object Is 0). Therefore, the corresponding information can be quickly and effectively acquired by executing the command, and the query of the attribute and the corresponding attribute value is facilitated.
After the information query method provided in the embodiment of the present invention executes the mcsinq Is VDisk command to obtain the generic attributes and the corresponding attribute values of all corresponding resource objects, the method may further include:
storing a result obtained by executing the mcsinq Is VDisk command in a memory list according to lines as a first information list, wherein the first line of the first information list Is each attribute, and each resource object of the rest lines of the first information list corresponds to an attribute value of each attribute;
and separating each attribute or attribute value contained in each row in the first information list by using separators, and storing the attributes and the corresponding attribute values into key value pairs for searching the required attribute values.
It should be noted that, in this embodiment, after the generic attributes and the corresponding attribute values are acquired, the processing procedure of the acquired results, that Is, from the step of storing the acquired results in the memory list as the first information list by rows to the step of storing the attributes and the corresponding attribute values in the key value pair, may be performed after the generic attributes and the corresponding attribute values of all corresponding resource objects are acquired by executing the mscsinq Is VDisk command, or may be performed after the generic attributes and the corresponding attribute values of all corresponding resource objects are acquired by other manners, and in short, after the generic attributes and the corresponding attribute values of all corresponding resource objects are acquired, the acquired results may be processed according to the above steps in this embodiment. After obtaining the compact view, the following steps may be specifically executed:
(1) storing a result obtained by executing the mcsinq Is VDisk command in a memory list according to lines as a first information list, wherein the first line of the first information list Is each attribute, and each resource object of the rest lines of the first information list corresponds to an attribute value of each attribute;
(2) acquiring a line 1 from the first information list, and dividing the character string into a sub-character string list (each sub-character string corresponds to a general attribute) by applying a command separator (default is ","), so as to obtain an attribute header of the first information list;
(3) acquiring an (index +1) th line from the first information list according to the index (index) of the resource object, and dividing the character string into a sub-character string list (each sub-character string corresponds to an attribute value of a general attribute) by applying a command separator (default is ","), so as to obtain an attribute value list corresponding to the resource object;
(4) traversing the attribute table header, sequentially taking values from the attribute value list, and storing the obtained attributes and corresponding attribute values into the data types of the key value pairs to obtain a plurality of groups of key value pairs consisting of the attributes and attribute values of the corresponding resource objects;
(5) and searching a corresponding character string value (attribute value) from the attribute and attribute value key value pair according to the attribute name of the simplified view to be inquired.
Therefore, by the processing mode, the required attribute value can be conveniently and quickly searched based on the key value pair.
The information query method provided in the embodiment of the present invention, after executing an mcs (mlsinq) Is VDisk ID command to obtain all attributes and corresponding attribute values of a specific resource object, may further include:
storing a result obtained by executing the mcsinq Is VDisk ID in a memory list according to lines as a second information list, wherein each line in the second information list comprises each attribute and a corresponding attribute value of a specific resource object in a one-to-one corresponding mode;
and separating the attribute and the attribute value contained in each row in the second information list by using separators, and storing the attribute and the corresponding attribute value into key value pairs for searching the required attribute value.
In this embodiment, after all the attributes and corresponding attribute values of the specific resource object are acquired, a processing procedure of the acquired result, that Is, from the step of storing the acquired result in the memory list as the second information list by row to the step of storing the attributes and corresponding attribute values in the key value pair, may be performed after all the attributes and corresponding attribute values of the specific resource object are acquired by executing the mcsinq Is VDisk ID command, or may be performed after all the attributes and corresponding attribute values of the specific resource object are acquired in other manners, and in short, after all the attributes and corresponding attribute values of the specific resource object are acquired, the acquired result may be processed according to the above steps in this embodiment. It should be noted that before executing the mcsinq Is VDisk ID command, the ID value of the resource object to be queried needs to be acquired, specifically, a simplified view of the resource object class to which the resource object to be queried belongs Is acquired first, then the key value pair of the simplified view Is obtained according to the above steps, and the corresponding ID value Is determined by the key value pair based on the name of the resource object to be queried; then, with the ID value as a parameter, the command is reassembled to mcsinqVDisk $ { ID } and executed.
After the detail view is acquired, the following steps may be specifically executed:
(1) the result obtained by executing the mcsinq Is VDisk ID Is stored in a memory list according to lines as a second information list, wherein each line in the second information list comprises each attribute and a corresponding attribute value of a specific resource object in a one-to-one corresponding mode;
(2) traversing and acquiring all rows from the second information list;
(3) dividing each row of character strings into a sub character string list by applying a command separator (default is ","), wherein the sub character string list comprises two items, the first item is an attribute name, and the second item is a corresponding attribute value;
(4) storing the attribute and the attribute value into a key value pair data type to obtain the attribute of the specific object resource and the key value pair of the attribute value;
(5) and searching a corresponding character string value (attribute value) from the attribute and attribute value key value pair according to the detail view attribute name to be inquired.
The information query method provided in the embodiment of the present invention searches for an attribute value of an attribute corresponding to an information query request, and may include:
and searching the attribute value of the attribute corresponding to the information query request from the key value pair corresponding to the first information list or the second information list, and decoding the searched attribute value into the attribute element value of the attribute element, namely the data type corresponding to the attribute.
The attribute element value of the attribute element, which is the data type referred to in the present application, includes a long integer, an integer, a boolean, a character string, an enumeration, and the like, and in order to facilitate a user to analyze an obtained attribute value, the attribute value can be decoded into a corresponding data type after the required attribute value is found.
An embodiment of the present invention further provides an information query apparatus, as shown in fig. 4, which may include:
a receiving module 11, configured to: receiving an information query request;
a first query module 12 for: if the attribute of the information query request is a preset general attribute, acquiring general attributes and corresponding attribute values of all resource objects in a resource object class corresponding to the information query request, searching the attribute values of the attribute corresponding to the information query request from the general attributes and returning;
a second query module 13 configured to: if the attribute of the information query request is a preset special attribute, acquiring all attributes and corresponding attribute values of specific resource objects in the resource object class corresponding to the information query request, searching the attribute values of the attributes corresponding to the information query request from the attribute values and returning; the attributes include generic attributes and proprietary attributes.
The information query device provided in the embodiment of the present invention may further include:
a definition module to: before the attributes and the corresponding attribute values are obtained, a resource object interface which has one-to-one correspondence with each resource object class is defined, and each attribute, the attribute value of each attribute, the attribute element contained in each attribute and the attribute element value of each attribute element contained in all the resource objects in the corresponding resource object class are defined in the resource object interface for obtaining.
In an information query apparatus provided in an embodiment of the present invention, a first query module may include:
a generic attribute query unit to: executing an mcsinq Is VDisk command to acquire general attributes and corresponding attribute values of all corresponding resource objects for a resource object class corresponding to the information query request, wherein the VDisk in the mcsinq Is VDisk command Is the name of a resource object interface of the resource object class corresponding to the information query request;
the second query module may include:
a proprietary attribute querying unit to: and for a specific resource object in the resource object class corresponding to the information query request, executing an mcsinq Is VDisk ID command to acquire all attributes and corresponding attribute values of the specific resource object, wherein the VDisk in the mcsinq Is VDisk ID command Is the name of a resource object interface of the resource object class corresponding to the information query request, and the ID Is the unique identifier of the specific resource object.
The information query device provided in the embodiment of the present invention may further include:
a first result processing module to: after the mcsinq Is VDisk command Is executed to obtain the general attributes and the corresponding attribute values of all the corresponding resource objects, the result obtained by executing the mcsinq Is VDisk command Is stored in a memory list by rows to be used as a first information list, wherein the first row of the first information list Is each attribute, and each resource object in the rest rows of the first information list Is corresponding to the attribute value of each attribute; and separating each attribute or attribute value contained in each row in the first information list by using separators, and storing the attributes and the corresponding attribute values into key value pairs for searching the required attribute values.
The information query device provided in the embodiment of the present invention may further include:
a second result processing module to: after the mcsinq Is VDisk ID command Is executed to obtain all attributes and corresponding attribute values of the specific resource object, storing a result obtained by executing the mcsinq Is VDisk ID in a memory list as a second information list according to lines, wherein each line in the second information list comprises each attribute and corresponding attribute value of the specific resource object in a one-to-one corresponding mode; and separating the attribute and the attribute value contained in each row in the second information list by using separators, and storing the attribute and the corresponding attribute value into key value pairs for searching the required attribute value.
In an information query apparatus provided in an embodiment of the present invention, each of the first query module and the second query module may include:
a result query unit to: and searching the attribute value of the attribute corresponding to the information query request from the key value pair corresponding to the first information list or the second information list, and decoding the searched attribute value into the attribute element value of the attribute element, namely the data type corresponding to the attribute.
An embodiment of the present invention further provides an information query device, which may include:
a memory for storing a computer program;
a processor for implementing the steps of the information query method as described above when executing the computer program.
The embodiment of the invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above information query methods can be implemented.
It should be noted that for the description of the relevant parts in the information query device, the apparatus and the computer-readable storage medium provided in the embodiments of the present invention, reference is made to the detailed description of the corresponding parts in the information query method provided in the embodiments of the present invention, and details are not repeated here. In addition, parts of the technical solutions provided in the embodiments of the present invention that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail, so as to avoid redundant description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An information query method, comprising:
receiving an information query request;
if the attribute of the information query request is a preset general attribute, acquiring general attributes and corresponding attribute values of all resource objects in a resource object class corresponding to the information query request, searching the attribute values of the attribute corresponding to the information query request from the general attributes and returning; if the attribute of the information query request is a preset proprietary attribute, acquiring all attributes and corresponding attribute values of specific resource objects in the resource object class corresponding to the information query request, searching the attribute values of the attributes corresponding to the information query request from the attribute values and returning the attribute values; the attributes comprise a general attribute and a special attribute, the general attribute is an attribute with the frequency acquired by a user within a preset time period being greater than an access threshold, and the special attribute is an attribute with the frequency acquired by the user within the preset time period being not greater than the access threshold.
2. The method of claim 1, wherein before obtaining the attributes and corresponding attribute values, further comprising:
defining a resource object interface which has a one-to-one correspondence relation with each resource object class, and defining each attribute, attribute value of each attribute, attribute element contained in each attribute and attribute element value of each attribute element contained in all the resource objects in the corresponding resource object class in the resource object interface for obtaining.
3. The method of claim 2, wherein obtaining the generic attributes and the corresponding attribute values of all resource objects in the resource object class corresponding to the information query request comprises:
executing an mcsinq Is VDisk command to acquire general attributes and corresponding attribute values of all corresponding resource objects for the resource object class corresponding to the information query request, wherein the VDisk in the mcsinq Is VDisk command Is the name of a resource object interface of the resource object class corresponding to the information query request;
acquiring all attributes and corresponding attribute values of specific resource objects in the resource object class corresponding to the information query request, wherein the acquiring includes:
and executing an mcsinq Is VDisk ID command to obtain all attributes and corresponding attribute values of the specific resource object in the resource object class corresponding to the information query request, wherein the VDisk in the mcsinq Is VDisk ID command Is the name of a resource object interface of the resource object class corresponding to the information query request, and the ID Is the unique identifier of the specific resource object.
4. The method as claimed in claim 3, wherein after executing the mscsinqis VDisk command to obtain the generic attributes and corresponding attribute values of all corresponding resource objects, further comprising:
storing a result obtained by executing an mcsinq Is VDisk command in a memory list according to lines as a first information list, wherein the first line of the first information list Is each attribute, and each resource object of each other line of the first information list corresponds to an attribute value of each attribute;
and separating each attribute or attribute value contained in each row in the first information list by using separators, and storing the attributes and the corresponding attribute values into key value pairs for searching the required attribute values.
5. The method as claimed in claim 4, wherein after executing the mscsinq Is VDisk ID command to obtain all attributes and corresponding attribute values of the specific resource object, further comprising:
storing a result obtained by executing the mcsinqIs VDiskID in a memory list according to lines as a second information list, wherein each line in the second information list comprises each attribute and a corresponding attribute value of the specific resource object in a one-to-one corresponding mode;
and separating the attribute and the attribute value contained in each row in the second information list by using separators, and storing the attribute and the corresponding attribute value into key value pairs for searching the required attribute value.
6. The method of claim 5, wherein searching for the attribute value of the attribute corresponding to the information query request comprises:
and searching the attribute value of the attribute corresponding to the information query request in the key value pair corresponding to the first information list or the second information list, and decoding the searched attribute value into the attribute element value of the attribute element, namely the data type corresponding to the attribute.
7. An information inquiry apparatus, comprising:
a receiving module to: receiving an information query request;
a first query module to: if the attribute of the information query request is a preset general attribute, acquiring general attributes and corresponding attribute values of all resource objects in a resource object class corresponding to the information query request, searching the attribute values of the attribute corresponding to the information query request from the general attributes and returning;
a second query module to: if the attribute of the information query request is a preset proprietary attribute, acquiring all attributes and corresponding attribute values of specific resource objects in the resource object class corresponding to the information query request, searching the attribute values of the attributes corresponding to the information query request from the attribute values and returning the attribute values; the attributes comprise a general attribute and a special attribute, the general attribute is an attribute with the frequency acquired by a user within a preset time period being greater than an access threshold, and the special attribute is an attribute with the frequency acquired by the user within the preset time period being not greater than the access threshold.
8. The apparatus of claim 7, further comprising:
a definition module to: before the attributes and the corresponding attribute values are obtained, a resource object interface which has a one-to-one correspondence relation with each resource object class is defined, and each attribute, the attribute value of each attribute, the attribute element contained in each attribute and the attribute element value of each attribute element contained in all the resource objects in the corresponding resource object class are defined in the resource object interface for obtaining.
9. An information inquiry apparatus, comprising:
a memory for storing a computer program;
processor for implementing the steps of the information query method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the information query method according to any one of claims 1 to 6.
CN201810846114.6A 2018-07-27 2018-07-27 Information query method, device, equipment and computer readable storage medium Active CN109101595B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810846114.6A CN109101595B (en) 2018-07-27 2018-07-27 Information query method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810846114.6A CN109101595B (en) 2018-07-27 2018-07-27 Information query method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109101595A CN109101595A (en) 2018-12-28
CN109101595B true CN109101595B (en) 2022-07-08

Family

ID=64847888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810846114.6A Active CN109101595B (en) 2018-07-27 2018-07-27 Information query method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109101595B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110213267B (en) * 2019-05-31 2022-10-04 广州华多网络科技有限公司 White list service processing method, server and computer storage medium
CN110716711A (en) * 2019-10-21 2020-01-21 深圳前海环融联易信息科技服务有限公司 Class configuration method, device, equipment and computer storage medium
CN113888307B (en) * 2021-09-29 2024-08-20 四川新网银行股份有限公司 Credit business batch processing method capable of decoupling different business data during running

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1617343A1 (en) * 2004-07-15 2006-01-18 IBM Corporation A Method and system to load information in a general purpose data warehouse database
CN101145163A (en) * 2007-10-30 2008-03-19 金蝶软件(中国)有限公司 Method and system for obtaining data from a plurality of data pool
CN105677840A (en) * 2016-01-06 2016-06-15 东北大学 Data query method based on multi-dimensional increasing data model
CN106681999A (en) * 2015-11-05 2017-05-17 阿里巴巴集团控股有限公司 Data table inquiry method and equipment
CN107203548A (en) * 2016-03-17 2017-09-26 阿里巴巴集团控股有限公司 Attribute acquisition methods and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070096812A (en) * 2006-03-27 2007-10-02 소니 가부시끼 가이샤 Content list display method, content list display apparatus, content selecting and processing method, and content selecting and processing apparatus
CN1862542A (en) * 2006-06-09 2006-11-15 无锡永中科技有限公司 Method of shared object attribute
US20090177301A1 (en) * 2007-12-03 2009-07-09 Codentity, Llc Scalable system and method for an integrated digital media catalog, management and reproduction system
WO2015085507A1 (en) * 2013-12-11 2015-06-18 华为技术有限公司 Data storage method, data processing method and device, and mobile terminal
CN106776638A (en) * 2015-11-24 2017-05-31 大唐软件技术股份有限公司 Database operation method and device
CN105787808A (en) * 2016-03-01 2016-07-20 中国电力科学研究院 IEC61968 standard document generation system and method based on generic programming and reflection mechanism
CN108090064B (en) * 2016-11-21 2021-10-08 腾讯科技(深圳)有限公司 Data query method and device, data storage server and system
CN106682936A (en) * 2016-12-08 2017-05-17 乐视控股(北京)有限公司 Multi-service data processing method, apparatus and electronic equipment thereof
CN108259150B (en) * 2016-12-29 2020-09-11 华为技术有限公司 Information transmission method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1617343A1 (en) * 2004-07-15 2006-01-18 IBM Corporation A Method and system to load information in a general purpose data warehouse database
CN101145163A (en) * 2007-10-30 2008-03-19 金蝶软件(中国)有限公司 Method and system for obtaining data from a plurality of data pool
CN106681999A (en) * 2015-11-05 2017-05-17 阿里巴巴集团控股有限公司 Data table inquiry method and equipment
CN105677840A (en) * 2016-01-06 2016-06-15 东北大学 Data query method based on multi-dimensional increasing data model
CN107203548A (en) * 2016-03-17 2017-09-26 阿里巴巴集团控股有限公司 Attribute acquisition methods and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Demonstration of Taghreed: A System for Querying,Analyzing, and Visualizing Geotagged Microblogs";Amr Magdy 等;《2015 IEEE 31st International Conference on Data Engineering》;20150601;1416-1419 *
"一种基于关键词的大规模Deep Web信息检索系统";李益民;《图书情报工作》;20081018;第52卷(第10期);29-32 *

Also Published As

Publication number Publication date
CN109101595A (en) 2018-12-28

Similar Documents

Publication Publication Date Title
CN109101595B (en) Information query method, device, equipment and computer readable storage medium
CN103136228A (en) Image search method and image search device
CN112311571B (en) Network topology generation method and device, electronic equipment and non-transitory storage medium
CN113656407B (en) Data topology generation method and device, electronic equipment and storage medium
US20220005546A1 (en) Non-redundant gene set clustering method and system, and electronic device
CN112860811B (en) Method and device for determining data blood relationship, electronic equipment and storage medium
CN116502273B (en) Dynamic data desensitization method, device and equipment based on data blood edges
CN108959294B (en) Method and device for accessing search engine
CN112528067A (en) Graph database storage method, graph database reading method, graph database storage device, graph database reading device and graph database reading equipment
CN110764705B (en) Data reading and writing method, device, equipment and storage medium
US9213759B2 (en) System, apparatus, and method for executing a query including boolean and conditional expressions
CN109033456B (en) Condition query method and device, electronic equipment and storage medium
CA3153550A1 (en) Core recommendation method, device and system
CN112612832B (en) Node analysis method, device, equipment and storage medium
WO2021103594A1 (en) Tacitness degree detection method and device, server and readable storage medium
US11157506B2 (en) Multiform persistence abstraction
CN109542912B (en) Interval data storage method, device, server and storage medium
CN116737829A (en) Data synchronization method and device, storage medium and electronic equipment
CN114398399A (en) Retrieval method and device of management information base and electronic equipment
CN114896418A (en) Knowledge graph construction method and device, electronic equipment and storage medium
CN110633430B (en) Event discovery method, apparatus, device, and computer-readable storage medium
CN115774797A (en) Video content retrieval method, device, equipment and computer readable storage medium
CN111078727A (en) Brief description generation method and device and computer readable storage medium
US20230214394A1 (en) Data search method and apparatus, electronic device and storage medium
CN111352933B (en) Index system is swiftly established to big data database in high in clouds

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