CN113806365A - Single data source data management method, device and storage medium - Google Patents

Single data source data management method, device and storage medium Download PDF

Info

Publication number
CN113806365A
CN113806365A CN202111005474.1A CN202111005474A CN113806365A CN 113806365 A CN113806365 A CN 113806365A CN 202111005474 A CN202111005474 A CN 202111005474A CN 113806365 A CN113806365 A CN 113806365A
Authority
CN
China
Prior art keywords
attribute
data
data source
cascade
temporary array
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.)
Granted
Application number
CN202111005474.1A
Other languages
Chinese (zh)
Other versions
CN113806365B (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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202111005474.1A priority Critical patent/CN113806365B/en
Publication of CN113806365A publication Critical patent/CN113806365A/en
Application granted granted Critical
Publication of CN113806365B publication Critical patent/CN113806365B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24554Unary operations; Data partitioning operations
    • 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)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a single data source data management method, a single data source data management device and a storage medium. The method comprises the following steps: determining a target single data source and a cascade attribute combination for managing the target single data source; traversing all data in the target single data source, and marking the data which accords with the corresponding attribute in the cascade attribute combination; and responding to the data query instruction, acquiring the sub data source which accords with the corresponding attribute through the uniq method function, and returning. The method of the invention generates a set of settable attribute sub-data source combinations with cascade relations from a set of data sources with cascade relations among data attributes, and the settable attribute sub-data source combinations are used for setting the allowed combined data information in the data sources. By the method, the information set and inquired by the client can be controlled to be all the combined types contained in the data source, and the range and the correctness of the set inquiry attribute can be controlled. Useless query setting operation is avoided, and the usability of the system is improved.

Description

Single data source data management method, device and storage medium
Technical Field
The present invention relates to the field of data management technologies, and in particular, to a method and an apparatus for managing data in a single data source, and a storage medium.
Background
Data management in the prior art is mostly based on data management of multiple data sources, and a sub-data source with a cascade relation is obtained by calling an interface with the cascade relation so as to guarantee the correctness of data query.
However, for a single data source, since it has only one interface, data query cannot be performed step by step through the cascade relationship between the interfaces, which brings inconvenience to data management.
Disclosure of Invention
In order to solve the above technical problem, in an aspect of the present invention, a single data source data management method is provided, where the method includes: determining a target single data source and a cascading attribute combination for managing the target single data source; traversing all data in the target single data source, and marking the data which accords with the corresponding attribute in the cascade attribute combination; and responding to the data query instruction, acquiring the sub data source which accords with the corresponding attribute through the uniq method function, and returning.
In one or more embodiments, the method further comprises: presetting a plurality of sub-attributes under each attribute; wherein the cascade attribute combination at least comprises a cascade relationship between two attributes.
In one or more embodiments, the method further comprises: traversing the target single data source before the response to the data query instruction is obtained and the sub data sources meeting the corresponding attributes are returned through the uniq method function, obtaining the sub data sources meeting the first attributes in the cascade attribute combination in the target single data source and storing the sub data sources in the Map; in response to selecting a first attribute value under the first attribute, a first data query instruction is generated.
In one or more embodiments, the obtaining and returning the sub data sources that conform to the corresponding attributes through the uniq method function in response to the data query obtaining instruction includes: in response to the first data query instruction, traversing all the values of the first attribute in the map, acquiring data of the first attribute value corresponding to the first attribute, and storing the data into a first temporary array; acquiring all data which accord with the second attribute in the first temporary array through a uniq method function and storing the data into a second temporary array; clearing the first temporary array and returning the data in the second temporary array; wherein the first attribute and the second attribute are cascade attributes, and the first attribute is higher in level than the second attribute.
In one or more embodiments, the single data source data management method further includes: graying the second attribute before the return data of the first attribute value of the first attribute has data which is consistent with the second attribute, so that the second attribute is in an inoperable state; and in response to the returned data of the first attribute value of the first attribute having the data which conforms to the second attribute, deashing the second attribute so that the second attribute is in an operable state.
In one or more embodiments, the single data source data management method further includes: in response to selecting a second attribute value under the second attribute, a second data query instruction is generated.
In one or more embodiments, the single data source data management method further includes: in response to the second data query instruction, traversing all values which accord with the second attribute in the second temporary array, and acquiring data of the second attribute value corresponding to the second attribute and storing the data into the first temporary array; acquiring all data which accord with a third attribute in the first temporary array through a uniq method function and storing the data into a third temporary array; clearing the first temporary array and returning the data in the third temporary array; wherein the second attribute and the third attribute are cascade attributes, and the level of the second attribute is higher than that of the third attribute.
In one or more embodiments, the single data source data management method further includes: and responding to the current attribute as the last attribute in the cascade attribute combination, processing the first temporary array through an uniq method function, storing the processed data in a fourth temporary array, and returning.
In another aspect of the present invention, a single data source data management apparatus is further provided, including: the management setting module is configured for determining a target single data source and managing a cascading attribute combination of the target single data source; the query marking module is configured to traverse all data in the target single data source and mark the data which accords with the corresponding attribute in the cascade attribute combination; and the attribute query module is configured and used for responding to the obtained data query instruction, obtaining the subdata source which accords with the corresponding attribute through the uniq method function and returning the subdata source.
In one or more embodiments, the cascading property combinations include at least a cascading relationship between two properties; correspondingly, the management setting module is further configured to: and presetting a plurality of sub-attributes under each attribute.
In one or more embodiments, the attribute query module is further configured to traverse the target single data source, obtain a sub data source in the target single data source, which conforms to the first attribute in the cascade attribute combination, and store the sub data source in the Map; in response to selecting a first attribute value under the first attribute, a first data query instruction is generated.
In one or more embodiments, the attribute query module is further configured to, in response to obtaining the first data query instruction, traverse all values of the first attribute in the Map, obtain data corresponding to the first attribute value of the first attribute, and store the data in a first temporary array; acquiring all data which accord with the second attribute in the first temporary array through a uniq method function and storing the data into a second temporary array; clearing the first temporary array and returning the data in the second temporary array; wherein the first attribute and the second attribute are cascade attributes, and the first attribute is higher in level than the second attribute.
In one or more embodiments, the attribute query module is further configured to, before having data that conforms to the second attribute in the return data of the first attribute value of the first attribute, graying the second attribute so that the second attribute is in an inoperable state; and in response to the returned data of the first attribute value of the first attribute having the data which conforms to the second attribute, deashing the second attribute so that the second attribute is in an operable state.
In one or more embodiments, the attribute query module is further configured to generate a second data query instruction in response to selecting a second attribute value under the second attribute.
In one or more embodiments, the attribute query module is further configured to, in response to obtaining the second data query instruction, traverse all values in the second temporary array that meet the second attribute, and obtain data corresponding to a second attribute value of the second attribute and store the data in the first temporary array; acquiring all data which accord with a third attribute in the first temporary array through a uniq method function and storing the data into a third temporary array; clearing the first temporary array and returning the data in the third temporary array; wherein the second attribute and the third attribute are cascade attributes, and the level of the second attribute is higher than that of the third attribute.
In one or more embodiments, the attribute query module is further configured to, in response to that the current attribute is the last attribute in the cascade attribute combination, process the first temporary array through an uniq method function, and store the processed data in a fourth temporary array for return.
In another aspect of the present invention, a storage medium is proposed, which contains an executable computer program for implementing the steps of a single data source data management method according to any one of claims 1 to 8 when the computer program is executed.
The beneficial effects of the invention include:
the method or the device of the invention generates a set of settable attribute sub-data source combinations with cascade relations from a set of data sources with cascade relations among data attributes, so as to set the allowed combined data information in the data sources. By the method, the information set and inquired by the client can be controlled to be all the combined types contained in the data source, and the range and the correctness of the set inquiry attribute can be controlled. Useless query setting operation is avoided, and the usability of the system is improved.
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, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a single data source data management method according to the present invention;
FIG. 2 is a flow chart of the data query operation implemented based on the method of the present invention;
FIG. 3 is a schematic structural diagram of a single data source data management apparatus according to the present invention;
fig. 4 is a schematic structural diagram of a readable storage medium according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
FIG. 1 is a flowchart illustrating a method for single data source data management according to the present invention. As shown in fig. 1, a workflow of a single data source data management method of the present invention includes: step S1, determining a target single data source and a cascade attribute combination for managing the target single data source; step S2, traversing all data in the target single data source, and marking the data which accords with the corresponding attribute in the cascade attribute combination; and step S3, responding to the data query instruction, acquiring the sub data source which accords with the corresponding attribute through the uniq method function, and returning. Where the uniq method function is an array deduplication function in undercore, it is passed an array that will return a deduplicated copy of the array.
In some embodiments, a cascading combination of attributes includes at least a cascading relationship between two attributes; correspondingly, the method of the invention also comprises the following steps: and presetting a plurality of sub-attributes under each attribute. Wherein the sub-attributes are to be used as selectable attribute values in a subsequent query process based on the combination of the cascading attributes.
In some embodiments, before, in response to the data query obtaining instruction, obtaining the sub data sources meeting the corresponding attributes through the uniq method function and returning, the method of the present invention further includes: traversing the target single data source, acquiring a subdata source which accords with the first attribute in the cascade attribute combination in the target single data source, and storing the subdata source into the Map; in response to selecting a first attribute value under the first attribute, a first data query instruction is generated.
In some embodiments, in response to the data query obtaining instruction, obtaining and returning the child data sources that conform to the corresponding attributes through the uniq method function includes: in response to the first data query instruction, traversing all the values of the first attribute in the Map, acquiring data of the first attribute value corresponding to the first attribute, and storing the data into a first temporary array; acquiring all data which accord with the second attribute in the first temporary array through a uniq method function and storing the data into a second temporary array; clearing the first temporary array and returning the data in the second temporary array; the first attribute and the second attribute are cascade attributes, and the level of the first attribute is higher than that of the second attribute.
In some embodiments, the method of the present invention further comprises: graying the second attribute before the return data of the first attribute value of the first attribute has data which is accordant with the second attribute, so that the second attribute is in an inoperable state; and in response to the returned data of the first attribute value of the first attribute having data which conforms to the second attribute, the graying of the second attribute is cancelled, so that the second attribute is in an operable state.
In the data query process of the invention, the cascade attribute combination is displayed to the user as an operable item visualization, and the user can select a sub-attribute under the corresponding attribute, wherein the sub-attribute is regarded as the attribute value input by the user, so that the marked data with the corresponding first attribute value is searched in the data range determined by the first attribute and returned. In addition, in order to avoid the user from inputting the out-of-range attribute value, the graying operation of the next-level attribute is cancelled only when the user inputs the attribute value of the previous level correctly and returns data, so that the user can select or input the attribute value to be inquired in the next-level attribute.
In some embodiments, the method of the present invention further comprises: in response to selecting a second attribute value under the second attribute, a second data query instruction is generated. Correspondingly, the method of the invention also comprises the steps of responding to the second data query instruction, traversing all the values which accord with the second attribute in the second temporary array, and acquiring the data of the second attribute value corresponding to the second attribute and storing the data into the first temporary array; acquiring all data which accord with the third attribute in the first temporary array through the uniq method function and storing the data into a third temporary array; clearing the first temporary array and returning the data in the third temporary array; wherein the second attribute and the third attribute are cascade attributes, and the level of the second attribute is higher than that of the third attribute.
In the scheme of the invention, if the next-level attribute exists after the current attribute, the returned data not only needs to have the mark corresponding to the attribute value of the current attribute but also needs to have the mark of the next-level attribute. Therefore, the data search within the limited range of the user can be ensured, the search range of the next data is reduced, and the query response speed is higher.
In some embodiments, in response to the current attribute being the last attribute in the concatenated attribute combination, the first temporary array is processed through the uniq method function, and the processed data is saved in the fourth temporary array and returned. The purpose of this step is to deduplicate the returned data as the final data is returned.
Through the method provided by the embodiments, the invention can guide the user to gradually obtain the data to be inquired in the inquireable range of the target single data source, thereby effectively solving the data management problem of the single data source and greatly improving the use experience of the user.
Fig. 2 is a work flow diagram of data query operation implemented based on the method of the present invention. As shown in fig. 2, the workflow of the data query operation implemented based on the method of the present invention includes:
step 1, determining a single data source, an attribute combination and a cascade relation which need to be set, and executing step 2;
and 2, acquiring the subdata source with the attribute a from the data source, and setting the attributes of the low levels b and c to be grey-first to be inoperable. Executing the step 3;
and 3, setting the value of the attribute a, and finishing the setting. Executing the step 4;
and 4, filtering all data meeting the attribute value of the attribute a according to the value of the attribute a, acquiring the data to a subdata source of the attribute b through an underscore. Executing the step 5;
and 5, setting the value of the attribute b, and finishing the setting. Executing the step 6;
and 6, filtering all data meeting the attribute values of a and b according to the value of the attribute b, and then acquiring the data to a sub data source of the attribute c by an underscore. In order to avoid the duplication phenomenon when multiple combinations are set, the set value of the attribute c needs to be removed from the sub data source of the acquired attribute c. After the processing, the attribute c has a data source, and step 7 is executed; if not, step 3 or step 5 is executed to search the settable sub data source.
Step 7, completing the setting of a combined attribute (namely completing the data query); the combined attribute may be repeatedly set according to the above steps.
The background operation of the steps is as follows:
firstly, the attribute A shows the data source, a user can set a value a of the attribute A, and when the value a is set, the user triggers to inquire the data source event of the attribute B, and at this time, { A: a } and the level number 1 of the layer of the attribute A are used as query functions to participate, and the query functions are executed as follows:
ginseng introduction: (obj: { A: a }, level: 1)
First, the level value is judged. And (3) taking the level as a value 1, taking the value a of obj.A, traversing the map, and obtaining a value corresponding to a, namely the data source of the attribute B.
2) And obtaining the data source of the attribute B. Setting the value B of attribute B triggers a query attribute C data source event, when { a: a, B: b } and the level 2 of the attribute B as a query function, wherein the query function is executed by the following steps:
ginseng introduction: (obj: { A: a, B: B }, level: 2)
First, the level value is judged. And (3) taking the level as a value 2, taking the value a of obj.A, traversing the map to obtain a value corresponding to a, namely the data source array _ B of the attribute B. And after obtaining the data source array _ B of the attribute B, taking the value B of the obj.B, traversing the array _ B to obtain a value corresponding to the B, namely the data source of the attribute C.
3) And performing the operation in the same way in the following steps until the last layer is finished to obtain the data source array _ END of the last-level attribute. And traversing the set attribute combination after the operation of the second layer is finished, acquiring the data composition meeting the conditions by judging whether the numerical value of each layer is equal to the data of each layer of the currently set attribute combination and taking the data composition meeting the operation, traversing the data composition if the data composition exists, taking the last layer of attribute value _ End of each piece of data, traversing array _ End, and removing the data corresponding to the value _ End, namely the data attribute of the last layer. This operation may avoid setting duplicate combinations of attributes. The uniqueness of the data setting is guaranteed.
4) Thus, the operation of converting the single data source into the sub data source and setting the combined attribute value is completed.
The method can solve the problem of setting the page cascade attribute of a single data source and requiring the set cascade combination to be within the allowable combination range. The method and the device realize that the single data source is dynamically and accurately processed into the sub data source with the set combined attribute. The correctness of the set attribute is guaranteed, and the usability and the correctness of single data source data query are improved.
On the basis of the single data source data management method provided by each embodiment, the invention further provides a single data source data management device. FIG. 3 is a schematic structural diagram of a single data source data management apparatus according to the present invention. As shown in fig. 3, a single data source data management apparatus of the present invention includes: a management setting module 10 configured to determine a target single data source and a cascade attribute combination for managing the target single data source; a query and mark module 20 configured to traverse all data in the target single data source, and mark data that conforms to the corresponding attribute in the cascade attribute combination; and the attribute query module 30 is configured to respond to the data query instruction, obtain the sub data sources conforming to the corresponding attributes through the uniq method function, and return the sub data sources.
In some embodiments, a cascading combination of attributes includes at least a cascading relationship between two attributes; accordingly, the management setting module 10 is further configured to preset a plurality of sub-attributes under each attribute. Wherein the sub-attributes are to be used as selectable attribute values in a subsequent query process based on the combination of the cascading attributes.
In some embodiments, the attribute query module 30 is further configured to, before, in response to the data query obtaining instruction, obtaining the sub data sources meeting the corresponding attributes through the uniq method function and returning, the method of the present invention further includes: traversing the target single data source, acquiring a subdata source which accords with the first attribute in the cascade attribute combination in the target single data source, and storing the subdata source into the Map; in response to selecting a first attribute value under the first attribute, a first data query instruction is generated.
In some embodiments, the attribute query module 30 is further configured to, in response to the obtain first data query instruction, traverse all values of the first attribute in the Map, and obtain data corresponding to the first attribute value of the first attribute and store the data in the first temporary array; acquiring all data which accord with the second attribute in the first temporary array through a uniq method function and storing the data into a second temporary array; clearing the first temporary array and returning the data in the second temporary array; the first attribute and the second attribute are cascade attributes, and the level of the first attribute is higher than that of the second attribute.
In some embodiments, the attribute query module 30 is further configured to, before having data that matches the second attribute in the return data of the first attribute value of the first attribute, graying the second attribute so that the second attribute is in an inoperable state; and in response to the returned data of the first attribute value of the first attribute having data which conforms to the second attribute, the graying of the second attribute is cancelled, so that the second attribute is in an operable state.
In some embodiments, the attribute query module 30 is further configured to, in response to selecting a second attribute value under a second attribute, generate a second data query instruction; responding to the second data query instruction, traversing all values which accord with the second attribute in the second temporary array, acquiring data of the second attribute value corresponding to the second attribute, and storing the data into the first temporary array; acquiring all data which accord with the third attribute in the first temporary array through the uniq method function and storing the data into a third temporary array; clearing the first temporary array and returning the data in the third temporary array; wherein the second attribute and the third attribute are cascade attributes, and the level of the second attribute is higher than that of the third attribute.
In some embodiments, the attribute query module 30 is further configured to, in response to the current attribute being the last attribute in the cascade attribute combination, process the first temporary array through the uniq method function, and save the processed data in the fourth temporary array for return. The purpose of this step is to deduplicate the returned data as the final data is returned.
The single data source data management device can generate a set of settable attribute sub-data source combinations with cascade relations from a set of data sources with cascade relations among data attributes, so as to set the allowed combined data information in the data sources. By the method, the information set and inquired by the client can be controlled to be all the combined types contained in the data source, and the range and the correctness of the set inquiry attribute can be controlled. Useless query setting operation is avoided, and the usability of the system is improved.
On the basis of the single data source data management method provided by the above embodiments, the present invention also provides a storage medium. FIG. 4 is a schematic structural diagram of a readable storage medium of the present invention, such as the readable storage medium of FIG. 4; a storage medium 40, the storage medium 40 being a readable storage medium and storing an executable computer program 401, the computer program 401 being configured to implement the steps of a single data source data management method in any one of the following embodiments, the steps including:
determining a target single data source and a cascade attribute combination for managing the target single data source; traversing all data in the target single data source, and marking the data which accords with the corresponding attribute in the cascade attribute combination; and responding to the data query instruction, acquiring the sub data source which accords with the corresponding attribute through the uniq method function, and returning.
In some embodiments, a cascading combination of attributes includes at least a cascading relationship between two attributes; correspondingly, the method of the invention also comprises the following steps: and presetting a plurality of sub-attributes under each attribute.
In some embodiments, before, in response to the data query obtaining instruction, obtaining the sub data sources meeting the corresponding attributes through the uniq method function and returning, the method of the present invention further includes: traversing the target single data source, acquiring a subdata source which accords with the first attribute in the cascade attribute combination in the target single data source, and storing the subdata source into the Map; in response to selecting a first attribute value under the first attribute, a first data query instruction is generated.
In some embodiments, in response to the data query obtaining instruction, obtaining and returning the child data sources that conform to the corresponding attributes through the uniq method function includes: in response to the first data query instruction, traversing all the values of the first attribute in the Map, acquiring data of the first attribute value corresponding to the first attribute, and storing the data into a first temporary array; acquiring all data which accord with the second attribute in the first temporary array through a uniq method function and storing the data into a second temporary array; clearing the first temporary array and returning the data in the second temporary array; the first attribute and the second attribute are cascade attributes, and the level of the first attribute is higher than that of the second attribute.
In some embodiments, the method of the present invention further comprises: graying the second attribute before the return data of the first attribute value of the first attribute has data conforming to the second attribute, so that the second attribute is in an inoperable state; and in response to the returned data of the first attribute value of the first attribute having data which conforms to the second attribute, the graying of the second attribute is cancelled, so that the second attribute is in an operable state.
In some embodiments, the method of the present invention further comprises: generating a second data query instruction in response to selecting a second attribute value under a second attribute; correspondingly, in response to the query instruction for acquiring the second data, traversing all values which accord with the second attribute in the second temporary array, acquiring data of the second attribute value corresponding to the second attribute, and storing the data into the first temporary array; acquiring all data which accord with the third attribute in the first temporary array through the uniq method function and storing the data into a third temporary array; clearing the first temporary array and returning the data in the third temporary array; the second attribute and the third attribute are cascade attributes, and the level of the second attribute is higher than that of the third attribute.
In some embodiments, the method of the present invention further comprises: and responding to the current attribute as the last attribute in the cascade attribute combination, processing the first temporary array through an uniq method function, storing the processed data in a fourth temporary array, and returning.
The method of the invention generates a set of settable attribute sub-data source combinations with cascade relations from a set of data sources with cascade relations among data attributes, and the settable attribute sub-data source combinations are used for setting the allowed combined data information in the data sources. By the method, the information set and inquired by the client can be controlled to be all the combined types contained in the data source, and the range and the correctness of the set inquiry attribute can be controlled. Useless query setting operation is avoided, and the usability of the system is improved.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A method for single data source data management, the method comprising:
determining a target single data source and a cascading attribute combination for managing the target single data source;
traversing all data in the target single data source, and marking the data which accords with the corresponding attribute in the cascade attribute combination;
and responding to the data query instruction, acquiring the sub data source which accords with the corresponding attribute through the uniq method function, and returning.
2. The single data source data management method of claim 1, wherein the method further comprises: presetting a plurality of sub-attributes under each attribute; wherein the cascade attribute combination at least comprises a cascade relationship between two attributes.
3. The single data source data management method of claim 1, wherein the method further comprises: before the sub data sources which accord with the corresponding attributes are obtained through the uniq method function and returned in response to the data query obtaining instruction,
traversing the target single data source, acquiring a subdata source which accords with the first attribute in the cascade attribute combination in the target single data source, and storing the subdata source into a Map;
in response to selecting a first attribute value under the first attribute, a first data query instruction is generated.
4. The single data source data management method according to claim 3, wherein the obtaining and returning the sub data sources that conform to the corresponding attributes through the uniq method function in response to the data query obtaining instruction comprises:
in response to the first data query instruction, traversing all the values of the first attribute in the Map, acquiring data of the first attribute value corresponding to the first attribute, and storing the data into a first temporary array;
acquiring all data which accord with the second attribute in the first temporary array through a uniq method function and storing the data into a second temporary array;
clearing the first temporary array and returning the data in the second temporary array;
wherein the first attribute and the second attribute are cascade attributes, and the first attribute is higher in level than the second attribute.
5. The single data source data management method of claim 4, wherein the method further comprises:
graying the second attribute before the return data of the first attribute value of the first attribute has data which is consistent with the second attribute, so that the second attribute is in an inoperable state;
and in response to the returned data of the first attribute value of the first attribute having the data which conforms to the second attribute, deashing the second attribute so that the second attribute is in an operable state.
6. The single data source data management method of claim 5, wherein the method further comprises:
in response to selecting a second attribute value under the second attribute, a second data query instruction is generated.
7. The single data source data management method of claim 6, wherein the method further comprises:
in response to the second data query instruction, traversing all values which accord with the second attribute in the second temporary array, and acquiring data of the second attribute value corresponding to the second attribute and storing the data into the first temporary array;
acquiring all data which accord with a third attribute in the first temporary array through a uniq method function and storing the data into a third temporary array;
clearing the first temporary array and returning the data in the third temporary array;
wherein the second attribute and the third attribute are cascade attributes, and the level of the second attribute is higher than that of the third attribute.
8. The single data source data management method of claim 4 or 7, wherein the method further comprises:
and responding to the current attribute as the last attribute in the cascade attribute combination, processing the first temporary array through an uniq method function, storing the processed data in a fourth temporary array, and returning.
9. A single data source data management apparatus, comprising:
the management setting module is configured for determining a target single data source and managing a cascading attribute combination of the target single data source;
the query marking module is configured to traverse all data in the target single data source and mark the data which accords with the corresponding attribute in the cascade attribute combination; and
and the attribute query module is configured to respond to the obtained data query instruction, obtain the sub data sources conforming to the corresponding attributes through the uniq method function and return the sub data sources.
10. A storage medium containing an executable computer program which when executed performs the steps of a method of single data source data management as claimed in any one of claims 1 to 8.
CN202111005474.1A 2021-08-30 2021-08-30 Single data source data management method, device and storage medium Active CN113806365B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111005474.1A CN113806365B (en) 2021-08-30 2021-08-30 Single data source data management method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111005474.1A CN113806365B (en) 2021-08-30 2021-08-30 Single data source data management method, device and storage medium

Publications (2)

Publication Number Publication Date
CN113806365A true CN113806365A (en) 2021-12-17
CN113806365B CN113806365B (en) 2024-02-23

Family

ID=78894396

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111005474.1A Active CN113806365B (en) 2021-08-30 2021-08-30 Single data source data management method, device and storage medium

Country Status (1)

Country Link
CN (1) CN113806365B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114880344A (en) * 2022-05-09 2022-08-09 北京达佳互联信息技术有限公司 Data processing method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080222129A1 (en) * 2007-03-05 2008-09-11 Komatsu Jeffrey G Inheritance of attribute values in relational database queries
US20080294596A1 (en) * 2007-05-23 2008-11-27 Business Objects, S.A. System and method for processing queries for combined hierarchical dimensions
CN108171075A (en) * 2017-12-14 2018-06-15 北京金风科创风电设备有限公司 Data query authority management and query method and device
CN111443970A (en) * 2020-03-24 2020-07-24 山东浪潮通软信息科技有限公司 Method, device and equipment for assembling multi-source data and readable medium
CN111897837A (en) * 2019-05-06 2020-11-06 百度在线网络技术(北京)有限公司 Data query method, device, equipment and medium
CN113067878A (en) * 2021-03-26 2021-07-02 深圳前海微众银行股份有限公司 Information acquisition method, information acquisition device, information acquisition apparatus, information acquisition medium, and program product

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080222129A1 (en) * 2007-03-05 2008-09-11 Komatsu Jeffrey G Inheritance of attribute values in relational database queries
US20080294596A1 (en) * 2007-05-23 2008-11-27 Business Objects, S.A. System and method for processing queries for combined hierarchical dimensions
CN108171075A (en) * 2017-12-14 2018-06-15 北京金风科创风电设备有限公司 Data query authority management and query method and device
CN111897837A (en) * 2019-05-06 2020-11-06 百度在线网络技术(北京)有限公司 Data query method, device, equipment and medium
CN111443970A (en) * 2020-03-24 2020-07-24 山东浪潮通软信息科技有限公司 Method, device and equipment for assembling multi-source data and readable medium
CN113067878A (en) * 2021-03-26 2021-07-02 深圳前海微众银行股份有限公司 Information acquisition method, information acquisition device, information acquisition apparatus, information acquisition medium, and program product

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王颖;: "分布式空间数据源的联合查询", 计算机工程与设计, no. 04, 28 February 2007 (2007-02-28) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114880344A (en) * 2022-05-09 2022-08-09 北京达佳互联信息技术有限公司 Data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113806365B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
CN108388604B (en) User authority data management apparatus, method and computer readable storage medium
CN106326309B (en) Data query method and device
CN114416667B (en) Method and device for rapidly sharing network disk file, network disk and storage medium
CN115757629A (en) Multi-source heterogeneous data increment synchronization method and system, storage medium and electronic equipment
CN113806365A (en) Single data source data management method, device and storage medium
CN106777097B (en) Merging method for metadata layering extension
CN111475511A (en) Data storage method, data access method, data storage device, data access device and data access equipment based on tree structure
CN109254962B (en) Index optimization method and device based on T-tree and storage medium
CN113553458A (en) Data export method and device in graph database
CN111125216B (en) Method and device for importing data into Phoenix
CN108897858A (en) The appraisal procedure and device, electronic equipment of distributed type assemblies index fragment
CN112997172A (en) Computationally efficient tag determination for data assets
CN110413617B (en) Method for dynamically adjusting hash table group according to size of data volume
CN106372121B (en) Server and data processing method
CN114118944A (en) Forensic laboratory grading management method, terminal device and storage medium
CN114064653A (en) Data insertion method and device, computer equipment and storage medium
US8656410B1 (en) Conversion of lightweight object to a heavyweight object
CN110505321B (en) Method and system for accessing IP address
CN113282616A (en) Incremental time sequence data conflict detection method and device and storage medium
CN113419792A (en) Event processing method and device, terminal equipment and storage medium
CN113031835A (en) Menu data processing method and device
CN114579530A (en) Table space migration method and device, electronic equipment and computer readable storage medium
CN113434490A (en) Quality detection method and device for offline imported data
CN113127475A (en) Data processing method, system and device
CN111310088A (en) Page rendering method and device

Legal Events

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