Nothing Special   »   [go: up one dir, main page]

CN113434587B - Data storage and data query method and system - Google Patents

Data storage and data query method and system Download PDF

Info

Publication number
CN113434587B
CN113434587B CN202110736588.7A CN202110736588A CN113434587B CN 113434587 B CN113434587 B CN 113434587B CN 202110736588 A CN202110736588 A CN 202110736588A CN 113434587 B CN113434587 B CN 113434587B
Authority
CN
China
Prior art keywords
node
storage
data
storage information
query
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
CN202110736588.7A
Other languages
Chinese (zh)
Other versions
CN113434587A (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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110736588.7A priority Critical patent/CN113434587B/en
Publication of CN113434587A publication Critical patent/CN113434587A/en
Application granted granted Critical
Publication of CN113434587B publication Critical patent/CN113434587B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • 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/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • 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
    • 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)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a data storage and data query method and a system, wherein the method comprises the following steps: receiving storage information of an H5 page, wherein the storage information is constructed in a tree structure mode, and each node in the tree comprises a node name and a node value; and carrying out escape processing on the storage information, and storing the storage information subjected to the escape processing into a storage library, wherein the storage information subjected to the escape processing is in a non-plaintext storage mode. The invention directly stores data in the key value pair containing the node name and the node value in a tree structure mode, and stores the stored data information into the storage library after the escape through Native.

Description

Data storage and data query method and system
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a method and a system for data storage and data query.
Background
In the development of a cross-platform client, H5 is the most widely used mode, relates to the storage of H5 and native data, and has a plurality of modes for communication, but the data storage modes are complex, various conversions are needed in the middle, the universality is not strong, the multi-scene service can not be met, in addition, in the development process, a plurality of modules have the requirement of data storage, and APP has a certain requirement on the safety of data storage; each module is developed separately, which causes resource waste and the security is uncontrollable.
In the existing data storage method, most of the technical schemes are that H5 is packaged through an interface provided by Native and is converted into a mode of being compatible with a Native database for storage, and the method has no universality, is strong in coupling and is easy to make mistakes.
Therefore, a method and system for data storage and data query are needed to solve the above problems.
Disclosure of Invention
Aiming at the problems existing in the prior art, the invention provides a data storage and data query method and system.
The invention provides a data storage method, which comprises the following steps:
receiving storage information of an H5 page, wherein the storage information is constructed in a tree structure mode, and each node in the tree structure comprises a node name and a node value;
and carrying out escape processing on the storage information, and storing the storage information subjected to the escape processing into a storage library, wherein the storage information subjected to the escape processing is in a non-plaintext storage mode.
According to the data storage method provided by the invention, before the stored information of the H5 page is received, the method further comprises the following steps:
and performing addition processing, deletion processing and modification processing on the node data in the stored information.
According to the data storage method provided by the invention, before the stored information is subjected to the escape processing and the stored information after the escape processing is stored in the storage library, the method further comprises the following steps:
judging a current path of an additional node, and if the current path is judged to be not empty in node name and a father node does not exist in the node name, creating the father node corresponding to the node name;
judging the path under the father node, and judging the type of the node if judging that the path under the father node does not have the node;
and if the judgment is that the type of the node value of the additional node is consistent with the type of the node value of the existing node, storing the stored data.
The invention provides a data query method, which comprises the following steps:
receiving a query data request from an H5 page, wherein the query data request obtains a node value in a path mode, and the node value is the sum of a plurality of child node values under the same father node;
inquiring a storage library according to the inquiry data request to acquire inquiry data; the data stored in the storage library is obtained by receiving the storage information of the H5 page through Native, performing escape processing on the storage information through Native, and storing the storage information subjected to the escape processing into the storage library; the storage information is constructed in a tree structure mode, each node in the tree structure comprises a node name and a node value, and the storage information after the escape processing is in a non-plaintext storage mode;
and carrying out plaintext conversion on the query data, and sending the query data subjected to plaintext conversion to an H5 page to obtain a node value.
According to the data query method provided by the invention, the types of query data are int, long, float and double types.
The present invention also provides a data storage system comprising:
the information storage module is used for receiving the storage information of the H5 page, wherein the storage information is constructed in a tree structure mode, and each node in the tree structure comprises a node name and a node value;
and the escape processing module is used for performing escape processing on the storage information and storing the storage information subjected to the escape processing to a storage library, wherein the storage information subjected to the escape processing is in a non-plaintext storage mode.
According to the present invention there is provided a data storage system, the system further comprising:
the first judging module is used for judging the current path of the additional node, and if the current path is judged to be not empty and the node name does not have a father node, the father node corresponding to the node name is created;
the second judging module is used for judging the path under the father node, and judging the type of the node if judging that the path under the father node does not have the node;
and the third judging module is used for storing the stored data if judging that the type of the node value of the additional node is consistent with the type of the node value of the existing node.
The invention also provides a data query system, comprising:
the request receiving module is used for receiving a query data request from an H5 page, wherein the query data request obtains a node value in a path mode, and the node value is the sum of a plurality of child node values under the same father node;
the query module is used for querying the storage library according to the query data request to acquire query data; the data stored in the storage library is obtained by receiving the storage information of the H5 page through Native, performing escape processing on the storage information through Native, and storing the storage information subjected to the escape processing into the storage library; the storage information is constructed in a tree structure mode, each node in the tree structure comprises a node name and a node value, and the storage information after the escape processing is in a non-plaintext storage mode;
the plaintext conversion module is used for performing plaintext conversion on the query data, and sending the query data subjected to plaintext conversion to an H5 page to obtain a node value.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any one of the data storage methods or the data query methods described above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of a data storage method or a data querying method as described in any of the above.
According to the data storage and data query method and system, the data is directly stored in the key value pair containing the node name and the node value in the tree structure mode, and the stored data information is stored in the storage library after being converted by Native, so that the safety performance of processing the stored data is improved, the stored data is simpler and more flexible, and meanwhile, the stored data is convenient to maintain.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a data storage method according to the present invention;
FIG. 2 is a schematic logic flow diagram of an additional node method according to the present invention;
FIG. 3 is a schematic flow chart of a data query method according to the present invention;
FIG. 4 is a schematic diagram of a data storage method according to the present invention;
FIG. 5 is a schematic diagram of a data storage system according to the present invention;
FIG. 6 is a schematic diagram of a data query system according to the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a schematic flow chart of a data storage method provided by the present invention, and as shown in fig. 1, the present invention provides a data storage method, including:
step 101, receiving storage information of an H5 page, wherein the storage information is constructed in a tree structure mode, and each node in the tree structure comprises a node name and a node value.
In the invention, H5 can store data through Native, and H5 and Native can also share the stored data. The stored information is directly stored in a tree structure through key value pairs. The key-value pair type is denoted as key-valid. Specifically, the stored data uses a key-value as a node, the key is the node name, and the value is the node value. Where key represents a data type using a character string as a key, cannot be null (null/nil or null character string), value represents a supported data type, which may be a basic data type (byte, char, int, long, float, double, boolean) and a character string.
Alternatively, each node supports a node name in a path format, which may be 'device/redPoint', so that the design is more suitable for service requirements.
And 102, performing escape processing on the storage information, and storing the storage information subjected to the escape processing into a storage library, wherein the storage information subjected to the escape processing is in a non-plaintext storage mode.
In the invention, because the database storage mode is non-plaintext storage, namely the storage data is encrypted characters or characters, the stored information needs to be subjected to escape processing through Native. The escape process may be to prepend letters or strings with "\" to represent common ASCII characters that cannot be displayed, such as \0, \t, \n, etc. By storing the storage information after the escape processing to the storage library, a unified general storage library is adopted, so that a plurality of modules can conveniently and directly call the storage data without any modification.
According to the data storage method provided by the invention, the data is directly stored in the key value pair comprising the node name and the node value in a tree structure mode, and the stored data information is stored in the storage library after being converted by Native, so that the safety performance of processing the stored data is improved by adopting a unified storage scheme, the stored data is simpler and more flexible, and meanwhile, the stored data is also convenient to maintain.
On the basis of the above embodiment, before the receiving the stored information of the H5 page, the method further includes:
and performing addition processing, deletion processing and modification processing on the node data in the stored information.
In the invention, the node data in the stored information can be processed by adding nodes, deleting nodes and modifying nodes, the operations of adding and deleting nodes can be dynamically performed on line in real time, the data processing is flexibly performed, and the stored data is convenient to maintain.
Alternatively Native supports the update time of the recorded data and can be queried through the interface provided by Native.
On the basis of the above embodiment, before the performing the escape processing on the storage information and storing the storage information after the escape processing in a storage library, the method further includes:
judging a current path of an additional node, and if the current path is judged to be not empty in node name and a father node does not exist in the node name, creating the father node corresponding to the node name;
judging the path under the father node, and judging the type of the node if judging that the path under the father node does not have the node;
and if the judgment is that the type of the node value of the additional node is consistent with the type of the node value of the existing node, storing the stored data.
Fig. 2 is a logic flow diagram of a method for adding a node according to the present invention, and as shown in fig. 2, the present invention provides a method for adding a node, including:
step 201, verifying the validity of the path for the additional node by Native, if the verification path is empty, i.e. the node name of the current path is empty, the current path is invalid, and returning a failure result code 1001; if the verification path is valid, namely the node name of the current path is not null, and a father node does not exist in the node names, creating the father node corresponding to the node names;
step 202, judging the established father node, if the establishment of the father node is successful, judging the path under the father node; if the creation of the parent node fails, a failure result code 1003 is returned;
step 203, judging whether a node exists in a path under a father node, if yes, judging the type of the node; if it is determined that the path already has a node, a failure result code is returned 1002;
step 204, verifying the validity of the node type, and if the type of the added node value is judged to be consistent with the type of the node value corresponding to the existing node name, storing the stored data; if the type of the added node value is not consistent with the type of the node value corresponding to the existing node name, returning a failure result code 1004;
step 205, judging the stored data, if the stored data is successful, returning a success result code 1005; if the store fails, a failure result code 1005 is returned.
Fig. 3 is a flow chart of a data query method provided by the present invention, and as shown in fig. 3, the present invention provides a data query method, including:
step 301, receiving a query data request from an H5 page, where the query data request obtains a node value in a path manner, and the node value is a sum of a plurality of child node values under the same parent node;
step 302, according to the query data request, querying a storage library to obtain query data; the data stored in the storage library is obtained by receiving the storage information of the H5 page through Native, performing escape processing on the storage information through Native, and storing the storage information subjected to the escape processing into the storage library; the storage information is constructed in a tree structure mode, each node in the tree structure comprises a node name and a node value, and the storage information after the escape processing is in a non-plaintext storage mode;
and 303, performing plaintext conversion on the query data, and sending the query data subjected to plaintext conversion to an H5 page to obtain a node value.
In the invention, native receives a query data request from an H5 page, and the query data request can acquire a node value through a path (for example, "root/t 11"), wherein the node value=sum (child node value), namely the node value is the sum of all child node values under the same father node.
Alternatively, a child node data list may be obtained via a path (e.g., "root/t 11"), supporting ordering according to the child node value, the child node data list including keys and values for the child nodes.
Further, according to the query data request of the H5 page, the H5 may call the data in the repository by one key to obtain the query data, where the data stored in the repository is implemented by the data storage method in the above embodiment, which is not repeated herein.
Further, through Native, the query data is subjected to plaintext conversion to obtain decrypted query data, the decrypted query data is sent to an H5 page, and the node value can be directly queried through the H5 page.
According to the data query method provided by the invention, the Native receives the query data request of the H5 page, the query data request supports the node name of the path mode, and meanwhile, the multiple modules can query data and store data based on the universal storage library, and no modification is needed, so that the query data is more flexible and simple.
It should be noted that in the development of the cross-platform client, multiple modules are required to store data, and the schemes designed by each developer are different in writing mode, so that multiple storage schemes exist in one APP, and data processing is unsafe. Therefore, the invention adopts a unified general storage scheme, and a plurality of modules can directly call the data in the storage library, thereby improving the safety performance of processing the stored data, leading the stored data to be simpler and more flexible and being convenient for maintaining the stored data.
Based on the above embodiment, the types of the query data are int, long, float and double types.
In the invention, when the general memory bank is adopted to inquire and store data, the node value is obtained through a path and the child node data list is obtained through a path, and the supported data types are int, long, float and double. The data storage is stored in a tree structure, and meanwhile, the query data supports multiple types, so that the multi-module storage requirement is met.
Fig. 4 is a schematic diagram of a frame of a data storage method provided by the present invention, as shown in fig. 4, native receives storage information from an H5 page, where the storage information is directly stored in a tree structure through key-value pairs (key-valid), and the storage information is subjected to escape processing through Native, and the escape processed storage information is stored in a repository, and if the storage data is successful, a notification of the storage success is returned to the H5 page through Native. In this embodiment, the node storage method in which the storage information supports the path format may be { key: deviceClickEventCounts/{ useid }/DC330D912316value:1011}, for example.
Further, according to the query data request of the H5 page, the data in the storage library is queried to obtain query data, wherein the path format of the query data request can be "root/t11". And then, carrying out plaintext conversion on the query data through Native, and sending the query data subjected to plaintext conversion to an H5 page, wherein the node value can be directly queried through the H5 page.
In one embodiment, when counting the number of clicks of the mobile user terminal device, native records the number of clicks, and the H5 page can read the number of clicks (i.e., the capability of providing front-end access by the container). The number of red dots can be stored in a tree structure mode, so that the data of each node can be conveniently read, and the data of the node can be modified. The tree structure mode can use the service module as a main trunk, the sub-service flow is branch, the branch nodes are separated by a '/' interval, and the key value is unique.
Fig. 5 is a schematic structural diagram of a data storage system provided by the present invention, and as shown in fig. 5, the present invention provides a data storage system, which includes an information storage module 501 and an escape processing module 502, wherein the information storage module 501 is configured to receive storage information of an H5 page, the storage information is constructed in a tree structure, and each node in the tree structure includes a node name and a node value; the escape processing module 502 is configured to perform escape processing on the storage information, and store the storage information after the escape processing to a storage library, where the storage information after the escape processing is in a non-plaintext storage manner.
According to the data storage system provided by the invention, the data is directly stored in the key value pair comprising the node name and the node value in a tree structure mode, and the stored data information is stored in the storage library after being converted by Native, so that the safety performance of processing the stored data is improved by adopting a unified storage scheme, the stored data is simpler and more flexible, and meanwhile, the stored data is also convenient to maintain.
On the basis of the embodiment, the data storage system further comprises a first judging module, a second judging module and a third judging module, wherein the first judging module is used for judging a current path of an additional node, and if the current path is judged to be not empty and a father node does not exist in the node names, the father node corresponding to the node name is created; the second judging module is used for judging the path under the father node, and judging the type of the node if judging that the path under the father node does not have the node; and the third judging module is used for judging that the type of the node value of the additional node is consistent with the type of the node value of the existing node, and if the type of the node value of the additional node is judged to be consistent with the type of the node value of the existing node, the data storage is successful.
Fig. 6 is a schematic structural diagram of a data query system provided by the present invention, and as shown in fig. 6, the present invention provides a data query system, which includes a request receiving module 601, a query module 602, and a plaintext conversion module 603, where the request receiving module 601 is configured to receive a query data request from an H5 page, where the query data request obtains a node value in a path manner, and the node value is a sum of a plurality of child node values under the same parent node; the query module 602 is configured to query a repository according to the query data request, to obtain query data; the data stored in the storage library is obtained by receiving the storage information of the H5 page through Native, performing escape processing on the storage information through Native, and storing the storage information subjected to the escape processing into the storage library; the storage information is constructed in a tree structure mode, each node in the tree structure comprises a node name and a node value, and the storage information after the escape processing is in a non-plaintext storage mode; the plaintext conversion module 603 is configured to perform plaintext conversion on the query data, and send the query data after plaintext conversion to an H5 page, to obtain a node value.
According to the data query system provided by the invention, the Native receives the query data request of the H5 page, the query data request supports the node name of the path mode, and meanwhile, the multiple modules can query data and store data based on the universal storage library, and no modification is needed, so that the query data is more flexible and simple.
The system provided by the invention is used for executing the method embodiments, and specific flow and details refer to the embodiments and are not repeated herein.
Fig. 7 is a schematic structural diagram of an electronic device according to the present invention, as shown in fig. 7, the electronic device may include: a processor (processor) 701, a communication interface (Communications Interface) 702, a memory (memory) 703 and a communication bus 704, wherein the processor 701, the communication interface 702 and the memory 703 communicate with each other through the communication bus 704. The processor 701 may invoke logic instructions in the memory 703 to perform a data storage method comprising: receiving storage information of an H5 page, wherein the storage information is constructed in a tree structure mode, and each node in the tree structure comprises a node name and a node value; performing escape processing on the storage information, and storing the storage information subjected to the escape processing to a storage library, wherein the storage information subjected to the escape processing is in a non-plaintext storage mode;
or,
to perform a data query method, the method comprising: receiving a query data request from an H5 page, wherein the query data request obtains a node value in a path mode, and the node value is the sum of a plurality of child node values under the same father node; inquiring a storage library according to the inquiry data request to acquire inquiry data; the data stored in the storage library is obtained by receiving the storage information of the H5 page through Native, performing escape processing on the storage information through Native, and storing the storage information subjected to the escape processing into the storage library; the storage information is constructed in a tree structure mode, each node in the tree structure comprises a node name and a node value, and the storage information after the escape processing is in a non-plaintext storage mode; and carrying out plaintext conversion on the query data, and sending the query data subjected to plaintext conversion to an H5 page to obtain a node value.
Further, the logic instructions in the memory 703 may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the data storage method provided by the above methods, the method comprising: receiving storage information of an H5 page, wherein the storage information is constructed in a tree structure mode, and each node in the tree structure comprises a node name and a node value; performing escape processing on the storage information, and storing the storage information subjected to the escape processing to a storage library, wherein the storage information subjected to the escape processing is in a non-plaintext storage mode;
or,
the computer can execute the data query method provided by the methods, and the method comprises the following steps: receiving a query data request from an H5 page, wherein the query data request obtains a node value in a path mode, and the node value is the sum of a plurality of child node values under the same father node; inquiring a storage library according to the inquiry data request to acquire inquiry data; the data stored in the storage library is obtained by receiving the storage information of the H5 page through Native, performing escape processing on the storage information through Native, and storing the storage information subjected to the escape processing into the storage library; the storage information is constructed in a tree structure mode, each node in the tree structure comprises a node name and a node value, and the storage information after the escape processing is in a non-plaintext storage mode; and carrying out plaintext conversion on the query data, and sending the query data subjected to plaintext conversion to an H5 page to obtain a node value.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which when executed by a processor is implemented to perform the data storage methods provided above, the method comprising: receiving storage information of an H5 page, wherein the storage information is constructed in a tree structure mode, and each node in the tree structure comprises a node name and a node value; performing escape processing on the storage information, and storing the storage information subjected to the escape processing to a storage library, wherein the storage information subjected to the escape processing is in a non-plaintext storage mode;
or,
the computer program, when executed by a processor, is implemented to perform the data query methods provided above, the method comprising: receiving a query data request from an H5 page, wherein the query data request obtains a node value in a path mode, and the node value is the sum of a plurality of child node values under the same father node; inquiring a storage library according to the inquiry data request to acquire inquiry data; the data stored in the storage library is obtained by receiving the storage information of the H5 page through Native, performing escape processing on the storage information through Native, and storing the storage information subjected to the escape processing into the storage library; the storage information is constructed in a tree structure mode, each node in the tree structure comprises a node name and a node value, and the storage information after the escape processing is in a non-plaintext storage mode; and carrying out plaintext conversion on the query data, and sending the query data subjected to plaintext conversion to an H5 page to obtain a node value.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A method of data storage, comprising:
receiving storage information of an H5 page, wherein the storage information is constructed in a tree structure mode, and each node in the tree structure comprises a node name and a node value;
performing escape processing on the storage information, and storing the storage information subjected to the escape processing to a storage library, wherein the storage information subjected to the escape processing is in a non-plaintext storage mode;
before the escaping processing is performed on the storage information and the storage information after the escaping processing is stored in a storage library, the method further comprises:
judging a current path of an additional node, and if the current path is judged to be not empty in node name and a father node does not exist in the node name, creating the father node corresponding to the node name;
judging the path under the father node, and judging the type of the node if judging that the path under the father node does not have the node;
and if the judgment is that the type of the node value of the additional node is consistent with the type of the node value of the existing node, storing the stored data.
2. The data storage method of claim 1, wherein prior to said receiving the stored information of the H5 page, the method further comprises:
and performing addition processing, deletion processing and modification processing on the node data in the stored information.
3. A method of querying data, comprising:
receiving a query data request from an H5 page, wherein the query data request obtains a node value in a path mode, and the node value is the sum of a plurality of child node values under the same father node;
inquiring a storage library according to the inquiry data request to acquire inquiry data; the data stored in the storage library is obtained by receiving the storage information of the H5 page through Native, performing escape processing on the storage information through Native, and storing the storage information subjected to the escape processing into the storage library; the storage information is constructed in a tree structure mode, each node in the tree structure comprises a node name and a node value, and the storage information after the escape processing is in a non-plaintext storage mode;
and carrying out plaintext conversion on the query data, and sending the query data subjected to plaintext conversion to an H5 page to obtain a node value.
4. A data query method as claimed in claim 3, wherein the types of query data are int, long, float and double types.
5. A data storage system, comprising:
the information storage module is used for receiving the storage information of the H5 page, wherein the storage information is constructed in a tree structure mode, and each node in the tree structure comprises a node name and a node value;
the escape processing module is used for performing escape processing on the storage information and storing the storage information subjected to the escape processing to a storage library, wherein the storage information subjected to the escape processing is in a non-plaintext storage mode;
the first judging module is used for judging the current path of the additional node, and if the current path is judged to be not empty and the node name does not have a father node, the father node corresponding to the node name is created;
the second judging module is used for judging the path under the father node, and judging the type of the node if judging that the path under the father node does not have the node;
and the third judging module is used for storing the stored data if judging that the type of the node value of the additional node is consistent with the type of the node value of the existing node.
6. A data query system, comprising:
the request receiving module is used for receiving a query data request from an H5 page, wherein the query data request obtains a node value in a path mode, and the node value is the sum of a plurality of child node values under the same father node;
the query module is used for querying the storage library according to the query data request to acquire query data; the data stored in the storage library is obtained by receiving the storage information of the H5 page through Native, performing escape processing on the storage information through Native, and storing the storage information subjected to the escape processing into the storage library; the storage information is constructed in a tree structure mode, each node in the tree structure comprises a node name and a node value, and the storage information after the escape processing is in a non-plaintext storage mode;
the plaintext conversion module is used for performing plaintext conversion on the query data, and sending the query data subjected to plaintext conversion to an H5 page to obtain a node value.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the data storage method of any one of claims 1 to 2 or the data querying method of any one of claims 3 to 2 when the program is executed by the processor.
8. A non-transitory computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the data storage method of any of claims 1 to 2 or the data querying method of any of claims 3 to 4.
CN202110736588.7A 2021-06-30 2021-06-30 Data storage and data query method and system Active CN113434587B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110736588.7A CN113434587B (en) 2021-06-30 2021-06-30 Data storage and data query method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110736588.7A CN113434587B (en) 2021-06-30 2021-06-30 Data storage and data query method and system

Publications (2)

Publication Number Publication Date
CN113434587A CN113434587A (en) 2021-09-24
CN113434587B true CN113434587B (en) 2023-08-18

Family

ID=77758172

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110736588.7A Active CN113434587B (en) 2021-06-30 2021-06-30 Data storage and data query method and system

Country Status (1)

Country Link
CN (1) CN113434587B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1545048A (en) * 2003-11-17 2004-11-10 中兴通讯股份有限公司 Method for implementing tree storage and access by two-dimensional table
CN109889504A (en) * 2019-01-23 2019-06-14 北京航空航天大学 Decentralization data access rights method of commerce and system
CN111309822A (en) * 2020-02-11 2020-06-19 深圳众赢维融科技有限公司 User identity identification method and device
CN111368146A (en) * 2018-12-26 2020-07-03 北京国双科技有限公司 Path information query method and device, storage medium and processor
CN111897602A (en) * 2020-08-06 2020-11-06 平安普惠企业管理有限公司 Method, device, equipment and medium for loading and updating H5 page
CN112100550A (en) * 2019-06-17 2020-12-18 北京京东尚科信息技术有限公司 Page construction method and device
CN112114994A (en) * 2020-09-28 2020-12-22 平安普惠企业管理有限公司 Exception handling method, device, equipment and medium
CN112367549A (en) * 2020-11-10 2021-02-12 四川长虹电器股份有限公司 Video playing implementation method of television browser and browser application operation method
CN112395483A (en) * 2020-11-13 2021-02-23 郑州阿帕斯数云信息科技有限公司 Page rendering method and device based on tree structure

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8072903B2 (en) * 2006-05-30 2011-12-06 Genband Us Llc Methods, systems, and computer program products for performing range-based directory number (DN) screening
US9142192B2 (en) * 2011-09-26 2015-09-22 Intel Corporation Simulation of web applications and secondary devices in a web browser, web application development tools, and methods using the same

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1545048A (en) * 2003-11-17 2004-11-10 中兴通讯股份有限公司 Method for implementing tree storage and access by two-dimensional table
CN111368146A (en) * 2018-12-26 2020-07-03 北京国双科技有限公司 Path information query method and device, storage medium and processor
CN109889504A (en) * 2019-01-23 2019-06-14 北京航空航天大学 Decentralization data access rights method of commerce and system
CN112100550A (en) * 2019-06-17 2020-12-18 北京京东尚科信息技术有限公司 Page construction method and device
CN111309822A (en) * 2020-02-11 2020-06-19 深圳众赢维融科技有限公司 User identity identification method and device
CN111897602A (en) * 2020-08-06 2020-11-06 平安普惠企业管理有限公司 Method, device, equipment and medium for loading and updating H5 page
CN112114994A (en) * 2020-09-28 2020-12-22 平安普惠企业管理有限公司 Exception handling method, device, equipment and medium
CN112367549A (en) * 2020-11-10 2021-02-12 四川长虹电器股份有限公司 Video playing implementation method of television browser and browser application operation method
CN112395483A (en) * 2020-11-13 2021-02-23 郑州阿帕斯数云信息科技有限公司 Page rendering method and device based on tree structure

Also Published As

Publication number Publication date
CN113434587A (en) 2021-09-24

Similar Documents

Publication Publication Date Title
CN103618794B (en) Method, terminal and the server of automated log on
US10397147B2 (en) Method, apparatus and device for exchanging name card
US10839145B2 (en) Form filling method and related terminal
CN107168971B (en) Data processing method and device for webpage application
CN111443901B (en) Java reflection-based service expansion method and device
CN113268336B (en) Service acquisition method, device, equipment and readable medium
CN101925020A (en) Method and system for binding E-mail addresses and mobile phone number
KR102114532B1 (en) Information operation
CN103503388B (en) A kind of distributed queue's message read method and equipment, system
CN105554136A (en) Backup data restoration method, device and system
CN113434587B (en) Data storage and data query method and system
US20140379820A1 (en) Email address and telephone number unification systems and methods
CN114390452B (en) Message sending method and related equipment
US9503351B1 (en) Deployment feedback for system updates to resources in private networks
US20170289166A1 (en) Methods and apparatuses for providing improved directory services
CN100387075C (en) Rate treating device, short message charge-deducting system and method
CN114942781A (en) Data format adaptation method and device for data reading
WO2017143931A1 (en) Method and apparatus for identifying smart card, method and apparatus for processing smart card identification data, and device
CN109787945B (en) Method and device for realizing user component in Android system
CN109145645B (en) Method for protecting short message verification code in android mobile phone
CN111654476A (en) User authorized access processing method and device
CN113342811B (en) HBase table data processing method and device
CN114827274B (en) Request processing method and device
CN113672385B (en) Server hardware resource management system, method and device and storage medium
CN113010196B (en) Patch screening method, device, equipment and storage medium

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