CN109802981A - A kind of configuration method of global data, apparatus and system - Google Patents
A kind of configuration method of global data, apparatus and system Download PDFInfo
- Publication number
- CN109802981A CN109802981A CN201711146383.3A CN201711146383A CN109802981A CN 109802981 A CN109802981 A CN 109802981A CN 201711146383 A CN201711146383 A CN 201711146383A CN 109802981 A CN109802981 A CN 109802981A
- Authority
- CN
- China
- Prior art keywords
- node
- data
- deleted
- edit instruction
- nodal information
- 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.)
- Pending
Links
Abstract
The embodiment of the present application shows a kind of configuration method of global data, apparatus and system, and client is corresponded to global data and is cut into several data modules by the method shown in the embodiment of the present application;JSON data structure is converted by the data in data module, and it is stored respectively in corresponding subdata base, a usual client corresponds to multiple data modules, when the update to client, it only needs to carry out corresponding operation to the JSON data structure in corresponding subdata base, reduce the search range of application platform server, it does not need to make an amendment database table structure and increase additional code, save the memory free time, and then shorten the waiting time for carrying the application platform server of global data, improve the utilization rate of the resources such as system bandwidth, database.
Description
Technical field
The present invention relates to field of computer technology, in particular to a kind of configuration method of global data, apparatus and system.
Background technique
Global data is to constitute a virtual centralized database logical image, and mostly using more database servers
Several Database Systems are the same, and global data can provide transparent data service to client.In general, we are common at one's side
Some clients, such as: app (Application, application program), web (World Wide Web, global wide area network) website,
And background system even desktop application ui (User Interface, user interface) on Dynamically Announce content by complete
The data service that office data provides.
In general, the storage and management mode of global data is, the data source of global data is stored in a tables of data,
Then corresponding data are transferred according to the instruction on backstage, and then realizes corresponding function.For example, a client has as follows
Function: the advertisement that app is spread its tail, the advertisement load time spread its tail, the advertisement link spread its tail, the display row of some plates in app
Sequence, some switching functions in, the switch of the default barrage of video playing, the default scale of video player, video are broadcast
The function etc. for the default image quality put;Above-mentioned client is related to by the storage and management mode of the global data shown in the prior art
Data source deposit in fixed configuration file, alternatively, being stored in a fixed data Ku Biaonei, each function has fixed word
Section and respective value;Then it is safeguarded in a background interface, then passes through API (Application Programming
Interface, application programming interface) carry out data acquisition.
In general, the function of client has very strong scalability, it usually needs according to the demand of user, to the function of client
It can make and be correspondingly improved, this just needs in real time to be updated the global data of client.The overall situation shown in the prior art
The storage and management mode of data needs to search for whole source datas during being updated to data, determines number to be updated
According to being finally updated to data to be updated.Usually during search, the application platform server of global data is carried
For a long time in the state waited, the utilization rate of the resources such as system bandwidth, database is reduced.
Summary of the invention
Goal of the invention of the invention is to provide a kind of configuration method of global data, apparatus and system, to solve existing skill
The storage and management mode of global data shown in art carries the application platform clothes of global data during data update
The technical issues of business device is in the state of waiting for a long time, reduces the utilization rate of the resources such as system bandwidth, database.
The embodiment of the present application first aspect shows a kind of configuration method of global data, which comprises
Global data is cut into several data modules;
Parse each data module respectively, the data module after being parsed, and, the corresponding mark of the data module
Know;
Data module after the parsing is switched into JSON data structure, is stored respectively in corresponding subdata base;
It receives edit instruction and the corresponding subdata base of the edit instruction is updated according to the edit instruction.
Selectable, the reception edit instruction updates the corresponding subnumber of the edit instruction according to the edit instruction
Include: according to the step of library
The reception edit instruction;
It is determining to be identified as target identification with what edit instruction matched;
Transfer the corresponding JSON data structure of the target identification;
According to edit instruction, the JSON data structure is updated.
Selectable, the step of data module by after parsing switchs to JSON data structure, includes:
By the data module after the parsing, it is cut into independent key-value pair, the key-value pair includes fixed field and right
It should be worth;
JSON data structure is generated as according to the hierarchical relationship of the fixed field.
It is selectable, the data module after the parsing is switched into JSON data structure, is stored respectively in corresponding subnumber
Include: according to the step in library
JSON data structure is divided into several nodes;
Parsing the corresponding nodal information of each node, the nodal information includes node depth, node path, and, section
Point key-value pair;
According to the nodal information, and, edit instruction generates one-dimension array;
JSON object is converted by the one-dimension array, is stored respectively in corresponding subdata base.
It is selectable, according to the nodal information, and, edit instruction, generate one-dimension array the step of include:
According to the nodal information, one-dimension array is generated;
The deletion received for any one node instructs;
It reads the deletion and instructs corresponding deletion path;
According to the deletion path, node to be deleted is determined, delete the nodal information of the node to be deleted, update one-dimensional
Array.
It is selectable, it is described according to path is deleted, determine node to be deleted;Delete the nodal information of the node to be deleted
The step of include:
According to path is deleted, node to be deleted is determined;
Judge whether the node to be deleted is composite node;
If the node to be deleted is composite node, the one-dimension array is traversed, determines the node to be deleted
Child node is child node to be deleted;
The nodal information of node to be deleted is deleted, and, the nodal information of child node to be deleted;
If the node to be deleted is not composite node, the nodal information of the node to be deleted is deleted.
It is selectable, it is described according to nodal information, and, edit instruction, generate one-dimension array the step of include:
According to the nodal information, one-dimension array is generated;
The addition received for any one nodal information instructs, addition instruction include add paths, and, add
Information;
It is added paths according to described, determines node to be added;
The one-dimension array is traversed, the last one child node of the node to be added is filtered out, the addition is instructed
After being added to the last one child node, one-dimension array is updated.
It is selectable, it is described according to nodal information, and, edit instruction, generate one-dimension array the step of include:
According to the nodal information, one-dimension array is generated;
The change directive for being directed to any one node is received, the change directive includes change path, and, more convert to
Breath;
According to the change path, node to be changed is determined, the section of the node to be changed is replaced with the change information
Point information, updates one-dimension array.
The embodiment of the present application second aspect shows a kind of configuration device of global data, and described device includes:
Cutter unit, for global data to be cut into several data modules;
Resolution unit, for parsing each data module respectively, data module after being parsed, and, the data
The corresponding mark of module;
Storage unit is stored respectively in corresponding for the data module after the parsing to be switched to JSON data structure
In subdata base;
Updating unit, according to edit instruction, updates the corresponding subdata of the edit instruction for receiving edit instruction
Library.
The embodiment of the present application third aspect shows a kind of configuration system of global data, the system comprises:
Application platform server, the data storage server being connected with the application platform server, the data are deposited
Storage server, which is arranged, inside the application platform server or to be independently arranged, the application platform server by internet with
Terminal is connected;
The terminal, for sending request of data condition to the application platform server on backstage;
The application platform server, for global data to be cut into several data modules;
Parse each data module respectively, the data module after being parsed, and, the corresponding mark of the data module
Know;
Data module after the parsing is switched into JSON data structure, is stored respectively in corresponding subdata base;
It receives edit instruction and the corresponding subdata base of the edit instruction is updated according to edit instruction;
The data storage server, the storage for related data.
From the above technical scheme, the embodiment of the present application shows a kind of configuration method of global data, apparatus and system,
The described method includes: global data is cut into several data modules;Each data module, the number after being parsed are parsed respectively
According to module, and, the corresponding mark of the data module;Data module after the parsing is switched into JSON data structure, point
It is not stored in corresponding subdata base;It receives edit instruction and it is corresponding to be updated according to the edit instruction for the edit instruction
Subdata base.Client is corresponded to global data and is cut into several data modules by the method shown in the embodiment of the present application;It will count
It is converted into JSON data structure according to the data in module, and is stored respectively in corresponding subdata base, a usual client
Corresponding multiple data modules, when the update to client, it is only necessary to which phase is carried out to the JSON data structure in corresponding subdata base
The operation answered reduces the search range of application platform server, and then shortens the application platform service for carrying global data
The waiting time of device improves the utilization rate of the resources such as system bandwidth, database.
Detailed description of the invention
It in order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, below will be to institute in embodiment
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention
Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings
Obtain other attached drawings.
Fig. 1-1 is the structural schematic diagram for the configuration system that a kind of global data exemplified is preferably implemented according to one;
Fig. 1-2 is the structural schematic diagram according to a kind of configuration system of global data shown in another preferred embodiment;
Fig. 2 is the flow chart for the configuration method that a kind of global data exemplified is preferably implemented according to one;
Fig. 3 is the detail flowchart that the step S104 exemplified is preferably implemented according to one;
Fig. 4 is the detail flowchart that the step S103 exemplified is preferably implemented according to one;
Fig. 5 is the JSON data structure of Fig. 1 mono- typical dendrogram;
Fig. 6 is the detail flowchart that the deletion process exemplified is preferably implemented according to one;
Fig. 7 is the detail flowchart that the step 103314 exemplified is preferably implemented according to one;
Fig. 8 is the detail flowchart that the addition node process exemplified is preferably implemented according to one;
Fig. 9 is the detail flowchart that the node change procedure exemplified is preferably implemented according to one;
Figure 10 is the structural schematic diagram for the configuration device that a kind of global data exemplified is preferably implemented according to one.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Whole description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
In general, the function of client has very strong scalability, it usually needs according to the demand of user, to the function of client
It can make and be correspondingly improved, this just needs in real time to be updated the global data of client.The overall situation shown in the prior art
The storage and management mode of data needs to search for whole source datas during being updated to data, determines number to be updated
According to being finally updated to data to be updated.Usually during search, the application platform server of global data is carried
For a long time in the state waited, the utilization rate of the resources such as system bandwidth, database is reduced.
To solve the above-mentioned problems, the embodiment of the present application first aspect shows a kind of configuration system of global data;
Specifically, Fig. 1-1 is please referred to, and, Fig. 1-2, the system comprises:
Application platform server 31, the data storage server 32 being connected with the application platform server 31 are described
The setting of data storage server 32 is in 31 inside of Platform Server or is independently arranged, and the application platform server 31 is logical
Internet is crossed to be connected with the terminal 33;
The terminal 33, for sending request of data condition to the application platform server 31 on backstage;
The application platform server, for global data to be cut into several data modules;
Parse each data module respectively, the data module after being parsed, and, the corresponding mark of the data module
Know;
Data module after the parsing is switched into JSON data structure, is stored respectively in corresponding subdata base;
It receives edit instruction and the corresponding subdata base of the edit instruction is updated according to edit instruction;
The data storage server 32, the storage for related data.
When terminal 33 needs to obtain data at present, it usually needs take the application platform that request of data condition is sent to backstage
Business device 31, application platform server 31 perform corresponding processing global data according to request condition;
Application platform server 31 shown in the embodiment of the present application, if being cut into firstly, client is corresponded to global data
Dry data module;JSON data structure is converted by the data in data module, and is stored respectively in corresponding subdata base,
A usual client corresponds to multiple data modules, when the update to client, it is only necessary to the JSON in corresponding subdata base
Data structure carries out corresponding operation, reduces the search range of application platform server, and then shorten and carry global data
Application platform server waiting time, improve the utilization rate of the resources such as system bandwidth, database.
The corresponding global data of each client is cut into several data modules by the system shown in the embodiment of the present application,
Data module is stored respectively in corresponding subdata base, can configure multiple relevant data modules below a client,
Data in data module are stored in the form of JSON data structure.When being updated to the application of client, application platform clothes
Business device only needs to obtain the JSON data structure under corresponding application, then carries out corresponding data dimension to JSON data structure
Shield, the system shown in the embodiment of the present application can very easily add field and data, and number during data maintenance
It is controllable according to type, the data types such as number, array, object, character string, boolean can be added, improve system scalability and
Versatility.
System shown in the embodiment of the present application provides a visualization JSON configuration management tool, in data maintenance process
In, facilitate the roles such as operation, editor, exploitation to carry out data maintenance.
Embodiment 1:
The application is the configuration method that embodiment second aspect shows a kind of global data;
Specifically, referring to Fig. 2, the described method includes:
Global data is cut into several data modules by S101;
By global data according to function, using etc. modes be cut into several data modules;
Specifically, by taking " excellent letter new car " APP as an example, the corresponding function of excellent letter new car is respectively as follows: me and wants buying car, I will sell
Vehicle looks for vehicle, information, public praise;Global data can be cut into me according to function for the global data of excellent letter new car APP will buy
Car data module, I will sell car data module, look for car data module, information book module, public praise data module;
S102 parses each data module respectively, the data module after being parsed, and, the data module is corresponding
Mark;
Parse each data module, the data module after being parsed, and, the corresponding mark of the data module;Its
In, mark is to facilitate the lookup of data for marking the data in each data module.
Data module after the parsing is switched to JSON data structure by S103, is stored respectively in corresponding subdata base
In;
By the data module after the parsing, it is cut into independent key-value pair, the key-value pair includes fixed field and right
It should be worth;
JSON data structure is generated as according to the hierarchical relationship of the fixed field;
S104 receives edit instruction and updates the corresponding subdata base of the edit instruction according to the edit instruction.
The global data of a client is configured multiple relevant data moulds by method shown in the embodiment of the present application 1
Data module is converted JSON data structure by block, and when being updated to the application of client, application platform server only needs
The JSON data structure under corresponding application is obtained, and corresponding data maintenance is carried out to JSON data structure, the application is implemented
The method exemplified reduces the search range of application platform server during updating to global data, and then shortens
The waiting time for carrying the application platform server of global data improves the utilization rate of the resources such as system bandwidth, database.
Embodiment 2:
In order to further reduce the search range of application platform server, the embodiment of the present application 2 shows a seed database
Searching method.Specifically, referring to Fig. 3, the method shown in embodiment 2 has similar step with the method shown in embodiment 1
Suddenly, only difference is that in technical solution shown in embodiment 2 step S104 the following steps are included:
S1041 receives edit instruction;
S1042 is determining to be identified as target identification with what edit instruction matched;
S1043 transfers the corresponding JSON data structure of the target identification;
S1044 updates the JSON data structure according to edit instruction.
It is in place of method and the difference of the method shown in embodiment 1 shown in embodiment 2, the method shown in embodiment 2
The searching method in subdata library has done further restriction;
Specifically, the embodiment of the present application shows 2 methods gone out, during parsing to data module, according to the data
The content of module determines that the corresponding mark of the data module, the mark are used for the summary of data module, and each mark is only
An one corresponding data module, each mark uniquely correspond to a subdata base;
During determining target subdata base, it is based on edit instruction, the mark that search matches with the edit instruction
Know and be used as target identification, transfer the corresponding JSON data structure of the target identification, finally, according to edit instruction, described in update
JSON data structure.
Method shown in the embodiment of the present application 2 has further reduced the search range of application platform, and then has shortened and carry
The waiting time of the application platform server of global data improves the utilization rate of the resources such as system bandwidth, database.
Embodiment 3:
In order to facilitate the maintenance of data, and then shorten the waiting time for having carried the application platform server of global data, mentions
The utilization rate of the resources such as high system bandwidth, database, the embodiment of the present application 3 show a kind of storage method of data module, have
Body referring to Fig. 4, in embodiment 1 or technical solution shown in embodiment 2 step S103 the following steps are included:
JSON data structure is divided into several nodes by S1031;
JSON data structure is divided into several nodes, cutting mode according to the store path of setting are as follows: by JSON data
Structure is according to from top to bottom, and presetting rule from inside to outside is divided into several nodes.
For example, for the JSON data structure of typical dendrogram as shown in Figure 5, after cutting mode
As a result are as follows: A, B, C, D, E, F, G, H, I, J, K, L.
S1032 parses the corresponding nodal information of each node, and the nodal information includes node depth, node path, with
And node key-value pair;
S1033 according to the nodal information, and, edit instruction, generate one-dimension array;
It is one-dimension array { A, B, C, D, E, F, G, H, I, J, K, L } by above-mentioned Node;
Parsing the corresponding nodal information of each node, the nodal information includes node depth, node path, and, section
Point key-value pair, the key-value pair includes fixed field and respective value.
Node depth, usual node depth can reflect the hierarchical relationship between egress, and node depth can be by node
Path obtains, and can also be obtained by " father and son " relationship between node.
For example: for the JSON data structure of typical dendrogram as shown in Figure 5, define root node A
Node depth be 0, B, C be respectively root node A child node, define B, the corresponding node depth of C be 1, and so on,
Gradually corresponding node depth is assigned to all nodes.
For node A, B, C, D, E, F, G, H, I, J, K, L;Corresponding node depth is 0,1,1,1,2,2,2,2,
2,2,3,3.
Node path: for from root node to present node path, such as: for typical dendrogram as shown in Figure 1
JSON data structure for, the corresponding node path of each node is respectively A, A/B, A/C, A/D, A/B/E, A/B/F, A/
C/G, A/D/H, A/D/I, A/D/J, A/D/K, A/D/L.As it can be seen that each node store path corresponding with the node is uniquely right
It answers.In method shown in the embodiment of the present application, " positioning " foundation using node path as node guarantees the accurate of " positioning "
Property.
Node key-value pair includes the Key (fixed field) of node, and, the Value (respective value) of node, wherein node
Key can be description to node, the Value of node can be the corresponding connection of node, the corresponding digit strings of node
Array object boolean etc..
The one-dimension array is converted JSON object by S1034, is stored respectively in corresponding subdata base.
The one-dimension array is converted JSON object by technical solution shown in the embodiment of the present application 3, S104, will be described
JSON object serialization is converted into character string.
Method shown in the embodiment of the present application obtains several nodes firstly, being split processing to JSON data structure;
The corresponding nodal information of each node is parsed, one-dimension array is obtained;When the editors behaviour such as JSON data structure being added, is updated
When making, according to edit instruction, and, node path carries out corresponding operation, aforesaid operations process to the data in one-dimension array
In without increasing the configuration of node, save the memory free time, also do not increase system operating load, shorten application platform server
The time for handling data, improve the utilization rate of the resources such as system bandwidth, database.
Embodiment 4;
In order to guarantee that the method for implementing to exemplify is more eye-catching in editing process, the embodiment of the present application 3 shows one kind one
The display mode of dimension group.Specifically, in technical solution shown in embodiment 3 step S1033 the following steps are included:
The pixel of the node is determined according to the node depth;
According to the pixel, nodal information, and, edit instruction generates one-dimension array.
It is in place of embodiment 4 and the difference of the method shown in embodiment 3, the method shown in embodiment 4 is to one-dimension array
Display methods done further restriction;
Specifically, the display pixel of the node is determined according to the corresponding node depth of each node first;
For example, for the JSON data structure of typical dendrogram shown in FIG. 1, the one-dimension array of generation
{ A, B, C, D, E, F, G, H, I, J, K, L }, then can be according to 10px, the list of 20px by the display difference of father node and child node
Position is shown that the distance on the left side of the root node A apart from array is 0 pixel, and the pixel of child node B, C, D From Left is
The pixel of 10px, E, F, G, H, I From Left is 20px, J, K, L, and pixel From Left is 20px.
According to the display mode of one-dimension array, the hierarchical relationship between node should be apparent that, guarantee editing process
It is more eye-catching.
Method shown in the embodiment of the present application 4 facilitates typing personnel in a dimension so that editing interface is more eye-catching
Quickly positioning target node in group, while can contribute to the hierarchical relationship that typing personnel are clear that between each node.
Embodiment 5:
The embodiment of the present application shows a kind of detailed step of JSON data structure progress knot removal, specifically, please referring to
Fig. 6.Step S1033 in the method for embodiment 3 or embodiment 4 the following steps are included:
S103311 generates one-dimension array according to the nodal information;
S103312 receives the deletion instruction for any one node;
S103313 reads the deletion and instructs corresponding deletion path;
S103314 determines node to be deleted according to the deletion path;The nodal information of the node to be deleted is deleted,
Update one-dimension array.
Usually each deletion instructs a corresponding deletion path, and each node has unique corresponding node path, passes through
The node path that path matches can be determined and delete by deleting path, and then uniquely determine node to be deleted.
For example, for the JSON data structure of typical dendrogram shown in fig. 5, one-dimension array A, B,
C, D, E, F, G, H, I, J, K, L }, the corresponding node path of above-mentioned node is respectively as follows: A, A/B, A/C, A/D, A/B/E, A/
B/F, A/C/G, A/D/H, A/D/I, A/D/J, A/D/K, A/D/L, each node have the node path uniquely determined phase therewith
It is corresponding.The corresponding deletion path of above-mentioned node path is respectively as follows: A, A/B, A/C, A/D, A/B/E, A/B/F, A/C/G, A/D/H,
A/D/I, A/D/J, A/D/K, A/D/L, each node have the node path uniquely determined to correspond.
Method shown in the embodiment of the present application uniquely determines node to be deleted, on the one hand ensure that and delete by deleting path
On the other hand the accuracy removed is deleted process and is carried out for one-dimension array, without increase or the configuration of deletion of node, save interior
The free time is deposited, the time of application platform server processing data is shortened, improves the utilization of the resources such as system bandwidth, database
Rate.
Embodiment 6:
During the deletion of node, usually deleted just for the corresponding nodal information of node to be deleted of selection,
For some composite nodes, the corresponding child node of the composite node still recites " useless information ", it is clear that
Composite node and the corresponding nodal information of composite node are only deleted under this condition, are unable to reach and " useless information " is thoroughly deleted
The purpose removed.
The embodiment of the present application shows a kind of delet method for composite node to solve the above-mentioned problems.Specifically, asking
Refering to Fig. 7, the method shown in embodiment 6 and the method step having the same shown in embodiment 5, only difference is that real
Apply the step S103314 shown in example 6 the following steps are included:
S1033141 determines node to be deleted according to path is deleted;
S1033142 judges whether the node to be deleted is composite node;
If the S1033143 node to be deleted is not composite node, the nodal information of the node to be deleted is deleted.
If the S1033144 node to be deleted is composite node, the one-dimension array is traversed, is determined described wait delete
Except the child node of node is child node to be deleted;
S1033145 deletes the nodal information of node to be deleted, and, the nodal information of child node to be deleted.
Judge whether present node is composite node, needs to be searched according to composite node routing information if it is composite node
All child nodes, then in one-dimension array by node to be deleted, the corresponding nodal information of node to be deleted, sub- section to be deleted
Point, the corresponding nodal information of child node to be deleted, is deleted;If not composite node just according to present node in one-dimension array
Node to be deleted is deleted, and, the corresponding nodal information of the node to be deleted.
For example, for the JSON data structure of typical dendrogram shown in fig. 5, one-dimension array A, B,
C, D, E, F, G, H, I, J, K, L }, being deleted by parsing and instructing corresponding deletions path is A/D/H, according to delete path it is determining to
Deletion of node is H, determines that node H to be deleted is composite node, filters out child node J, K, the L of node H to be deleted, delete section
Point H, J, K, L, and, the corresponding nodal information of above-mentioned node.
Method shown in the embodiment of the present application first determines whether node is composite node, needs root if it is composite node
All child nodes are searched according to composite node routing information, delete node to be deleted, and, node to be deleted is corresponding to be deleted
Child node, and then achieve the purpose that complete deletion " useless information " is deleted process and is carried out for one-dimension array, without increase or
The configuration of deletion of node saves the memory free time, does not also increase system operating load, shortens application platform server processing number
According to time, improve the utilization rate of the resources such as system bandwidth, database.
Embodiment 7:
The embodiment of the present application 7 shows a kind of detailed step for adding node, specifically, referring to Fig. 8, embodiment 3 or real
Apply step S1033 in the method shown in example 4 the following steps are included:
S103321 generates one-dimension array according to the nodal information
S103322 receives the addition instruction for any one nodal information, and the addition instruction includes adding paths, with
And addition information;
S103323 adds paths according to, determines node to be added;
S103324 traverses the one-dimension array, filters out the last one child node of the node to be added, adds described
After adding instruction to be added to the last one child node, one-dimension array is updated.
Method shown in the embodiment of the present application is suitable for following two situation:
The first situation adds a new leaf node.
Specifically, being inserted into a new node object at the end of one-dimension array, while it is corresponding to parse the node
Nodal information.
Second situation adds node in existing node;
According to adding paths, node to be added is determined, judge the type of the node to be added.If the section to be added
Point is composite node, and the position of the last one child node of node to be added is found according to the judgement of the node path of node to be added
It sets, behind array position where then instructing corresponding new node to be inserted into the last one child node of node to be added addition
Face, while updating one-dimension array.
The application has a try the node adding method shown, and adding procedure is carried out for one-dimension array, without increasing or deleting
The configuration of node saves the memory free time, does not also increase system operating load, shortens application platform server processing data
Time improves the utilization rate of the resources such as system bandwidth, database.
Embodiment 8:
The embodiment of the present application shows a kind of detailed step of more new node.Specifically, referring to Fig. 9, embodiment 3 or implementation
Step S1033 includes the following steps in method shown in 4
S103331 generates one-dimension array according to the nodal information;
S103332 receives the change directive for being directed to any one node, and the change directive includes change path, and,
Change information;
S103333 determines node to be changed according to the change path, replaces the section to be changed with the change information
The nodal information of point updates one-dimension array.
The renewal process of node includes: modification key title, and, the corresponding value value of modification key;
Specific: modification key title, the key title of node is can to modify, according to the corresponding change road of the more instruction
Diameter determines that the corresponding nodal information of node to be changed is modified, while updating one-dimension array.
Modify the corresponding value value of key:
In general, the corresponding value value Value value of key can be it is a plurality of types of as number, character string, array, object,
The types such as boolean.
Node to be changed is directly modified if it is node is modified to non-composite type from non-composite type, if it is
Compound type is modified as needing to realize by deletion of node for other types, it is corresponding all by node to be changed
The operation that child node is deleted;
It need to be modified for node to be changed if it is non-composite type is converted to compound type only.
Node shown in the embodiment of the present application changes method, and change procedure is carried out for one-dimension array, without increasing or deleting
Except the configuration of node, the memory free time is saved, does not also increase system operating load, shortens application platform server processing data
Time, improve the utilization rate of the resources such as system bandwidth, database.
The embodiment of the present application third aspect shows a kind of configuration device of global data, specifically, referring to Fig. 10, described
Device includes:
Cutter unit 21, for global data to be cut into several data modules;
Resolution unit 22, for parsing each data module respectively, data module after being parsed, and, the number
According to the corresponding mark of module;
Storage unit 23 is stored respectively in corresponding for the data module after the parsing to be switched to JSON data structure
Subdata base in;
Updating unit 24, according to edit instruction, updates the corresponding subdata of the edit instruction for receiving edit instruction
Library.
From the above technical scheme, the embodiment of the present application shows a kind of configuration method of global data, apparatus and system,
The described method includes: global data is cut into several data modules;Each data module, the number after being parsed are parsed respectively
According to module, and, the corresponding mark of the data module;Data module after the parsing is switched into JSON data structure, point
It is not stored in corresponding subdata base;It receives edit instruction and it is corresponding to be updated according to the edit instruction for the edit instruction
Subdata base.Client is corresponded to global data and is cut into several data modules by the method shown in the embodiment of the present application;It will count
It is converted into JSON data structure according to the data in module, and is stored respectively in corresponding subdata base, a usual client
Corresponding multiple data modules, when the update to client, it is only necessary to which phase is carried out to the JSON data structure in corresponding subdata base
The operation answered reduces the search range of application platform server, and then shortens the application platform service for carrying global data
The waiting time of device improves the utilization rate of the resources such as system bandwidth, database.
It only needs to carry out corresponding operation search to the JSON data structure in corresponding subdata base it is worth noting that, specific
In realization, the present invention also provides a kind of computer storage mediums, wherein the computer storage medium can be stored with program, the journey
Sequence may include in the service providing method of user identity provided by the invention or each embodiment of user registering method when executing
Part or all of step.The storage medium can be magnetic disk, CD, read-only memory (English: read-only
Memory, referred to as: ROM) or random access memory (English: random access memory, referred to as: RAM) etc..
It is required that those skilled in the art can be understood that the technology in the embodiment of the present invention can add by software
The mode of general hardware platform realize.Based on this understanding, the technical solution in the embodiment of the present invention substantially or
Say that the part that contributes to existing technology can be embodied in the form of software products, which can deposit
Storage is in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are used so that computer equipment (can be with
It is personal computer, server or the network equipment etc.) execute certain part institutes of each embodiment of the present invention or embodiment
The method stated.
Same and similar part may refer to each other between each embodiment in this specification.Especially for user identity
Service providing apparatus or user's registration device embodiment for, since it is substantially similar to the method embodiment, thus description
Comparison it is simple, related place is referring to the explanation in embodiment of the method.
Invention described above embodiment is not intended to limit the scope of the present invention..
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or
Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention
Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following
Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various updates and change can carried out without departing from the scope.The scope of the present invention is only limited to the appended claims.
Claims (10)
1. a kind of configuration method of global data, which is characterized in that the described method includes:
Global data is cut into several data modules;
Parse each data module respectively, the data module after being parsed, and, the corresponding mark of the data module;
Data module after the parsing is switched into JSON data structure, is stored respectively in corresponding subdata base;
It receives edit instruction and the corresponding subdata base of the edit instruction is updated according to the edit instruction.
2. the method according to claim 1, wherein the reception edit instruction, more according to the edit instruction
The step of new edit instruction corresponding subdata base includes:
The reception edit instruction;
It is determining to be identified as target identification with what edit instruction matched;
Transfer the corresponding JSON data structure of the target identification;
According to edit instruction, the JSON data structure is updated.
3. according to the method described in claim 2, it is characterized in that, the data module by after parsing switchs to JSON data knot
The step of structure includes:
By the data module after the parsing, it is cut into independent key-value pair, the key-value pair includes fixed field and respective value;
JSON data structure is generated as according to the hierarchical relationship of the fixed field.
4. method according to claim 1-3, which is characterized in that the data module by after parsing switchs to
JSON data structure, the step being stored respectively in corresponding subdata base include:
JSON data structure is divided into several nodes;
Parsing the corresponding nodal information of each node, the nodal information includes node depth, node path, and, node key
Value pair;
According to the nodal information, and, edit instruction generates one-dimension array;
JSON object is converted by the one-dimension array, is stored respectively in corresponding subdata base.
5. according to the method described in claim 4, it is characterized in that, according to the nodal information, and, edit instruction generates
The step of one-dimension array includes:
According to the nodal information, one-dimension array is generated;
The deletion received for any one node instructs;
It reads the deletion and instructs corresponding deletion path;
According to the deletion path, node to be deleted is determined, delete the nodal information of the node to be deleted, update a dimension
Group.
6. according to the method described in claim 5, it is characterized in that, it is described according to delete path, determine node to be deleted;It deletes
The step of nodal information of the node to be deleted includes:
According to path is deleted, node to be deleted is determined;
Judge whether the node to be deleted is composite node;
If the node to be deleted is composite node, the one-dimension array is traversed, determines the son section of the node to be deleted
Point is child node to be deleted;
The nodal information of node to be deleted is deleted, and, the nodal information of child node to be deleted;
If the node to be deleted is not composite node, the nodal information of the node to be deleted is deleted.
7. according to the method described in claim 4, it is characterized in that, described according to nodal information, and, edit instruction generates
The step of one-dimension array includes:
According to the nodal information, one-dimension array is generated;
The addition received for any one nodal information instructs, addition instruction include add paths, and, addition is believed
Breath;
It is added paths according to described, determines node to be added;
The one-dimension array is traversed, the last one child node of the node to be added is filtered out, the addition is instructed and is added
To after a last child node, one-dimension array is updated.
8. according to the method described in claim 4, it is characterized in that, described according to nodal information, and, edit instruction generates
The step of one-dimension array includes:
According to the nodal information, one-dimension array is generated;
The change directive for being directed to any one node is received, the change directive includes change path, and, change information;
According to the change path, node to be changed is determined, believed with the node that the change information replaces the node to be changed
Breath updates one-dimension array.
9. a kind of configuration device of global data, which is characterized in that described device includes:
Cutter unit, for global data to be cut into several data modules;
Resolution unit, for parsing each data module respectively, data module after being parsed, and, the data module
Corresponding mark;
Storage unit is stored respectively in corresponding subnumber for the data module after the parsing to be switched to JSON data structure
According in library;
Updating unit, according to edit instruction, updates the corresponding subdata base of the edit instruction for receiving edit instruction.
10. a kind of configuration system of global data, which is characterized in that the system comprises:
Application platform server, the data storage server being connected with the application platform server, the data storage clothes
Business device is arranged inside the application platform server or is independently arranged, and the application platform server passes through internet and terminal
It is connected;
The terminal, for sending request of data condition to the application platform server on backstage;
The application platform server, for global data to be cut into several data modules;
Parse each data module respectively, the data module after being parsed, and, the corresponding mark of the data module;
Data module after the parsing is switched into JSON data structure, is stored respectively in corresponding subdata base;
It receives edit instruction and the corresponding subdata base of the edit instruction is updated according to edit instruction;
The data storage server, the storage for related data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711146383.3A CN109802981A (en) | 2017-11-17 | 2017-11-17 | A kind of configuration method of global data, apparatus and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711146383.3A CN109802981A (en) | 2017-11-17 | 2017-11-17 | A kind of configuration method of global data, apparatus and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109802981A true CN109802981A (en) | 2019-05-24 |
Family
ID=66556028
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711146383.3A Pending CN109802981A (en) | 2017-11-17 | 2017-11-17 | A kind of configuration method of global data, apparatus and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109802981A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114124784A (en) * | 2022-01-27 | 2022-03-01 | 军事科学院系统工程研究院网络信息研究所 | Intelligent routing decision protection method and system based on vertical federation |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050125807A1 (en) * | 2003-12-03 | 2005-06-09 | Network Intelligence Corporation | Network event capture and retention system |
CN1859130A (en) * | 2005-11-14 | 2006-11-08 | 辛江 | Mode for charging advertisement according to communication time or times |
-
2017
- 2017-11-17 CN CN201711146383.3A patent/CN109802981A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050125807A1 (en) * | 2003-12-03 | 2005-06-09 | Network Intelligence Corporation | Network event capture and retention system |
CN1859130A (en) * | 2005-11-14 | 2006-11-08 | 辛江 | Mode for charging advertisement according to communication time or times |
Non-Patent Citations (3)
Title |
---|
QINGYANHUAN: "《javascript json对象操作(基本增删改查)》", 《HTTPS://BLOG.CSDN.NET/QINGYANHUAN/ARTICLE/DETAILS/53018014》 * |
侯佳佳等: "《基于分布式数据库数据处理的研究》", 《万方数据知识服务平台》 * |
王普等: "《基于加权数据融合算法的移动液化气监控系统》", 《北京工业大学学报》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114124784A (en) * | 2022-01-27 | 2022-03-01 | 军事科学院系统工程研究院网络信息研究所 | Intelligent routing decision protection method and system based on vertical federation |
CN114124784B (en) * | 2022-01-27 | 2022-04-12 | 军事科学院系统工程研究院网络信息研究所 | Intelligent routing decision protection method and system based on vertical federation |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7359393B1 (en) | Method and apparatus for border gateway protocol convergence using update groups | |
US8930374B2 (en) | Method and apparatus for multidimensional data storage and file system with a dynamic ordered tree structure | |
US20070038679A1 (en) | Dynamic configuration updating in a storage area network | |
US20170109369A1 (en) | Publish-subscribe platform for cloud file distribution | |
CN105338113B (en) | A kind of multi-platform data interconnection system for Urban Data resource-sharing | |
CN106815330B (en) | Method and system for generating block chain expanded along spatial dimension | |
EP2383943A2 (en) | Semantic information-oriented network (SION) | |
CN102714665A (en) | Method and apparatus for decomposing a peer-to-peer network and using a decomposed peer-to-peer network | |
KR20050032616A (en) | Web services apparatus and methods | |
CN102890682A (en) | Method for creating index, searching method, device and system | |
CN111008521B (en) | Method, device and computer storage medium for generating wide table | |
US11265182B2 (en) | Messaging to enforce operation serialization for consistency of a distributed data structure | |
US11500860B2 (en) | Method and system for defining an adaptive polymorphic data model | |
CN103546380A (en) | Message forwarding method and device based on strategy routing | |
CN108228322A (en) | A kind of distributed link tracking, analysis method and server, global scheduler | |
WO2023060046A1 (en) | Errors monitoring in public and private blockchain by a data intake system | |
CN115705313A (en) | Data processing method, device, equipment and computer readable storage medium | |
JP6950576B2 (en) | Network systems, topology management methods, and programs | |
CN109802981A (en) | A kind of configuration method of global data, apparatus and system | |
US20080195729A1 (en) | Path identification for network data | |
CN110807028A (en) | Method, apparatus and computer program product for managing a storage system | |
CN113157904A (en) | Sensitive word filtering method and system based on DFA algorithm | |
CN111767282A (en) | MongoDB-based storage system, data insertion method and storage medium | |
CN109800388A (en) | A kind of edit methods of JSON data, apparatus and system | |
JP2001216184A (en) | Transmitter, receiver, transmission/reception system, transmitting method and receiving method |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190524 |