CN112163408A - Multi-level pull-down question type data processing method in online questionnaire survey system - Google Patents
Multi-level pull-down question type data processing method in online questionnaire survey system Download PDFInfo
- Publication number
- CN112163408A CN112163408A CN202010919327.4A CN202010919327A CN112163408A CN 112163408 A CN112163408 A CN 112163408A CN 202010919327 A CN202010919327 A CN 202010919327A CN 112163408 A CN112163408 A CN 112163408A
- Authority
- CN
- China
- Prior art keywords
- data
- level
- questionnaire
- answer
- processing
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 7
- 238000000034 method Methods 0.000 claims description 5
- 241001465754 Metazoa Species 0.000 description 9
- 238000007619 statistical method Methods 0.000 description 5
- 241000251468 Actinopterygii Species 0.000 description 3
- 241000196324 Embryophyta Species 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000011218 segmentation Effects 0.000 description 3
- 241001609213 Carassius carassius Species 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000007405 data analysis Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 235000013311 vegetables Nutrition 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 235000010799 Cucumis sativus var sativus Nutrition 0.000 description 1
- 244000299906 Cucumis sativus var. sativus Species 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 241000894007 species Species 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/177—Editing, e.g. inserting or deleting of tables; using ruled lines
- G06F40/18—Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a multi-level pull-down question type data processing method in an online questionnaire survey system, which comprises the following steps of S1: inputting questionnaire data; s2: processing questionnaire data; s3: reading the format data stored in the step S2, converting the format data into a user interface, and performing multi-level pull-down selection as a questionnaire mode; s4: inputting answer sheet data; s5: processing questionnaire data; s6: reading all answer sheet data in S5, performing grouping operation by using group by, grouping according to multi-level pull-down answers, and counting the frequency of each answer; s7: splitting multi-level pull-down answers by using split, carrying frequencies, and converting the answers into a list array; s8: outputting; the scheme is simpler in storage and quicker in query, and the performance of the scheme can be more revealed along with the increase of the number of data sources, the increase of the number of answer sheets and the increase of the levels.
Description
Technical Field
The invention belongs to the technical field of data form processing, and particularly relates to a multi-level pull-down question type data processing method in an online questionnaire survey system.
Background
The multi-level pull-down question is a commonly used question type in an online questionnaire, and a questionnaire writer can select items to be written in a hierarchical level from a data source set by a questionnaire publisher, such as: the plant-vegetable-cucumber, animal-bird-eagle, animal-fish-crucian can theoretically support the setting of N grade and number, and is also without limitation.
This data occurs mainly in two places in the online questionnaire system: in the questionnaire setting and the answer of the questionnaire, all data sources are stored according to a certain relation in the questionnaire setting, the data in the answer of the questionnaire is a certain answer filled by a filling person, the data sources of the questionnaire are very complete but not repeated, and the answer in the answer is multiple and repeated.
In mainstream programming, the data is often stored in a relational manner using a database, for example:
the multi-level pull-down data source structure storage table in the questionnaire is as follows:
data storage table in answer sheet:
the traditional storage mode needs to combine all classifications into a tree structure from a database every time, the deeper the hierarchy is, the slower the reading is, and in addition, when the statistical analysis of data of each level is carried out, the slow effect of data processing and analysis is not ideal under the condition of large data volume of answer sheets.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides the data processing method of the multi-level pull-down question type in the on-line questionnaire survey system, which has the advantages of simple structure, high reading speed and good statistical analysis effect.
The technical scheme of the invention is realized as follows:
the method comprises the following steps:
s1: questionnaire data input-questionnaire publisher inputs all multi-level drop-down question data sources;
s2: processing questionnaire data, namely performing character string processing on the S1 data, replacing the data by using a place () function, then using character string connection operation, converting the combined data into a byte stream and writing the byte stream into storage equipment;
s3: reading the format data stored in the step S2, converting the format data into a user interface, and performing multi-level pull-down selection as a questionnaire mode;
s4: answer data input-several filling persons fill several questionnaires obtained in S3, and enter the data of equivalent number of filling persons' answer;
s5: processing questionnaire data, namely performing character string processing on the data in S4 according to the step of S2, replacing by using a replace () function, then using character string connection operation, converting the combined character string into a byte stream and storing the byte stream into an answer sheet of an Sql Server database;
s6: reading all answer sheet data in S5, performing grouping operation by using group by, grouping according to multi-level pull-down answers, and counting the frequency of each answer;
s7: the split multi-level drop-down answers are split by using split, the split multi-level drop-down answers carry frequency, the split multi-level drop-down answers are converted into a list array, and list items comprise: public string Name is the Name of the item, public string parterngname is the Name of the father item, public int Count is the frequency, public string Path is the Path, and public int Level is the Level;
s8: and (4) outputting, namely outputting the frequency of each Level according to the public int Level list of S7 after the structure is obtained, and querying the frequency of the subset according to the public string Path.
Further, when expanding in the step S7, using the temporary dictionary, using path as key, and directly accumulating item as item to obtain the list array without the data with the same name, and then outputting.
The effect of the working principle of the invention is as follows:
the core thought of data processing in the scheme is integral storage, a special character segmentation method is adopted for the relationship, the longest answer in the answer sheet is taken as an item, then all items are enumerated and combined together to be taken as an integral field, and the integral field is stored as an attribute of the question, for example:
a plant support member a vegetable support member a cucumber ┇ animal support member a bird support member an eagle ┇ animal support member a fish support member a crucian.
For such a format, the format is written into a database or other storage media, so that almost no time cost exists, the format is intuitive and almost consistent with the format input by a user, only the most basic string processing function replace () function is needed to replace, and then string connection operation is used, so that the string processing function replace () function can be combined and is converted into a byte stream to be stored; the database paradigm is abandoned, the storage is more convenient, the reading is more rapid, and the statistical analysis is more facilitated.
The scheme adopts a special character segmentation method, takes the longest answer in the answer sheet as an item, then enumerates all the items together as an integral field, stores the integral field as an attribute of the question, writes the attribute into a database or other storage media, almost has no time cost, is visual and almost consistent with the format input by a user, only needs to replace the most basic character string processing function replace () function, then uses character string connection operation, can be combined, and writes the combined result into a storage device after being converted into a byte stream, and has quick reading and clear data structure;
when the user submits the answer, only the items selected by the user are stored as a whole into the answer sheet table written into the database. The storage mode is simple in storage and high in reading performance, and is more beneficial to later-stage data analysis, such as statistical analysis and cross analysis.
The scheme is simpler to store and quicker to query, and the performance of the scheme can be better revealed as the number of data sources is increased (possibly more than tens of thousands), the number of answer sheets is increased (possibly millions +), and the hierarchy is increased (4 levels are common levels).
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely in the following embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that all the directional indicators (such as up, down, left, right, front, and rear … …) in the embodiment of the present invention are only used to explain the relative position relationship between the components, the motion situation, etc. in a specific posture, if the specific posture is changed, the directional indicator is changed accordingly.
In addition, the descriptions related to "first", "second", etc. in the present invention are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Example 1
A data processing method of a multi-level pull-down question type in an online questionnaire survey system comprises the following steps:
s1: questionnaire data input-questionnaire publisher inputs all multi-level drop-down question data sources;
s2: processing questionnaire data, namely performing character string processing on the S1 data, replacing the data by using a place () function, then using character string connection operation, converting the combined data into a byte stream and writing the byte stream into storage equipment;
s3: reading the format data stored in the step S2, converting the format data into a user interface, and performing multi-level pull-down selection as a questionnaire mode;
s4: answer data input-several filling persons fill several questionnaires obtained in S3, and enter the data of equivalent number of filling persons' answer;
s5: processing questionnaire data, namely performing character string processing on the data in S4 according to the step of S2, replacing by using a replace () function, then using character string connection operation, converting the combined character string into a byte stream and storing the byte stream into an answer sheet of an Sql Server database;
s6: reading all answer sheet data in S5, performing grouping operation by using group by, grouping according to multi-level pull-down answers, and counting the frequency of each answer; as in the following table:
s7: the split multi-level drop-down answers are split by using split, the split multi-level drop-down answers carry frequency, the split multi-level drop-down answers are converted into a list array, and list items comprise: public string Name is the Name of an item, public string parterntname is the Name of a parent item, public int Count is the frequency, public string Path is the Path, and public int Level is the Level, which are specifically as follows:
public class MultiDropTreeItem
{
public string Name { get; set; item name
public string partenname { get; set; }// parent name
public int Count { get; set; frequency// degree
public string Path { get; set; the/path that can quickly locate the entry in the array
public int Level { get; set; }// level
}
The above list can be expressed in json format:
[ { Name: "eagle", ParentName: "bird", Count: "33", Leve: "3" },
{ Name: "birds", ParentName: "animals", Count: "33", Leve: "2" },
{ Name: "animal", ParentName: "0", Count: "33", Leve: "1" },
{ Name: "crucian carp", ParentName: "fish", Count: "99", Leve: "3" },
{ Name: "Fish", ParentName: "0", Count: "99", Leve: "2" },
{ Name: "animal", ParentName: "0", Count: "99", Leve: "1" },
...
]
s8, when expanding in the step S7, using the temporary dictionary, using path as key, and directly accumulating item as item to obtain the list array without the data with the same name, wherein the list is as follows:
[ { Name: "eagle", ParentName: "bird", Count: "33", Leve: "3" },
{ Name: "birds", ParentName: "animals", Count: "33", Leve: "2" },
{ Name: "animal", ParentName: "0", Count: "132", Leve: "1" },
{ Name: "crucian carp", ParentName: "fish", Count: "99", Leve: "3" },
{ Name: "Fish", ParentName: "0", Count: "99", Leve: "2" },
...
]
s9: outputting, namely outputting the frequency of each Level according to a public int Level list of S8 after the structure is obtained, and querying the frequency of the subset according to a public string Path; the following table:
first stage
Plant and method for producing the same | 88 |
Animal(s) production | 132 |
... | ... |
Second stage (plant)
Vegetable product | 88 |
Fruit | 777 |
... |
Second stage (animals)
Birds | 33 |
Fish species | 99 |
The third stage.
When the embodiment is used: adopting a special character segmentation method, taking one answer which can be longest in the answer sheet as an item, then enumerating all the items together as an integral field, storing the integral field as an attribute of the question, writing the attribute into a database or other storage media, almost having no time cost, because the visual property is almost consistent with the format input by a user, only needing to replace a most basic character string processing function place () function, then using character string connection operation, combining the items, after converting into a byte stream, writing into a storage device, reading rapidly and having clear data structure;
when the user submits the answer, only the items selected by the user are stored as a whole into the answer sheet table written into the database. The storage mode is simple in storage and high in reading performance, and is more beneficial to later-stage data analysis, such as statistical analysis and cross analysis.
The scheme has the advantages of simpler storage and quicker query, and the performance of the scheme can be better revealed as the number of data sources is increased (possibly more than tens of thousands), the number of answer sheets is increased (possibly millions +), and the hierarchy is increased (4 levels are common levels).
Finally, the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all of them should be covered in the claims of the present invention.
Claims (2)
1. A multi-level pull-down question type data processing method in an online questionnaire survey system is characterized by comprising the following steps:
s1: questionnaire data input-questionnaire publisher inputs all multi-level drop-down question data sources;
s2: processing questionnaire data, namely performing character string processing on the S1 data, replacing the data by using a place () function, then using character string connection operation, converting the combined data into a byte stream and writing the byte stream into storage equipment;
s3: reading the format data stored in the step S2, converting the format data into a user interface, and performing multi-level pull-down selection as a questionnaire mode;
s4: answer data input-several filling persons fill several questionnaires obtained in S3, and enter the data of equivalent number of filling persons' answer;
s5: processing questionnaire data, namely performing character string processing on the data in S4 according to the step of S2, replacing by using a replace () function, then using character string connection operation, converting the combined character string into a byte stream and storing the byte stream into an answer sheet of an Sql Server database;
s6: reading all answer sheet data in S5, performing grouping operation by using group by, grouping according to multi-level pull-down answers, and counting the frequency of each answer;
s7: the split multi-level drop-down answers are split by using split, the split multi-level drop-down answers carry frequency, the split multi-level drop-down answers are converted into a list array, and list items comprise: public string Name is the Name of the item, public string parterngname is the Name of the father item, public int Count is the frequency, public string Path is the Path, and public int Level is the Level;
s8: and (4) outputting, namely outputting the frequency of each Level according to the public int Level list of S7 after the structure is obtained, and querying the frequency of the subset according to the public string Path.
2. The method as claimed in claim 1, wherein when expanding in step S7, the temporary dictionary is used, path is used as key, item is directly added as item to get the list array without data of the same name, and then output.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010919327.4A CN112163408B (en) | 2020-09-04 | 2020-09-04 | Data processing method of multi-level drop-down questions in online questionnaire system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010919327.4A CN112163408B (en) | 2020-09-04 | 2020-09-04 | Data processing method of multi-level drop-down questions in online questionnaire system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112163408A true CN112163408A (en) | 2021-01-01 |
CN112163408B CN112163408B (en) | 2023-11-17 |
Family
ID=73859220
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010919327.4A Active CN112163408B (en) | 2020-09-04 | 2020-09-04 | Data processing method of multi-level drop-down questions in online questionnaire system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112163408B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112818208A (en) * | 2021-02-25 | 2021-05-18 | 长沙冉星信息科技有限公司 | Method for realizing actual calculation of questionnaire quota |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103092863A (en) * | 2011-11-03 | 2013-05-08 | 郭亮 | Questionnaire data processing method |
CN110929482A (en) * | 2019-10-28 | 2020-03-27 | 汕头大学医学院 | Questionnaire generation method and system |
CN111177337A (en) * | 2019-12-02 | 2020-05-19 | 网之易信息技术(北京)有限公司 | Data processing method and device for questionnaire |
-
2020
- 2020-09-04 CN CN202010919327.4A patent/CN112163408B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103092863A (en) * | 2011-11-03 | 2013-05-08 | 郭亮 | Questionnaire data processing method |
CN110929482A (en) * | 2019-10-28 | 2020-03-27 | 汕头大学医学院 | Questionnaire generation method and system |
CN111177337A (en) * | 2019-12-02 | 2020-05-19 | 网之易信息技术(北京)有限公司 | Data processing method and device for questionnaire |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112818208A (en) * | 2021-02-25 | 2021-05-18 | 长沙冉星信息科技有限公司 | Method for realizing actual calculation of questionnaire quota |
Also Published As
Publication number | Publication date |
---|---|
CN112163408B (en) | 2023-11-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102521416B (en) | Data correlation query method and data correlation query device | |
US10496624B2 (en) | Index key generating device, index key generating method, and search method | |
CN101430695B (en) | System and method for computing difference affinities of word | |
US8055597B2 (en) | Method and system for subspace bounded recursive clustering of categorical data | |
US11036685B2 (en) | System and method for compressing data in a database | |
CN102306176B (en) | On-line analytical processing (OLAP) keyword query method based on intrinsic characteristic of data warehouse | |
US9135280B2 (en) | Grouping interdependent fields | |
CN104504001B (en) | Towards the vernier building method of magnanimity distributed relational database | |
CN103577590A (en) | Data query method and system | |
CN103646032A (en) | Database query method based on body and restricted natural language processing | |
CN109299154B (en) | Big data storage system and method | |
WO2014210387A2 (en) | Concept extraction | |
CN104462421A (en) | Multi-tenant expanding method based on Key-Value database | |
CN104346331A (en) | Retrieval method and system for XML database | |
Tsytsarau et al. | Efficient sentiment correlation for large-scale demographics | |
CN103886072B (en) | Search result clustering system in the search engine of colliery | |
CN113408301A (en) | Sample processing method, device, equipment and medium | |
CN112163408A (en) | Multi-level pull-down question type data processing method in online questionnaire survey system | |
CN115238071A (en) | Data standard generation method, storage medium and system based on similar clustering and data exploration | |
CN115510289B (en) | Data cube configuration method and device, electronic equipment and storage medium | |
US8112385B2 (en) | Ready to render business intelligence result sets | |
CN106874498B (en) | Financial data access method and access device | |
CN106547843B (en) | Multi-stage classification query method and device | |
CN111026759B (en) | Report generation method and device based on Hbase | |
WO2022153287A1 (en) | Clustering of structured and semi-structured data |
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 |