CN108829831A - A kind of data processing method, device, hardware device and chip - Google Patents

A kind of data processing method, device, hardware device and chip Download PDF

Info

Publication number
CN108829831A
CN108829831A CN201810623996.XA CN201810623996A CN108829831A CN 108829831 A CN108829831 A CN 108829831A CN 201810623996 A CN201810623996 A CN 201810623996A CN 108829831 A CN108829831 A CN 108829831A
Authority
CN
China
Prior art keywords
data
data structure
layer
clear
current
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
CN201810623996.XA
Other languages
Chinese (zh)
Other versions
CN108829831B (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.)
Beijing Exploration Technology Co Ltd
Original Assignee
Beijing Exploration Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Exploration Technology Co Ltd filed Critical Beijing Exploration Technology Co Ltd
Priority to CN201810623996.XA priority Critical patent/CN108829831B/en
Publication of CN108829831A publication Critical patent/CN108829831A/en
Application granted granted Critical
Publication of CN108829831B publication Critical patent/CN108829831B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Semiconductor Memories (AREA)

Abstract

The invention discloses a kind of data processing method, device, hardware device and chips, since the structure of the target storage Multidimensional numerical obtained by this method is simple, target stores in each element of the Multidimensional numerical in the structure of Multidimensional numerical and there is no the complexity, the information of redundancy such as addition identifier, separator, just improves the efficiency of the method for storage Multidimensional numerical in the prior art to a certain extent.

Description

A kind of data processing method, device, hardware device and chip
Technical field
The present invention relates to fields of communication technology, and in particular to a kind of data processing method, device, hardware device and chip.
Background technique
It in the prior art, generally can be to be stored more at this when target storage Multidimensional numerical will be stored as wait store Multidimensional numerical Between each element of dimension group, the numerous complicateds, the information of redundancy such as addition identifier, separator, description field, to form mesh Mark storage Multidimensional numerical, and save.Due to add identifier between each element of Multidimensional numerical to be stored, separate The numerous complicateds such as symbol, description field, the information of redundancy, then, this just leads to the method for storage Multidimensional numerical in the prior art Efficiency is lower.
Summary of the invention
The purpose of the present invention is to provide a kind of data processing method, device, hardware device and chips, to solve the prior art In storage Multidimensional numerical the lower problem of method efficiency.
To achieve the above object, the technical scheme is that:
The present invention provides a kind of data processing method, the method includes:
Obtain Multidimensional numerical to be stored;
Obtain data number of plies N, wherein the N is not less than 2;
First data structure is determined as to the data structure of the 1st layer data, wherein first data structure includes first part And second part, the first part are arranged in front of the second part, the second part includes the multidimensional to be stored Array, the first part include identification information, the identification information include the data for including in the second part type, The quantity of the data for first data structure that the length of the data of clear data structure and the second part include;
If N=2, Multidimensional numerical to be stored described in clear data structure is determined as the 2nd layer data, wherein the clear data knot The data of structure are the data of string format;
2nd layer data is nested in the second part in the 1st layer data, target storage Multidimensional numerical is obtained;
If N>2, in response to the determine instruction of user, determine 2~N layer data, wherein any in 2~N-1 layer data The structure of layer data is the data of at least one first data structure or the number of at least one first data structure According to the data with a clear data structure, the structure of n-th layer data is clear data structure;
Obtain the nested position of every layer data in 2~N layer data, wherein the nested position of every layer data refers to this Second part in the first data structure of at least one of a upper layer data for layer data;
It is nested in every layer data in 2~N layer data in corresponding nested position, it is more to obtain the target storage Dimension group, wherein the data in the target storage Multidimensional numerical are the Multidimensional numerical to be stored.
Further, after obtaining the target storage Multidimensional numerical, the method also includes:
Include if in the 1st layer data not including the data of clear data structure, in the 1st layer data at least one described the The data of one data structure then read the data at least one first data structure for including in the 1st layer data;
If in the 1st layer data including the data of clear data structure, do not include in the 1st layer data at least one described the The data of one data structure then read the data for the clear data structure for including in the 1st layer data;
If in the 1st layer data include the data of clear data structure, and in the 1st layer data include at least one described the The data of one data structure then read the data for the clear data structure for including in the 1st layer data;
After the data for the clear data structure for having included in having read the 1st layer data, include in reading the 1st layer data The data of at least one first data structure.
Further, the data for reading the clear data structure for including in the 1st layer data, specifically include:
Read the either element in the data for the clear data structure for including in the 1st layer data;
The length of the data for the clear data structure for including in 1st layer data is subtracted 1;
If in current 1st layer data not including the data of clear data structure, it is determined that reading, which finishes in the 1st layer data, includes Clear data structure data;
If in current 1st layer data including the data of clear data structure, it includes pure for reading in current 1st layer data Either element in the data of data structure;
The length of the data for the clear data structure for including in current 1st layer data is subtracted 1;
If in current 1st layer data including the data of clear data structure, executes to read in current 1st layer data and wrap Include the operation of the either element in the data of clear data structure;
If in current 1st layer data not including the data of clear data structure, it is determined that reading finishes in the 1st layer data Including clear data structure data.
Further, the data at least one first data structure for including in the 1st layer data are read, it is specific to wrap It includes:
Read the data for any first data structure for including in the 1st layer data;
The quantity of the data for any first data structure for including in 1st layer data is subtracted 1;
If in current 1st layer data not including the data of first data structure, it is determined that reading finishes the 1st layer data In include at least one first data structure data;
If including the data of first data structure in current 1st layer data, read in current 1st layer data Including first data structure data in any first data structure data;
The quantity of the data for any first data structure for including in current 1st layer data is subtracted 1;
If including the data of first data structure in current 1st layer data, executes and read current 1st number of plies The operation of the data of any first data structure in the data for first data structure for including in;
If in current 1st layer data not including the data of first data structure, it is determined that reading finishes described 1st layer The data of at least one for including in data first data structure.
Further, the data for reading any first data structure for including in the 1st layer data, specifically include:
If in the data of first data structure not including the data of clear data structure, include in the data of first data structure The data of at least one first data structure, then read described at least one for including in the data of first data structure The data of first data structure;
If in the data of first data structure include clear data structure data, the data of first data structure do not include to The data of few first data structure, then read the number for the clear data structure for including in the data of first data structure According to;
If in the data of first data structure including the data of clear data structure, and include in the data of first data structure The data of at least one first data structure then read the clear data structure for including in the data of first data structure Data;
After the data for the clear data structure for including in the data for having read first data structure, first data structure is read Data in include at least one first data structure data.
Further, the data for reading the clear data structure for including in the data of first data structure, specifically include:
Read the either element in the data for the clear data structure for including in the data of first data structure;
The length of the data for the clear data structure for including in the data of first data structure is subtracted 1;
If in the data of current first data structure not including the data of clear data structure, it is determined that reading finishes first number According to the data for the clear data structure for including in the data of structure;
If in the data of current first data structure including the data of clear data structure, read it is described it is current this first The either element in data in the data of data structure including clear data structure;
The length of the data for the clear data structure for including in the data of current first data structure is subtracted 1;
If in the data of current first data structure including the data of clear data structure, executes to read and described currently should The operation of the either element in data in the data of first data structure including clear data structure;
If in the data of current first data structure not including the data of clear data structure, it is determined that reading finish this The data for the clear data structure for including in the data of one data structure.
Further, the data of at least one for including in the data of first data structure first data structure are read, It specifically includes:
Read the data for any first data structure for including in the data of first data structure;
The quantity of the data for any first data structure for including in the data of first data structure is subtracted 1;
If in the data of current first data structure not including the data of first data structure, it is determined that reading finishes institute State the data of at least one for including in the 1st layer data first data structure;
If including the data of first data structure in the data of current first data structure, read described current The data of any first data structure in the data for first data structure for including in the data of first data structure;
The quantity of the data for any first data structure for including in the data of current first data structure is subtracted Go 1;
If including the data of first data structure in the data of current first data structure, execute described in reading Any first data structure in the data for first data structure for including in the data of current first data structure The operation of data;
If including the data of first data structure in the data of current first data structure, execute described in reading Any first data structure in the data for first data structure for including in the data of current first data structure The operation of data;
If in the data of current first data structure not including the data of first data structure, it is determined that read The data of at least one for including in the data of Bi Suoshu first data structure first data structure.
The present invention provides a kind of data processing equipment, and described device includes:
Module is obtained, for obtaining Multidimensional numerical to be stored;
The acquisition module is also used to obtain data number of plies N, wherein the N is not less than 2;
Determining module, for the first data structure to be determined as to the data structure of the 1st layer data, wherein the first data knot Structure includes first part and second part, and the first part is arranged in front of the second part, and the second part includes The Multidimensional numerical to be stored, the first part include identification information, and the identification information includes wrapping in the second part First data structure that type, the length of the data of clear data structure and the second part of the data included include Data quantity;
Multidimensional numerical to be stored described in clear data structure is determined as the 2nd number of plies if being also used to N=2 by the determining module According to, wherein the data of the clear data structure are the data of string format;
Nested WFTA module obtains target and deposits for the 2nd layer data to be nested in the second part in the 1st layer data Store up Multidimensional numerical;
The determining module, if being also used to N>2, in response to the determine instruction of user, determine 2~N layer data, wherein the 2nd The structure of any layer data in~N-1 layer data be at least one first data structure data or at least one The data of first data structure and the data of a clear data structure, the structure of n-th layer data are clear data structure;
The acquisition module, is also used to obtain the nested position of every layer data in 2~N layer data, wherein every number of plies According to nested position, refer to the second part in the first data structure of at least one of a upper layer data for the layer data;
The nested WFTA module is also used to for every layer data in 2~N layer data being nested in corresponding nested position, Obtain the target storage Multidimensional numerical, wherein the data in the target storage Multidimensional numerical are the multidimensional number to be stored Group.
The present invention also provides a kind of data processing hardware device, the hardware device includes:
Memory, for storing non-transitory computer-readable instruction;And
Processor, for running the computer-readable instruction, so that the computer-readable instruction is executed by the processor The data processing method of any of the above-described implementation of Shi Shixian.
The present invention also provides a kind of storage mediums, for storing non-transitory computer-readable instruction, when the non-transitory meter When calculation machine readable instruction is executed by computer, so that the computer executes the data processing method of any of the above-described implementation.
The present invention also provides a kind of chip, the chip is used to execute the data processing method of any of the above-described implementation.
The invention has the advantages that:
In the present invention, data number of plies N can be obtained, wherein the N is not less than 2, by first by obtaining Multidimensional numerical to be stored Data structure is determined as the data structure of the 1st layer data, wherein first data structure includes first part and second Point, the first part is arranged in front of the second part, and the second part includes the Multidimensional numerical to be stored, described First part includes identification information, and the identification information includes the type for the data for including, clear data knot in the second part The quantity of the data for first data structure that the length of the data of structure and the second part include will be pure if N=2 The Multidimensional numerical to be stored of data structure is determined as the 2nd layer data, wherein the data of the clear data structure are character string 2nd layer data is nested in the second part in the 1st layer data by the data of format, obtains target storage multidimensional Array, if N>2, in response to the determine instruction of user, determine 2~N layer data, wherein appointing in 2~N-1 layer data The structure of one layer data is the data or at least one first data structure of at least one first data structure The data of data and a clear data structure, the structure of n-th layer data are clear data structure, are obtained in 2~N layer data Every layer data nested position, wherein the nested position of every layer data refers in a upper layer data for the layer data at least Every layer data in 2~N layer data is nested in corresponding nesting by the second part in one the first data structure On position, the target storage Multidimensional numerical is obtained, wherein the data in the target storage Multidimensional numerical are described wait store Multidimensional numerical.Wherein, the data in the target storage Multidimensional numerical are the Multidimensional numerical to be stored.Since target storage is more The structure of dimension group is simple, and target stores in each element of the Multidimensional numerical in the structure of Multidimensional numerical and there is no addition marks The complexity such as symbol, separator, the information of redundancy just improve the method for storage Multidimensional numerical in the prior art to a certain extent Efficiency.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of data processing method provided by the invention;
Fig. 2 is that a kind of target of two layer data provided by the invention stores the structural schematic diagram of Multidimensional numerical;
Fig. 3 is that the target of another two layer data provided by the invention stores the structural schematic diagram of Multidimensional numerical;
Fig. 4 is that the target of another two layer data provided by the invention stores the structural schematic diagram of Multidimensional numerical;
Fig. 5 is the flow diagram for the method that parsing target provided by the invention stores Multidimensional numerical;
Fig. 6 is a kind of structural schematic diagram of data processing equipment provided by the invention;
Fig. 7 is a kind of structural schematic diagram of resolver provided by the invention.
Specific embodiment
The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention..
Embodiment 1
The embodiment of the present invention 1 provides a kind of data processing method, and executing subject can be, but not limited to as mobile phone, tablet computer or a The application run on the user terminals such as people's computer (Personal Computer, PC) or those user terminals (Application, APP), alternatively, can also be the equipment such as server.
The flow diagram of this method can be found in Fig. 1, and this method includes the following steps:
S101 obtains Multidimensional numerical to be stored.
S102 obtains data number of plies N, wherein N is not less than 2.
The N that the N or other clients that can receive user's input are sent.
First data structure is determined as the data structure of the 1st layer data wherein by S103, and first data structure includes first Part and second part, the first part are arranged in front of the second part, and the second part includes described wait store Multidimensional numerical, the first part include identification information, and the identification information includes the data for including in the second part The number of the data for first data structure that type, the length of the data of clear data structure and the second part include Amount.
The Multidimensional numerical to be stored of clear data structure is determined as the 2nd layer data if N=2 by S104.
The data of above-mentioned clear data structure, can be the data of arbitrary structures other than the first data structure, for example, integer or Floating number etc..
2nd layer data is nested in the second part in the 1st layer data by S105, obtains target storage Multidimensional numerical.
S106, if N>2, in response to the determine instruction of user, determine 2~N layer data, wherein in 2~N-1 layer data Any layer data structure be at least one the first data structure data or at least one the first data structure data With the data of a clear data structure, the structure of n-th layer data is clear data structure.
It wherein, may include the data structure and content of every layer data in the determine instruction of user.The determine instruction of the user, can be with It is the instruction that the specified data of user's input generate, is also possible to receive the instruction that other clients are sent.
S107 obtains the nested position of every layer data in 2~N layer data, wherein the nested position of every layer data refers to Second part in the first data structure of at least one of a upper layer data for the layer data.
Wherein, it may be in response to the position determine instruction of user, execute S107, in the position determine instruction of user, including 2~N The nested position of every layer data in layer data.The instruction can be user and input certain preset information in the client, touching Send out what client generated, which is also possible to what other clients were sent.
Every layer data in 2~N layer data is nested in corresponding nested position by S108, obtains target storage multidimensional number Group, wherein it is Multidimensional numerical to be stored that target, which stores the data in Multidimensional numerical,.
Wherein, the format for the identification information that first part includes can be preset data form, for example, preset data form lattice Formula can be:[the data for the first data structure that length-second part of the type of data-clear data structure data includes Quantity], preset data form can also be extended formatting, can be configured according to actual needs.In addition, what first part included The system of identification information can be arbitrary carry system, and the data length for the identification information that first part includes can be arbitrarily long Degree, the embodiment of the present invention 1 is to this without any restriction.
It should be noted that if the 2nd layer of every layer data into N-1 layer data includes the number of at least one the first data structure According to the data at least one clear data structure, the data of at least one clear data structure can be arranged at least one first number Before the data of structure.
In order to enable reader understands that structure is the target storage Multidimensional numerical including at least two layer datas be, illustrate below It is bright:
Being for example, with reference to Fig. 2, Fig. 2 includes that the target of two layer datas stores the structural schematic diagram of Multidimensional numerical.Wherein, the first row Data in rectangle, are the 1st layer datas, and the data in the second row rectangle, are the second layer datas, and the second layer data is nested in the 1st In the data volume of layer data, wherein data volume is equivalent to second part mentioned above, and data head is equivalent to mentioned above First part.It can be by a data head+data volume in the second layer data, referred to as data cell.First in second layer data A data head+data volume, is data cell 0, and second data head+data volume in the second layer data is data cell 1, the Third data head+data volume in Layer 2 data is data cell 2.
For another example referring to Fig. 3, Fig. 3 be include two layer datas target storage Multidimensional numerical structural schematic diagram.Wherein, first Data in row rectangle, are the 1st layer datas, the data in the second row rectangle, are the second layer datas, and the second layer data is nested in In the data volume of 1 layer data.
It is the data head of the first layer data, is the first part in the first data structure in the 1st layer data;Data Body is the second part in the first data structure in the 1st layer data.2,2,3, it is the clear data structure in the second layer data Data, [0C0] is the first part in the first data structure in the second layer data, X (0,0,0), X (0,1,0), X (1,0, 0) ... ..., (1,1,2) X is the second part in the first data structure in the second layer data.
First part [031] in the first data structure in 1st layer data is hexadecimal data, 12 bits.[031] in, 0, indicate that the type of the data in data volume is 0, wherein it can appoint that 0 represents what kind of data in advance, it can be according to reality Situation is configured.3 indicate clear data structures data length, can appoint in advance the data of 3 representatives length be how long, 1 indicates the quantity of the first data structure, can appoint the quantity of 1 representative is how many in advance.Here, 3 length that can represent data The quantity for being 3,1 representative is 1.
The data 2 of clear data structure in second layer data, 2,3, indicate that the size of Multidimensional numerical to be stored is 2*2*3.Second First part [0C0] in the first data structure in layer data is hexadecimal data, in [0C0], first 0, indicates number Type according to the data in body is 0, wherein can appoint that 0 represents what kind of data in advance, can carry out according to the actual situation Setting.C indicate clear data structure data length, can appoint in advance C represent data length be how long, second 0 It indicates the quantity of the first data structure, can appoint the quantity of 1 representative is how many in advance.Here, C, which can represent the length of data, is 12,0 quantity represented are 0.
For another example referring to fig. 4, Fig. 4 be include two layer datas target storage Multidimensional numerical structural schematic diagram.Wherein, first Data in row rectangle, are the 1st layer datas, the data in the second row rectangle, are the second layer datas, and the second layer data is nested in In the data volume of 1 layer data.[003], it is first part in the first data structure in the 1st layer data;Data volume is the 1st The second part in the first data structure in layer data.
First [040] is the first part in first the first data structure in the second layer data, [X (0,0,0), X (0, 1,0), (1,0,0) X, X (1,1,0)] it is second part in first data structure.Second [040] is in the second layer data Second the first data structure in first part, [X (0,0,1), X (0,1,1), X (1,0,1), X (1,1,1)] be this Second part in one data structure.Third [040] is first in the first data structure of third in the second layer data Part, [X (0,0,2), X (0,1,2), X (1,0,2), X (1,1,2)] are the second parts in first data structure.
The first part in the first data structure in 1st layer data is hexadecimal data, 12 bits.[003] in, first A 0, indicate that the type of the data in data volume is 0, wherein it can appoint that 0 represents what kind of data in advance, it can be according to reality Border situation is configured.It second 0, indicates the length of the data of clear data structure, can appoint the length of the data of 0 representative in advance Degree be how long, 3 indicate the first data structures quantity, can appoint the quantity of 3 representatives is how many in advance.Here, 0 number can be represented According to length be 0,3 represent quantity be 3.
The first part in first the first data structure in second layer data, is hexadecimal data, in [040], first A 0, indicate that the type of the data in data volume is 0, wherein it can appoint that 0 represents what kind of data in advance, it can be according to reality Border situation is configured.4 indicate the length of the data of clear data structure, can appoint that the length of the data of 4 representatives is more in advance Long, the quantity of second 0 the first data structure of expression can appoint the quantity of 0 representative is how many in advance.Here, C can represent number According to length be 12,0 represent quantity be 0.
The target including two layer datas shown in Fig. 4 stores Multidimensional numerical, is the Multidimensional numerical of 4*3 size.The embodiment of the present invention 1 The first part being related to, it is relatively simple, it is uncomplicated.
In a kind of implement scene, after obtaining target storage Multidimensional numerical, operations described below can also carry out:
If in the 1st layer data not including the data of clear data structure, including at least one the first data structure in the 1st layer data Data then read the data at least one the first data structure for including in the 1st layer data;
It does not include at least one first data structure in the 1st layer data in the 1st layer data if including the data of clear data structure Data then read the data for the clear data structure for including in the 1st layer data;
It if including the data of clear data structure, and include at least one the first data structure in the 1st layer data in the 1st layer data Data then read the data for the clear data structure for including in the 1st layer data;
After the data for the clear data structure for having included in having read the 1st layer data, at least one for including in the 1st layer data is read The data of first data structure.
In a kind of implement scene, the data for the clear data structure for including in the 1st layer data are read, specific implementation is as follows:
Read the either element in the data for the clear data structure for including in the 1st layer data;
The length of the data for the clear data structure for including in 1st layer data is subtracted 1;
If in current 1st layer data not including the data of clear data structure, it is determined that read and finish include in the 1st layer data pure The data of data structure;
If in current 1st layer data including the data of clear data structure, reading includes clear data structure in current 1st layer data Data in either element;
The length of the data for the clear data structure for including in current 1st layer data is subtracted 1;
If in current 1st layer data including the data of clear data structure, executes and read in current 1st layer data including clear data The operation of either element in the data of structure;
If in current 1st layer data not including the data of clear data structure, it is determined that read and finish include in the 1st layer data pure The data of data structure.
In a kind of implement scene, the data at least one the first data structure for including in the 1st layer data, specific implementation are read Mode is as follows:
Read the data for any first data structure for including in the 1st layer data;
The quantity of the data for any first data structure for including in 1st layer data is subtracted 1;
If in current 1st layer data not including the data of the first data structure, it is determined that reading, which finishes in the 1st layer data, includes The data of at least one the first data structure;
If in current 1st layer data including the data of the first data structure, the first number for including in current 1st layer data is read According to the data of any first data structure in the data of structure;
The quantity of the data for any first data structure for including in current 1st layer data is subtracted 1;
If in current 1st layer data including the data of the first data structure, for reading and including in current 1st layer data is executed The operation of the data of any first data structure in the data of one data structure;
If in current 1st layer data not including the data of the first data structure, it is determined that reading, which finishes in the 1st layer data, includes The data of at least one the first data structure.
In a kind of implement scene, the data for any first data structure for including in the 1st layer data, specific implementation are read It is as follows:
If in the data of first data structure not including the data of clear data structure, include in the data of first data structure The data of at least one the first data structure then read at least one first data for including in the data of first data structure The data of structure;
If in the data of first data structure include clear data structure data, the data of first data structure do not include to The data of few first data structure, then read the data for the clear data structure for including in the data of first data structure;
If in the data of first data structure including the data of clear data structure, and include in the data of first data structure The data of at least one the first data structure then read the number for the clear data structure for including in the data of first data structure According to;
After the data for the clear data structure for including in the data for having read first data structure, first data structure is read Data in include at least one the first data structure data.
In a kind of implement scene, the data for the clear data structure for including in the data of first data structure are read, it is specific real Existing mode is as follows:
Read the either element in the data for the clear data structure for including in the data of first data structure;
The length of the data for the clear data structure for including in the data of first data structure is subtracted 1;
If in the data of current first data structure not including the data of clear data structure, it is determined that reading finishes first number According to the data for the clear data structure for including in the data of structure;
If including the data of clear data structure in the data of current first data structure, current first data structure is read Data in include clear data structure data in either element;
The length of the data for the clear data structure for including in the data of current first data structure is subtracted 1;
If in the data of current first data structure including the data of clear data structure, current first data of reading are executed The operation of the either element in data in the data of structure including clear data structure;
If in the data of current first data structure not including the data of clear data structure, it is determined that reading finishes first number According to the data for the clear data structure for including in the data of structure.
In a kind of implement scene, the number at least one the first data structure for including in the data of first data structure is read According to specific implementation is as follows:
Read the data for any first data structure for including in the data of first data structure;
The quantity of the data for any first data structure for including in the data of first data structure is subtracted 1;
If in the data of current first data structure not including the data of the first data structure, it is determined that reading finishes the 1st layer The data of the first data structure of at least one for including in data;
If including the data of the first data structure in the data of current first data structure, the current first data knot is read The data of any first data structure in the data for the first data structure for including in the data of structure;
The quantity of the data for any first data structure for including in the data of current first data structure is subtracted 1;
If in the data of current first data structure including the data of the first data structure, current first number of reading is executed According to the operation of the data of any first data structure in the data for the first data structure for including in the data of structure;
If in the data of current first data structure including the data of the first data structure, current first number of reading is executed According to the operation of the data of any first data structure in the data for the first data structure for including in the data of structure;
If in the data of current first data structure not including the data of the first data structure, it is determined that reading finish this first The data at least one the first data structure for including in the data of data structure.
Embodiment 2
The embodiment of the present invention 2 provides a kind of data processing method, and this method is for parsing target storage Multidimensional numerical, this method packet Include following step:
S201 parses the identification information of the first part in current 1st layer data.
S202 judges whether the length of the data of the clear data structure in current 1st layer data is greater than 0 according to identification information.
If judging, the length of the data of the clear data structure in current 1st layer data is greater than 0, executes S203, otherwise, executes S206。
S203 reads out an element in the data of the clear data structure in current 1st layer data.
The length of the data of clear data structure in current 1st layer data is subtracted 1 by S204.
S205, judges whether the length of the data of the clear data structure in current 1st layer data is greater than 0.
If judging, the length of the data of the clear data structure in current 1st layer data no more than 0, executes S206;Otherwise, it executes S203。
S206 judges whether the quantity of the data of the first data structure in current 1st layer data is greater than 0 according to identification information.
If judging, the quantity of the data of the first data structure in current 1st layer data is greater than 0, executes S207;Otherwise, terminate Process.
S207 reads the data of any first data structure in current 1st layer data.
The process for reading every layer data in the data of any first data structure in current 1st layer data, is similar to reading The process of second part in 1st layer data.
Specifically, the identification information of the first part in the data of current any first data structure is parsed, according to mark Information, judges whether the length of the data of the clear data structure in the data of current any first data structure is greater than 0, if sentencing The length of the data of clear data structure in the data of disconnected any first data structure current out is not more than 0, is believed according to mark Breath, judges whether the quantity of the data of current any first data structure is greater than 0, if judging current any first data The quantity of the data of structure is not more than 0, executes S206, otherwise, includes in the data of current any first data structure of reading The first data structure data.If judging the data of the clear data structure in the data of current any first data structure Length be greater than 0, read out a member in the data of the clear data structure in the data of current any first data structure The length of the data of clear data structure in the data of current any first data structure is subtracted 1 by element, judgement it is current this Whether the length of the data of the clear data structure in the data of one first data structure is greater than 0, if judge it is current this any the The length of the data of clear data structure in the data of one data structure is greater than 0, and current any first data are read out in execution The operation of an element in the data of clear data structure in structure, otherwise, according to identification information, judgement it is current this any the Whether the quantity of the data of one data structure is greater than 0, if judging the quantity of the data of current any first data structure not Greater than 0, S206 is executed, otherwise, reads the number for the first data structure for including in the data of current any first data structure According to.
The operation for reading the data for the first data structure for including in the data of the first data structure in every layer data, can refer to The specific implementation of the data of any first data structure in above-mentioned current 1st layer data of reading, only by the current 1st Layer data replaces with every layer data, subsequent to repeat no more.
The data of the first data structure in current 1st layer data are subtracted 1 by S208.
S209, judges whether the quantity of the data of the first data structure in current 1st layer data is greater than 0.
If judging, the quantity of the data of the first data structure in current 1st layer data is greater than 0, executes S207;Otherwise, terminate Process.
As long as just triggering the executing subject of the embodiment of the present invention 1 it should be noted that getting the first part of the 1st layer data S201~209 are executed, without other interventions, target storage Multidimensional numerical can be parsed.
It is the flow diagram for parsing the method for target storage Multidimensional numerical for example, with reference to Fig. 5, Fig. 5, this method can be performed following Operation:
1, data header parsing obtains the length of the data of the clear data structure in the 1st layer data and the data of the first data structure Quantity, 2, read data until the length of the data of clear data structure is 0, it is transferred to the reading of the data of the first data structure, 3, The process for reading the data of the first data structure is similar to the reading process of data head and data volume in the 1st layer data, completes After primary, the quantity of the data of the first data structure subtract Isosorbide-5-Nitrae, to the first data structure in the 1st layer data data number When amount is 0, all reading terminates.
Embodiment 3
A kind of data processing equipment is also provided in the embodiment of the present invention 3, the structural schematic diagram of the device can be found in Fig. 6, the data Processing unit includes:
Module 21 is obtained, for obtaining Multidimensional numerical to be stored.
Module 21 is obtained, is also used to obtain data number of plies N, wherein N is not less than 2;
Determining module 22, for the first data structure to be determined as to the data structure of the 1st layer data, wherein first data Structure includes first part and second part, and the first part is arranged in front of the second part, the second part packet The Multidimensional numerical to be stored is included, the first part includes identification information, and the identification information includes in the second part Including the type of data, the length of the data of clear data structure and the second part the first data knot for including The quantity of the data of structure.
The Multidimensional numerical to be stored of clear data structure is determined as the 2nd layer data if being also used to N=2 by determining module 22.
Nested WFTA module 23 obtains target storage multidimensional for the 2nd layer data to be nested in the second part in the 1st layer data Array.
Determining module 22, if being also used to N>2, in response to the determine instruction of user, determine 2~N layer data, wherein the 2nd~ The structure of any layer data in N-1 layer data is the data or at least one first number of at least one the first data structure According to the data of the data of structure and a clear data structure, the structure of n-th layer data is clear data structure.
Obtain module 21, be also used to obtain the nested position of every layer data in 2~N layer data, wherein every layer data it is embedding Position is covered, refers to the second part in the first data structure of at least one of a upper layer data for the layer data.
Nested WFTA module 23 is also used to be nested in corresponding nested position, obtain mesh every layer data in 2~N layer data Mark storage Multidimensional numerical, wherein it is Multidimensional numerical to be stored that target, which stores the data in Multidimensional numerical,.
The embodiment of the present invention 3 also provides a kind of data processing hardware device, and hardware device includes:
Memory, for storing non-transitory computer-readable instruction;And
Processor executes reality so that realizing when computer-readable instruction is executed by processor for running computer-readable instruction Apply the data processing method of any implementation referred in example 1,2.
The embodiment of the present invention 3 also provides a kind of storage medium, for storing non-transitory computer-readable instruction, works as non-transitory When computer-readable instruction is executed by computer, so that computer executes the number of any implementation referred in embodiment 1,2 According to processing method.
The present invention implements 3 and also provides a kind of chip, and chip is used to execute the data of any implementation referred in embodiment 1,2 Processing method.
In the embodiment of the present invention 3, also provide a kind of resolver, the structural schematic diagram of resolver referring to Fig. 7, including:Meter Counting unit, data-reading unit, data head resolution unit, wherein:
1) counting unit in the initial state, the number of the data of the length and the first data structure of the data of all clear data structures Amount, is 0, at this moment, reads in data head by 3 control data-reading units in Fig. 7;
2) data head is sent into data head resolution unit by 1 by data-reading unit;
3) according to data header information, data head resolution unit is by 2 in Fig. 7 by the data of data length and the first data structure Quantity, be sent into counting unit;
4) according to the difference of data number of plies N, N group counter records data length and the first data structure are corresponding in counting unit Data quantity;
5) counting unit reads in all data by 3 control data-reading units in Fig. 7, returns to init state;
6) operation for returning to step 1), until data code flow terminates.
In the present invention, data number of plies N can be obtained, wherein N is not less than 2, by the first data by obtaining Multidimensional numerical to be stored Structure determination is the data structure of the 1st layer data, wherein first data structure includes first part and second part, institute It states first part to be arranged in front of the second part, second part Multidimensional numerical to be stored including described in, described first Part includes identification information, and the identification information includes the type for the data for including, clear data structure in the second part The quantity of the data for first data structure that the length of data and the second part include, if N>2, in response to The determine instruction at family, determines 2~N layer data, wherein the structure of any layer data in 2~N-1 layer data is at least The data of the data of one the first data structure or the data of at least one the first data structure and a clear data structure, The structure of n-th layer data is clear data structure, obtains the nested position of every layer data in 2~N layer data, wherein every layer The nested position of data refers to the second part in the first data structure of at least one of a upper layer data for the layer data, It is nested in every layer data in 2~N layer data in corresponding nested position, obtains target storage Multidimensional numerical, wherein It is Multidimensional numerical to be stored that target, which stores the data in Multidimensional numerical,.Wherein, the data in target storage Multidimensional numerical are wait deposit Store up Multidimensional numerical.Since the structure of target storage Multidimensional numerical is simple, target stores the Multidimensional numerical in the structure of Multidimensional numerical Each element in and there is no addition identifier, the complexity, the information of redundancy such as separator, just improve to a certain extent existing The efficiency of the method for storage Multidimensional numerical in technology.
In addition, in the prior art, when parsing target storage Multidimensional numerical, needing will be in the structure of target storage Multidimensional numerical The complexity such as the identifier, the separator that add in each element of Multidimensional numerical, the information of redundancy are rejected, and then can just be parsed wait deposit Multidimensional numerical is stored up, process is cumbersome, efficiency is lower, and in the present invention, when parsing target storage Multidimensional numerical, since target is deposited The structure for storing up Multidimensional numerical is simple, does not deposit in each element of the Multidimensional numerical to be stored in the structure of target storage Multidimensional numerical In complexity, the information of redundancy such as addition identifier, separators, when parsing target storage Multidimensional numerical, analytic method is more simple Single, efficiency is higher.
Furthermore as long as getting the first part of the 1st layer data, data processing method parsing target provided by the invention is just triggered Multidimensional numerical is stored, without other interventions, efficiency is higher.
It should be noted that each technical characteristic referred in Examples 1 to 3 can be freely combined, the present invention is to this without any It limits.
Although above having used general explanation and specific embodiment, the present invention is described in detail, in the present invention On the basis of, it can be made some modifications or improvements, this will be apparent to those skilled in the art.Therefore, not These modifications or improvements on the basis of deviation spirit of that invention, fall within the scope of the claimed invention.

Claims (10)

1. a kind of data processing method, which is characterized in that the method includes:
Obtain Multidimensional numerical to be stored;
Obtain data number of plies N, wherein the N is not less than 2;
First data structure is determined as to the data structure of the 1st layer data, wherein first data structure includes first part And second part, the first part are arranged in front of the second part, the second part includes the multidimensional to be stored Array, the first part include identification information, the identification information include the data for including in the second part type, The quantity of the data for first data structure that the length of the data of clear data structure and the second part include;
If N=2, Multidimensional numerical to be stored described in clear data structure is determined as the 2nd layer data;
2nd layer data is nested in the second part in the 1st layer data, target storage Multidimensional numerical is obtained;
If N>2, in response to the determine instruction of user, determine 2~N layer data, wherein any in 2~N-1 layer data The structure of layer data is the data of at least one first data structure or the number of at least one first data structure According to the data with a clear data structure, the structure of n-th layer data is clear data structure;
Obtain the nested position of every layer data in 2~N layer data, wherein the nested position of every layer data refers to this Second part in the first data structure of at least one of a upper layer data for layer data;
It is nested in every layer data in 2~N layer data in corresponding nested position, it is more to obtain the target storage Dimension group, wherein the data in the target storage Multidimensional numerical are the Multidimensional numerical to be stored.
2. the method as described in claim 1, which is characterized in that after obtaining the target storage Multidimensional numerical, the method Further include:
Include if in the 1st layer data not including the data of clear data structure, in the 1st layer data at least one described the The data of one data structure then read the data at least one first data structure for including in the 1st layer data;
If in the 1st layer data including the data of clear data structure, do not include in the 1st layer data at least one described the The data of one data structure then read the data for the clear data structure for including in the 1st layer data;
If in the 1st layer data include the data of clear data structure, and in the 1st layer data include at least one described the The data of one data structure then read the data for the clear data structure for including in the 1st layer data;
After the data for the clear data structure for having included in having read the 1st layer data, include in reading the 1st layer data The data of at least one first data structure.
3. method according to claim 2, which is characterized in that read the clear data structure for including in the 1st layer data Data specifically include:
Read the either element in the data for the clear data structure for including in the 1st layer data;
The length of the data for the clear data structure for including in 1st layer data is subtracted 1;
If in current 1st layer data not including the data of clear data structure, it is determined that reading, which finishes in the 1st layer data, includes Clear data structure data;
If in current 1st layer data including the data of clear data structure, it includes pure for reading in current 1st layer data Either element in the data of data structure;
The length of the data for the clear data structure for including in current 1st layer data is subtracted 1;
If in current 1st layer data including the data of clear data structure, executes to read in current 1st layer data and wrap Include the operation of the either element in the data of clear data structure;
If in current 1st layer data not including the data of clear data structure, it is determined that reading finishes in the 1st layer data Including clear data structure data.
4. method according to claim 2, which is characterized in that read described at least one for including in the 1st layer data The data of first data structure, specifically include:
Read the data for any first data structure for including in the 1st layer data;
The quantity of the data for any first data structure for including in 1st layer data is subtracted 1;
If in current 1st layer data not including the data of first data structure, it is determined that reading finishes the 1st layer data In include at least one first data structure data;
If including the data of first data structure in current 1st layer data, read in current 1st layer data Including first data structure data in any first data structure data;
The quantity of the data for any first data structure for including in current 1st layer data is subtracted 1;
If including the data of first data structure in current 1st layer data, executes and read current 1st number of plies The operation of the data of any first data structure in the data for first data structure for including in;
If in current 1st layer data not including the data of first data structure, it is determined that reading finishes described 1st layer The data of at least one for including in data first data structure.
5. method as claimed in claim 4, which is characterized in that read include in the 1st layer data any described first The data of data structure, specifically include:
If in the data of first data structure not including the data of clear data structure, include in the data of first data structure The data of at least one first data structure, then read described at least one for including in the data of first data structure The data of first data structure;
If in the data of first data structure include clear data structure data, the data of first data structure do not include to The data of few first data structure, then read the number for the clear data structure for including in the data of first data structure According to;
If in the data of first data structure including the data of clear data structure, and include in the data of first data structure The data of at least one first data structure then read the clear data structure for including in the data of first data structure Data;
After the data for the clear data structure for including in the data for having read first data structure, first data structure is read Data in include at least one first data structure data.
6. method as claimed in claim 5, which is characterized in that read the clear data for including in the data of first data structure The data of structure, specifically include:
Read the either element in the data for the clear data structure for including in the data of first data structure;
The length of the data for the clear data structure for including in the data of first data structure is subtracted 1;
If in the data of current first data structure not including the data of clear data structure, it is determined that reading finishes first number According to the data for the clear data structure for including in the data of structure;
If in the data of current first data structure including the data of clear data structure, read it is described it is current this first The either element in data in the data of data structure including clear data structure;
The length of the data for the clear data structure for including in the data of current first data structure is subtracted 1;
If in the data of current first data structure including the data of clear data structure, executes to read and described currently should The operation of the either element in data in the data of first data structure including clear data structure;
If in the data of current first data structure not including the data of clear data structure, it is determined that reading finish this The data for the clear data structure for including in the data of one data structure.
7. method as claimed in claim 5, which is characterized in that read include in the data of first data structure at least one The data of a first data structure, specifically include:
Read the data for any first data structure for including in the data of first data structure;
The quantity of the data for any first data structure for including in the data of first data structure is subtracted 1;
If in the data of current first data structure not including the data of first data structure, it is determined that reading finishes institute State the data of at least one for including in the 1st layer data first data structure;
If including the data of first data structure in the data of current first data structure, read described current The data of any first data structure in the data for first data structure for including in the data of first data structure;
The quantity of the data for any first data structure for including in the data of current first data structure is subtracted Go 1;
If including the data of first data structure in the data of current first data structure, execute described in reading Any first data structure in the data for first data structure for including in the data of current first data structure The operation of data;
If including the data of first data structure in the data of current first data structure, execute described in reading Any first data structure in the data for first data structure for including in the data of current first data structure The operation of data;
If in the data of current first data structure not including the data of first data structure, it is determined that read The data of at least one for including in the data of Bi Suoshu first data structure first data structure.
8. a kind of data processing equipment, which is characterized in that described device includes:
Module is obtained, for obtaining Multidimensional numerical to be stored;
The acquisition module is also used to obtain data number of plies N, wherein the N is not less than 2;
Determining module, for the first data structure to be determined as to the data structure of the 1st layer data, wherein the first data knot Structure includes first part and second part, and the first part is arranged in front of the second part, and the second part includes The Multidimensional numerical to be stored, the first part include identification information, and the identification information includes wrapping in the second part First data structure that type, the length of the data of clear data structure and the second part of the data included include Data quantity;
Multidimensional numerical to be stored described in clear data structure is determined as the 2nd number of plies if being also used to N=2 by the determining module According to;
Nested WFTA module obtains target and deposits for the 2nd layer data to be nested in the second part in the 1st layer data Store up Multidimensional numerical;
The determining module, if being also used to N>2, in response to the determine instruction of user, determine 2~N layer data, wherein the 2nd The structure of any layer data in~N-1 layer data be at least one first data structure data or at least one The data of first data structure and the data of a clear data structure, the structure of n-th layer data are clear data structure;
The acquisition module, is also used to obtain the nested position of every layer data in 2~N layer data, wherein every number of plies According to nested position, refer to the second part in the first data structure of at least one of a upper layer data for the layer data;
The nested WFTA module is also used to for every layer data in 2~N layer data being nested in corresponding nested position, Obtain the target storage Multidimensional numerical, wherein the data in the target storage Multidimensional numerical are the multidimensional number to be stored Group.
9. a kind of data processing hardware device, which is characterized in that the hardware device includes:
Memory, for storing non-transitory computer-readable instruction;And
Processor, for running the computer-readable instruction, so that the computer-readable instruction is executed by the processor Data processing method described in any one of Shi Shixian claims 1 to 7.
10. a kind of chip, which is characterized in that the chip is used at data described in any one of perform claim requirement 1 to 7 Reason method.
CN201810623996.XA 2018-06-15 2018-06-15 Data processing method and device, hardware device and chip Active CN108829831B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810623996.XA CN108829831B (en) 2018-06-15 2018-06-15 Data processing method and device, hardware device and chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810623996.XA CN108829831B (en) 2018-06-15 2018-06-15 Data processing method and device, hardware device and chip

Publications (2)

Publication Number Publication Date
CN108829831A true CN108829831A (en) 2018-11-16
CN108829831B CN108829831B (en) 2020-12-18

Family

ID=64141388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810623996.XA Active CN108829831B (en) 2018-06-15 2018-06-15 Data processing method and device, hardware device and chip

Country Status (1)

Country Link
CN (1) CN108829831B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6957215B2 (en) * 2001-12-10 2005-10-18 Hywire Ltd. Multi-dimensional associative search engine
CN102982103A (en) * 2012-11-06 2013-03-20 东南大学 On-line analytical processing (OLAP) massive multidimensional data dimension storage method
CN105224532A (en) * 2014-05-28 2016-01-06 腾讯科技(深圳)有限公司 Data processing method and device
US20170116281A1 (en) * 2015-10-23 2017-04-27 Oracle International Corporation System and method for providing bottom-up aggregation in a multidimensional database environment
CN107656876A (en) * 2017-10-19 2018-02-02 浪潮金融信息技术有限公司 Date storage method and device, computer-readable recording medium, terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6957215B2 (en) * 2001-12-10 2005-10-18 Hywire Ltd. Multi-dimensional associative search engine
CN102982103A (en) * 2012-11-06 2013-03-20 东南大学 On-line analytical processing (OLAP) massive multidimensional data dimension storage method
CN105224532A (en) * 2014-05-28 2016-01-06 腾讯科技(深圳)有限公司 Data processing method and device
US20170116281A1 (en) * 2015-10-23 2017-04-27 Oracle International Corporation System and method for providing bottom-up aggregation in a multidimensional database environment
CN107656876A (en) * 2017-10-19 2018-02-02 浪潮金融信息技术有限公司 Date storage method and device, computer-readable recording medium, terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邹逸江: "空间数据立方体的多维数据组织及存储", 《地理与地理信息科学》 *

Also Published As

Publication number Publication date
CN108829831B (en) 2020-12-18

Similar Documents

Publication Publication Date Title
US9589004B2 (en) Data storage method and apparatus
CN104866497B (en) The metadata updates method, apparatus of distributed file system column storage, host
CN103218176B (en) Data processing method and device
CN103176833B (en) A kind of data transmission method for uplink based on virtual machine, method of reseptance and system
CN105573733B (en) Method, web front-end and the system that browser is communicated with web front-end
CN108510428A (en) Picture method for drafting and Related product
CN106844721A (en) Date storage method, device, system, computer-readable recording medium and storage control
CN109377383A (en) Product data synchronous method, device, computer equipment and storage medium
CN109446761A (en) A kind of information security processing method, storage medium and terminal device
CN110413711A (en) A kind of variance data acquisition methods and its storage medium
CN105373526B (en) A kind of white space processing method and system in electronic document
CN110969000B (en) Data merging processing method and device
CN106358220B (en) The detection method of abnormal contact information, apparatus and system
CN107783728A (en) Date storage method, device and equipment
CN104238960B (en) Formatting hard disk method and data block storage method and device based on hard disk
CN105955996A (en) Image processing method and device
CN105550250B (en) A kind of processing method and processing device of access log
CN108829831A (en) A kind of data processing method, device, hardware device and chip
CN107800776A (en) A kind of document handling method, terminal, server and computer-readable medium
CN108664505A (en) A kind of deriving method and device of database table structure
CN106202456B (en) Send the method and device of picture
CN104375871B (en) A kind of method and apparatus based on the start of eMMC acceleration systems
CN106293996A (en) Method of data synchronization, main equipment, alternate device and system
CN109117091A (en) A kind of SSD equipment mount point acquisition methods and relevant apparatus
CN109359226A (en) A kind of data capture method and relevant apparatus

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