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

Data storage and data query method and system Download PDF

Info

Publication number
CN113434587A
CN113434587A CN202110736588.7A CN202110736588A CN113434587A CN 113434587 A CN113434587 A CN 113434587A CN 202110736588 A CN202110736588 A CN 202110736588A CN 113434587 A CN113434587 A CN 113434587A
Authority
CN
China
Prior art keywords
node
data
storage
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.)
Granted
Application number
CN202110736588.7A
Other languages
Chinese (zh)
Other versions
CN113434587B (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

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/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)
  • Computational Linguistics (AREA)
  • Software Systems (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 performing escape processing on the storage information, and storing the escape-processed storage information into a storage library, wherein the escape-processed storage information is in a non-plaintext storage mode. The invention directly stores data by key value pairs containing node names and node values in a tree structure mode, and the stored data information is transferred and stored to a storage library by Native, and a uniform storage scheme is adopted, so that the safety performance of processing the stored data is improved, the stored data is simpler and more flexible, and the stored data is convenient to maintain.

Description

Data storage and data query method and system
Technical Field
The invention relates to the technical field of computer application, in particular to a data storage and data query method and system.
Background
In the cross-platform client development, H5 is the most widely used mode, and relates to the storage of H5 and native data, and the communication has multiple modes, but the data storage modes are all complex, various conversions are needed in the middle, the universality is not strong, the multi-scenario service cannot be met, in addition, in the development process, a plurality of modules have the data storage requirements, and the APP has certain requirements on the data storage safety; the respective development of each module can cause resource waste, and the security is uncontrollable.
Most of the existing data storage methods have the technical scheme that H5 is packaged through an interface provided by Native and is converted into a mode compatible with a Native database for storage, and the method has no universality, relatively high coupling and high error probability.
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 in the prior art, the invention provides a data storage method, a data query method and a data storage 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 performing escape processing on the storage information, and storing the escape-processed storage information into a storage library, wherein the escape-processed storage information is in a non-plaintext storage mode.
According to a data storage method provided by the invention, before the receiving of the storage information of the H5 page, the method further comprises:
and performing addition processing, deletion processing and modification processing on the node data in the storage information.
According to a data storage method provided by the present invention, before performing escaping processing on the storage information and storing the escaped storage information in a repository, the method further comprises:
judging the current path of the added node, and if judging that the node name of the current path is not empty and no father node exists in the node name, creating a father node corresponding to the node name;
judging the path under the father node, and if judging that the path under the father node has no node, judging the type of the node;
and if the type of the node value of the additional node is judged to be consistent with that 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 data query request from an H5 page, wherein the data query request acquires 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 the repository according to the inquiry data request to acquire inquiry data; the data stored in the memory bank is obtained by receiving storage information of an H5 page through Native, performing escaping processing on the storage information through Native, and storing the escaped storage information in the memory bank; 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 escape-processed storage information is in a non-plaintext storage mode;
and performing plaintext conversion on the query data, sending the query data subjected to the plaintext conversion to an H5 page, and acquiring a node value.
According to the data query method provided by the invention, the types of the 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 storage information of an H5 page, wherein the storage information is obtained by constructing a tree structure, 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 escape-processed storage information into a storage library, wherein the escape-processed storage information is in a non-plaintext storage mode.
According to a data storage system provided by the present invention, the system further comprises:
the first judgment module is used for judging the current path of the additional node, and if the node name of the current path is judged to be not empty and no father node exists in the node name, the father node corresponding to the node name is created;
the second judgment 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 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 present invention also provides a data query system, including:
the device comprises a request receiving module, a query data request sending module and a query data receiving module, wherein the request receiving module is used for receiving a query data request from an H5 page, 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 repository according to the query data request to acquire query data; the data stored in the memory bank is obtained by receiving storage information of an H5 page through Native, performing escaping processing on the storage information through Native, and storing the escaped storage information in the memory bank; 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 escape-processed storage information is in a non-plaintext storage mode;
and the plaintext conversion module is used for carrying out plaintext conversion on the query data, sending the query data subjected to the plaintext conversion to an H5 page, and acquiring a node value.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the steps of any one of the data storage method or the data query method.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the data storage method or the data query method as described in any of the above.
According to the data storage and data query method and system, data are directly stored by key value pairs comprising node names and node values in a tree structure mode, stored data information is transferred and stored into a storage library through Native, and a uniform storage scheme is adopted, so that the safety performance of processing the stored data is improved, the stored data is simpler and more flexible, and the stored data is convenient to maintain.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for 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 some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a data storage method provided by the present invention;
FIG. 2 is a schematic logic flow diagram of a method for adding nodes according to the present invention;
FIG. 3 is a schematic flow chart of a data query method provided by the present invention;
FIG. 4 is a block diagram of a data storage method according to the present invention;
FIG. 5 is a schematic structural diagram of a data storage system provided by the present invention;
FIG. 6 is a schematic structural diagram of a data query system provided in the present invention;
fig. 7 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
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, which includes:
step 101, receiving storage information of an H5 page, where the storage information is constructed in a tree structure, and each node in the tree structure includes a node name and a node value.
In the invention, H5 can store data through Native, and H5 and Native can share the stored data. The storage information is directly stored in a tree structure mode through key value pairs. The key-value pair type is denoted as key-vaule. Specifically, the key-value is used as a node, the key is used as a node name, and the value is used as a node value. Here, key represents a data type using a character string as a key, and cannot be null (null/nil or null character string), value represents a supported data type, and may be a basic data type (byte, char, int, long, float, double, borolan) and a character string.
Optionally, each node supports a node name in a path format, which may be 'device/redPoint', and the node name in the path format is adopted, so that design of the node is facilitated, and the node is more suitable for service requirements.
And 102, performing escape processing on the storage information, and storing the escape-processed storage information into a storage library, wherein the escape-processed storage information 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 storage information needs to be subjected to escape processing through Native. The escaping process may be to add a "\" to the letter or string to represent common ASCII characters that cannot be displayed, such as \0, \ t, \\ n, etc. By storing the escaped storage information into the storage library and adopting a uniform universal storage library, a plurality of modules can directly call the storage data conveniently without any modification.
The data storage method provided by the invention directly stores data by using key value pairs comprising node names and node values in a tree structure mode, and the stored data information is transferred and stored to a storage library by Native.
On the basis of the above embodiment, before the receiving the storage information of the H5 page, the method further includes:
and performing addition processing, deletion processing and modification processing on the node data in the storage information.
In the invention, the node data in the storage information can be subjected to node adding, node deleting and node modifying processing, the node adding and node deleting operations can be dynamically carried out on line in real time, the data processing is flexibly carried out, and the storage data is convenient to maintain.
Optionally, Native supports the update time of the recorded data and can be queried through an interface provided by Native.
On the basis of the above embodiment, before performing the escaping processing on the storage information and storing the escaped storage information in the repository, the method further includes:
judging the current path of the added node, and if judging that the node name of the current path is not empty and no father node exists in the node name, creating a father node corresponding to the node name;
judging the path under the father node, and if judging that the path under the father node has no node, judging the type of the node;
and if the type of the node value of the additional node is judged to be consistent with that of the node value of the existing node, storing the stored data.
Fig. 2 is a schematic logic flow diagram of a node adding method provided by the present invention, and as shown in fig. 2, the present invention provides a node adding method, which includes:
step 201, verifying the validity of the path for the additional node through Native, if the verification path is empty, that is, 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 no father node exists in the node name, establishing a father node corresponding to the node name;
step 202, judging the created father node, and if the father node is successfully created, judging a 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 path under a father node has a node or not, and if judging that the path has no node, judging the type of the node; if the path is judged to have nodes, a failure result code 1002 is returned;
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 node value added is judged to be inconsistent with the type of the node value corresponding to the existing node name, a failure result code 1004 is returned;
step 205, judging the stored data, if the storage is successful, returning a success result code 1005; if the store fails, a failure result code 1005 is returned.
Fig. 3 is a schematic 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, which includes:
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 the sum of multiple child node values under the same parent node;
step 302, inquiring a repository according to the inquiry data request to acquire inquiry data; the data stored in the memory bank is obtained by receiving storage information of an H5 page through Native, performing escaping processing on the storage information through Native, and storing the escaped storage information in the memory bank; 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 escape-processed storage information is in a non-plaintext storage mode;
step 303, performing plaintext conversion on the query data, sending the query data subjected to plaintext conversion to an H5 page, and acquiring a node value.
In the invention, Native receives a query data request from an H5 page, and the query data request can obtain a node value through a path (for example, "root/t 11"), wherein the node value is sum (child node value), that is, the node value is the sum of all child node values under the same parent node.
Optionally, a child data list may be obtained via a path (e.g., "root/t 11"), enabling sorting according to child value, the child data list including child key and value.
Further, according to the query data request of the H5 page, the query is performed through the repository, and H5 may call the data in the repository by one key, so as 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 here.
Further, plaintext conversion is carried out on the query data through Native to obtain decrypted query data, the decrypted query data are sent to an H5 page, and the node value can be directly queried through an H5 page.
According to the data query method provided by the invention, the query data request of the H5 page is received through Native, the query data request supports the node name of the path mode, and meanwhile, a plurality of modules can query data and store data based on a universal repository without any modification, so that the query data is more flexible and simpler.
It should be noted that, in the cross-platform client development, multiple modules all need to have the requirement of storing data, and the schemes designed by each developer and the writing modes are different, so that multiple storage schemes exist in one APP, which causes insecurity in data processing. Therefore, the invention adopts a uniform 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, enabling the stored data to be simpler and more flexible, and being convenient for maintaining the stored data.
On the basis of the above embodiment, the types of the query data are int, long, float and double types.
In the invention, when the universal repository is adopted to inquire the stored data, the data types supported by the method of acquiring the node value through the path and the method of acquiring the data list of the child node through the path are all int, long, float and double types. The data storage is stored in a tree structure, and simultaneously, the query data supports multiple types, so that the requirement of multi-module storage is met.
Fig. 4 is a schematic diagram of a framework of the data storage method provided by the present invention, and as shown in fig. 4, Native receives storage information from an H5 page, where the storage information is directly stored by key-value pairs (key-value) in a tree structure manner, performs escaping processing on the storage information by Native, and stores the escaped storage information in a repository, and if the storage data is successful, returns a notification of successful storage to the H5 page by Native. In this embodiment, the node storage manner in which the storage information supports the path format may be { key: deviceClickEventCounts/{ userid }/DC330D912316value:1011}, for example.
Further, according to the query data request of the H5 page, querying the data in the repository to obtain the query data, wherein the path format of the query data request may be "root/t 11". And then, plaintext conversion is carried out on the query data through Native, the query data after the plaintext conversion is sent to an H5 page, and the node value can be directly queried through an 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 ability of front end access provided by the container). The number of red points can be stored in a tree structure mode, so that the data of each node can be read conveniently, and the data of the nodes can be modified. The tree structure mode can use the service module as a main frame, the sub-service flows as branches, the nodes of the branches are arranged at '/' intervals, 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, where 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 escaping processing module 502 is configured to perform escaping processing on the storage information and store the escaping processed storage information in a storage library, where the escaping processed storage information is in a non-plaintext storage manner.
The data storage system provided by the invention directly stores data by using key value pairs comprising node names and node values in a tree structure mode, and the stored data information is transferred and stored into a storage library by Native.
On the basis of the above embodiment, the data storage system further includes a first determination module, a second determination module, and a third determination module, where the first determination module is configured to determine a current path of an additional node, and if it is determined that a node name of the current path is not null and a parent node does not exist in the node name, create a parent node corresponding to the node name; 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 has no node; and the third judging module is used for successfully storing the 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.
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, where the data query system 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 multiple child node values under a same parent node; the query module 602 is configured to query the repository according to the query data request, and obtain query data; the data stored in the memory bank is obtained by receiving storage information of an H5 page through Native, performing escaping processing on the storage information through Native, and storing the escaped storage information in the memory bank; 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 escape-processed storage information 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 subjected to the plaintext conversion to an H5 page to obtain a node value.
The data query system provided by the invention receives the query data request of the H5 page through Native, the query data request supports the node name of the path mode, and meanwhile, a plurality of modules can query data and store data based on a universal repository without any modification, so that the query data is more flexible and simpler.
The system provided by the present invention is used for executing the above method embodiments, and for the specific processes and details, reference is made to the above embodiments, which are not described herein again.
Fig. 7 is a schematic structural diagram of an electronic device provided in the present invention, and 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 complete communication with each other through the communication bus 704. The processor 701 may call 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; conducting escaping processing on the storage information, and storing the escaping processed storage information into a storage library, wherein the escaping processed storage information is in a non-plaintext storage mode;
alternatively, the first and second electrodes may be,
to execute a data query method, the method comprising: receiving a data query request from an H5 page, wherein the data query request acquires 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 the repository according to the inquiry data request to acquire inquiry data; the data stored in the memory bank is obtained by receiving storage information of an H5 page through Native, performing escaping processing on the storage information through Native, and storing the escaped storage information in the memory bank; 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 escape-processed storage information is in a non-plaintext storage mode; and performing plaintext conversion on the query data, sending the query data subjected to the plaintext conversion to an H5 page, and acquiring a node value.
In addition, the logic instructions in the memory 703 can be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute 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), a magnetic disk or an optical disk, and 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; conducting escaping processing on the storage information, and storing the escaping processed storage information into a storage library, wherein the escaping processed storage information is in a non-plaintext storage mode;
alternatively, the first and second electrodes may be,
the computer can execute the data query method provided by the methods, and the method comprises the following steps: receiving a data query request from an H5 page, wherein the data query request acquires 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 the repository according to the inquiry data request to acquire inquiry data; the data stored in the memory bank is obtained by receiving storage information of an H5 page through Native, performing escaping processing on the storage information through Native, and storing the escaped storage information in the memory bank; 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 escape-processed storage information is in a non-plaintext storage mode; and performing plaintext conversion on the query data, sending the query data subjected to the plaintext conversion to an H5 page, and acquiring 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 method 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; conducting escaping processing on the storage information, and storing the escaping processed storage information into a storage library, wherein the escaping processed storage information is in a non-plaintext storage mode;
alternatively, the first and second electrodes may be,
the computer program is implemented by a processor to execute the data query methods provided by the above, and the method comprises: receiving a data query request from an H5 page, wherein the data query request acquires 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 the repository according to the inquiry data request to acquire inquiry data; the data stored in the memory bank is obtained by receiving storage information of an H5 page through Native, performing escaping processing on the storage information through Native, and storing the escaped storage information in the memory bank; 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 escape-processed storage information is in a non-plaintext storage mode; and performing plaintext conversion on the query data, sending the query data subjected to the plaintext conversion to an H5 page, and acquiring a node value.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of storing data, 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;
and performing escape processing on the storage information, and storing the escape-processed storage information into a storage library, wherein the escape-processed storage information is in a non-plaintext storage mode.
2. The data storage method of claim 1, wherein prior to said receiving storage information for a H5 page, said method further comprises:
and performing addition processing, deletion processing and modification processing on the node data in the storage information.
3. The data storage method according to claim 1, wherein before the performing the escaping processing on the storage information and storing the escaped storage information in the repository, the method further comprises:
judging the current path of the added node, and if judging that the node name of the current path is not empty and no father node exists in the node name, creating a father node corresponding to the node name;
judging the path under the father node, and if judging that the path under the father node has no node, judging the type of the node;
and if the type of the node value of the additional node is judged to be consistent with that of the node value of the existing node, storing the stored data.
4. A method for querying data, comprising:
receiving a data query request from an H5 page, wherein the data query request acquires 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 the repository according to the inquiry data request to acquire inquiry data; the data stored in the memory bank is obtained by receiving storage information of an H5 page through Native, performing escaping processing on the storage information through Native, and storing the escaped storage information in the memory bank; 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 escape-processed storage information is in a non-plaintext storage mode;
and performing plaintext conversion on the query data, sending the query data subjected to the plaintext conversion to an H5 page, and acquiring a node value.
5. The data query method of claim 4, wherein the query data is of int, long, float and double type.
6. A data storage system, comprising:
the information storage module is used for receiving storage information of an H5 page, wherein the storage information is obtained by constructing a tree structure, 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 escape-processed storage information into a storage library, wherein the escape-processed storage information is in a non-plaintext storage mode.
7. The data storage system of claim 6, wherein the system further comprises:
the first judgment module is used for judging the current path of the additional node, and if the node name of the current path is judged to be not empty and no father node exists in the node name, the father node corresponding to the node name is created;
the second judgment 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 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.
8. A data query system, comprising:
the device comprises a request receiving module, a query data request sending module and a query data receiving module, wherein the request receiving module is used for receiving a query data request from an H5 page, 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 repository according to the query data request to acquire query data; the data stored in the memory bank is obtained by receiving storage information of an H5 page through Native, performing escaping processing on the storage information through Native, and storing the escaped storage information in the memory bank; 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 escape-processed storage information is in a non-plaintext storage mode;
and the plaintext conversion module is used for carrying out plaintext conversion on the query data, sending the query data subjected to the plaintext conversion to an H5 page, and acquiring a node value.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the data storage method according to any one of claims 1 to 3 or the data query method according to any one of claims 4 to 5 are implemented when the processor executes the program.
10. A non-transitory computer readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the data storage method according to any one of claims 1 to 3 or the data query method according to any one of claims 4 to 5.
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 true CN113434587A (en) 2021-09-24
CN113434587B 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 (11)

* 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
US20070280466A1 (en) * 2006-05-30 2007-12-06 Santera Systems, Inc. Methods, systems, and computer program products for performing range-based directory number (DN) screening
US20130076797A1 (en) * 2011-09-26 2013-03-28 Zhaorong Hou Simulation of web applications and secondary devices in a web browser, web application development tools, and methods using the same
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

Patent Citations (11)

* 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
US20070280466A1 (en) * 2006-05-30 2007-12-06 Santera Systems, Inc. Methods, systems, and computer program products for performing range-based directory number (DN) screening
US20130076797A1 (en) * 2011-09-26 2013-03-28 Zhaorong Hou Simulation of web applications and secondary devices in a web browser, web application development tools, and methods using the same
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
CN113434587B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
CN107168971B (en) Data processing method and device for webpage application
CN110598280B (en) Equipment simulation system and method and computer readable storage medium
US20150207771A1 (en) Outgoing communications inventory
US20170041307A1 (en) Identity authentication method and device
CN107943491A (en) A kind of method, system and storage device based on high in the clouds intelligence burning key codes
US11171994B2 (en) Tag-based security policy creation in a distributed computing environment
US10324896B2 (en) Method and apparatus for acquiring resource
CN109104701B (en) Information sending method based on equipment identification code and server
CN112764997B (en) Log storage method and device, computer equipment and storage medium
CN112769801B (en) Method, device, equipment and storage medium for extracting backup from cloud server
CN111443901B (en) Java reflection-based service expansion method and device
KR102114532B1 (en) Information operation
CN105554136A (en) Backup data restoration method, device and system
CA3065729A1 (en) Business rules processing framework
CN116628759B (en) MNSS platform communication Cookie data blurring method and data management method
CN113434587A (en) Data storage and data query method and system
CN117201601A (en) Internet of things equipment access method, device, equipment and storage medium
CN114390452B (en) Message sending method and related equipment
CN100387075C (en) Rate treating device, short message charge-deducting system and method
CA2835193A1 (en) Email address and telephone number unification systems and methods
CN114942781A (en) Data format adaptation method and device for data reading
CN110225010B (en) Processing method of push message and related equipment
CN113342811A (en) HBase table data processing method and device
CN112418944A (en) Coupon transfer method and device, electronic equipment and storage medium
CN114036213A (en) Data asynchronous export sharing 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