CN110968583A - Answer statistical method and device, equipment and storage medium - Google Patents

Answer statistical method and device, equipment and storage medium Download PDF

Info

Publication number
CN110968583A
CN110968583A CN201911140252.3A CN201911140252A CN110968583A CN 110968583 A CN110968583 A CN 110968583A CN 201911140252 A CN201911140252 A CN 201911140252A CN 110968583 A CN110968583 A CN 110968583A
Authority
CN
China
Prior art keywords
answer
question
data
user
ids
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.)
Withdrawn
Application number
CN201911140252.3A
Other languages
Chinese (zh)
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.)
Shanghai Yidianshikong Network Co Ltd
Original Assignee
Shanghai Yidianshikong Network 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 Shanghai Yidianshikong Network Co Ltd filed Critical Shanghai Yidianshikong Network Co Ltd
Priority to CN201911140252.3A priority Critical patent/CN110968583A/en
Publication of CN110968583A publication Critical patent/CN110968583A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education
    • G06Q50/205Education administration or guidance

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Educational Technology (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Probability & Statistics with Applications (AREA)
  • Educational Administration (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Fuzzy Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • General Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method, a device and equipment for counting answers and a storage medium. The method comprises the steps of synchronizing user answer data at regular time, wherein the answer data are synchronized from a MongoDB database to a Hive data warehouse at the same time; sequencing the examination question IDs under each knowledge point under each subject in the user answer data to obtain an examination question index relation table; making a question record of the user, counting and filing the question record of the user to obtain different answer records and obtain an answer record table; exporting the examination question index relation table and the answer records to a temporary file, and compiling the data into a PHP extension after arranging and packaging the data; and when the interface service is started, loading the interface service into the memory, and counting the answer correct rate of each question in the memory through the PHP extension. The method and the device solve the technical problem that the answer counting method is poor in effect. According to the method and the device, all examination question records and answer accuracy statistic logic codes of the user are packaged and compiled into the php extension, and the php extension is loaded when the interface service is started.

Description

Answer statistical method and device, equipment and storage medium
Technical Field
The present application relates to the field of data processing, and in particular, to a method and an apparatus for statistical answer, a device, and a storage medium.
Background
For mass answer data, the time spent on counting is needed to count the answer accuracy.
The inventor finds that the answer accuracy statistics are inconvenient due to the relation of the database, and the online business performance is influenced when the accuracy is calculated in the database.
Aiming at the problem of poor effect of the answer statistical method in the related technology, no effective solution is provided at present.
Disclosure of Invention
The present application mainly aims to provide an answer statistical method, an answer statistical device, an answer statistical apparatus, and a storage medium, so as to solve the problem that the answer statistical method is not good in effect.
In order to achieve the above object, according to one aspect of the present application, there is provided a question answering statistical method.
The answer statistical method comprises the following steps: synchronizing the answer data of the user at regular time, wherein the answer data is synchronized from the MongoDB database to the Hive data warehouse; sequencing the examination question IDs under each knowledge point under each subject in the user answer data to obtain an examination question index relation table; making a question record of the user, counting and filing the question record of the user to obtain different answer records and obtain an answer record table; exporting the examination question index relation table and the answer records to a temporary file, and compiling the data into a PHP extension after arranging and packaging the data; and when the interface service is started, loading the interface service into the memory, and counting the answer correct rate of each question in the memory through the PHP extension.
Further, the step of sequencing the examination question IDs of each knowledge point under each subject in the user answer data to obtain an examination question index relation table includes:
sorting examination question IDs under each knowledge point of each subject from small to large based on a Hive data warehouse pair, and taking the sorted IDs as index IDs;
and storing a title in each bit of the bitmap by using the bitmap algorithm.
Further, the statistics and archiving of the user's question making records to obtain different answer records, and the obtaining of the answer record table includes:
all the question making records of all users are counted and filed as different answer records based on a Hive data warehouse to obtain a bitmap answer record table, wherein the bitmap answer record table comprises the following steps: at least one or more subject IDs, knowledge point IDs, examination question IDs, user question answering bitmaps and user total numbers.
Further, exporting the examination question index relation table and the answer record to a temporary file, and compiling the data into a PHP extension after being sorted and packaged comprises:
exporting the examination question index relation table and the answer records to a temporary file, and compiling answer statistical codes;
introducing and reading temporary file data in the answer statistic codes, packaging and packaging the temporary file data, and compiling the temporary file data into php expansion; wherein the php extension is used to provide a statistical function to the outside.
Further, when the interface service is started, loading the interface service into the memory, and performing statistics on the answer accuracy of each question in the memory through the PHP extension includes:
when the statistical system is inquired, the subject ID, the knowledge point ID and the examination question ID are transmitted, then the statistical code and the data are called through the statistical function for statistics, and two numerical values of the number of users answering the question and the number of users answering the question are returned.
In order to achieve the above object, according to another aspect of the present application, there is provided a question answering statistic device.
The answer statistic device according to the application comprises: the synchronization module is used for synchronizing the answer data of the user at regular time, wherein the answer data is synchronized from the MongoDB database to the Hive data warehouse; the sequencing module is used for sequencing the examination question IDs under each knowledge point under each subject in the user answer data to obtain an examination question index relation table; the statistical module is used for counting and filing the question making records of the user to obtain different answer records and obtain an answer record table; the export module is used for exporting the examination question index relation table and the answer records to a temporary file, and compiling the data into PHP extension after the data are sorted and packaged; and the calling module is used for loading the interface service into the memory when the interface service is started, and counting the answer accuracy of each question in the memory through the PHP extension.
Further, the sorting module is used for sorting examination question IDs under each knowledge point of each subject from small to large based on the Hive data warehouse pair, and taking the sorted IDs as index IDs;
and storing a title in each bit of the bitmap by using the bitmap algorithm.
Further, the statistic module is used for
All the question making records of all users are counted and filed as different answer records based on a Hive data warehouse to obtain a bitmap answer record table, wherein the bitmap answer record table comprises the following steps: at least one or more subject IDs, knowledge point IDs, examination question IDs, user question answering bitmaps and user total numbers.
In order to achieve the above object, according to another aspect of the present application, there is provided an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the answer statistics method.
In order to achieve the above object, according to still another aspect of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the answer statistics method.
In the answer counting method, the answer counting device, the answer counting equipment and the storage medium in the embodiment of the application, the data are sorted, packaged and compiled into the php expansion mode, the data are loaded into the memory when the interface service is started, the answer correctness of each question is counted in the memory, and the purpose of reducing the space for storing all test question data is achieved, so that the technical effects of increasing the counting speed and the millisecond-level response speed are achieved, and the technical problem that the answer counting method is poor in effect is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, serve to provide a further understanding of the application and to enable other features, objects, and advantages of the application to be more apparent. The drawings and their description illustrate the embodiments of the invention and do not limit it. In the drawings:
FIG. 1 is a flow chart of a statistical method of answer according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a device for statistics of answers according to an embodiment of the present application;
FIG. 3 is a schematic illustration of a statistical interface according to an embodiment of the present application;
FIG. 4 is a schematic illustration of a statistical interface according to an embodiment of the present application.
Fig. 5 is a schematic diagram of an apparatus according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In this application, the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings. These terms are used primarily to better describe the present application and its embodiments, and are not used to limit the indicated devices, elements or components to a particular orientation or to be constructed and operated in a particular orientation.
Moreover, some of the above terms may be used to indicate other meanings besides the orientation or positional relationship, for example, the term "on" may also be used to indicate some kind of attachment or connection relationship in some cases. The specific meaning of these terms in this application will be understood by those of ordinary skill in the art as appropriate.
Furthermore, the terms "mounted," "disposed," "provided," "connected," and "sleeved" are to be construed broadly. For example, it may be a fixed connection, a removable connection, or a unitary construction; can be a mechanical connection, or an electrical connection; may be directly connected, or indirectly connected through intervening media, or may be in internal communication between two devices, elements or components. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
As shown in fig. 1, the method includes steps S101 to S105 as follows:
step S101, synchronizing the answering data of the user at regular time,
the answer data refers to the data synchronization from the MongoDB database to the Hive data warehouse.
Specifically, the driving test answer data in the MongoDB database is synchronized to the Hive data warehouse at regular time.
S102, sequencing the examination question IDs under each knowledge point under each subject in the user answer data to obtain an examination question index relation table;
specifically, the examination question IDs under each knowledge point of each subject are sorted from small to large in the Hive data warehouse, and the sorted IDs are index IDs.
Step S103, carrying out statistics and filing on the question making records of the user to obtain different answer records and obtain an answer record table;
specifically, the subjects, knowledge points, examination question IDs, ranking IDs, area IDs, bit numerical values, and the like are used as an examination question bitmap index relationship table.
Step S104, exporting the examination question index relation table and the answer records to a temporary file, and compiling the data into PHP extension after arranging and packaging the data;
specifically, a Hive data warehouse is used for counting and filing all question making records of all users into different answer records, and a bitmap answer record table is made.
And step S105, loading the interface service into a memory when the interface service is started, and counting the answer accuracy of each question in the memory through the PHP extension.
Specifically, when the interface service is started, the interface service is loaded into the memory, the statistical code and the data can be called through the function in the PHP extension for statistics, and finally two values are returned, wherein one value is the number of people who have done the topic, and the other value is the number of people who have done the topic. And finally obtaining the answer accuracy of the examination question.
From the above description, it can be seen that the following technical effects are achieved by the present application:
in the embodiment of the application, the data is sorted, packaged and compiled into the php extension mode, the answer accuracy of each question is counted in the memory by loading the data into the memory when the interface service is started, and the purpose of reducing the space for storing all test question data is achieved, so that the technical effects of speeding up the counting and millisecond response speed are achieved, and the technical problem of poor answer counting method effect is solved.
According to the embodiment of the present application, as a preferred choice in the embodiment, the step of sorting the examination question IDs under each knowledge point under each subject in the user answer data to obtain an examination question index relationship table includes: sorting examination question IDs under each knowledge point of each subject from small to large based on a Hive data warehouse pair, and taking the sorted IDs as index IDs; and storing a title in each bit of the bitmap by using the bitmap algorithm.
Specifically, the examination question IDs under each knowledge point of each subject are sorted from small to large, and the sorted IDs are index IDs. The bitmap algorithm is utilized. As the number of the examination questions under one knowledge point does not exceed 240, the examination questions are divided into 4 shares, each share has 64 tracks, namely 64 bits in bitmap, and each bit stores one question.
As shown in FIGS. 3 and 4, the 1 st digit is converted into 2, i.e. 2, which is a common decimal number 12; position 8 is 256, i.e. 28=256。
According to the embodiment of the present application, as an optimization in the embodiment, the statistical filing of the user's question making records to obtain different answer records includes:
all the question making records of all users are counted and filed as different answer records based on a Hive data warehouse to obtain a bitmap answer record table, wherein the bitmap answer record table comprises the following steps: at least one or more subject IDs, knowledge point IDs, examination question IDs, user question answering bitmaps and user total numbers.
Specifically, a Hive data warehouse is used for counting and filing all question making records of all users into different answer records, and a bitmap answer record table is made. The method comprises subject id, knowledge point id, examination question id, user question answering bitmap and user number, namely the total number of users in the same question answering situation.
According to the embodiment of the present application, as an optimal choice in the embodiment, exporting the examination question index relation table and the answer record to a temporary file, and compiling and packing the data into a PHP extension includes: exporting the examination question index relation table and the answer records to a temporary file, and compiling answer statistical codes; introducing and reading temporary file data in the answer statistic codes, packaging and packaging the temporary file data, and compiling the temporary file data into php expansion; wherein the php extension is used to provide a statistical function to the outside.
Specifically, the above-mentioned examination question bitmap index relation table and bitmap answer recording table are exported to a temporary file. Writing answer statistic codes, introducing and reading temporary file data in the codes, packaging and compiling into php extensions, wherein the php extensions provide statistic functions externally. When the statistics is inquired, the subject ID, the knowledge point ID and the examination question ID are transmitted, the statistical code and the data can be called through the function for statistics, and finally two numerical values are returned, wherein one numerical value is the number of people who have done the question, and the other numerical value is the number of people who have done the question. And simple division calculation is carried out to obtain the answer accuracy of the examination question.
The user answer data and the statistical logic codes are packaged and compiled into the php extension, and the php extension is automatically loaded into the memory when the program service is started. The method realizes the statistics of the accuracy of the examination questions in the memory, omits a plurality of network requests compared with the statistical mode stored in an external database, greatly accelerates the statistical speed and realizes the millisecond-level response speed.
According to the embodiment of the present application, as a preferred option in the embodiment, when the interface service is started, the interface service is loaded into the memory, and the statistics of the answer accuracy of each question in the memory through the PHP extension includes: when the statistical system is inquired, the subject ID, the knowledge point ID and the examination question ID are transmitted, then the statistical code and the data are called through the statistical function for statistics, and two numerical values of the number of users answering the question and the number of users answering the question are returned.
Specifically, an interface is provided for a data calling party, a subject ID, a knowledge point ID and an examination question ID are transmitted, and the answer success rate of the examination question is output.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
According to an embodiment of the present application, there is also provided a device for statistics of answers for implementing the above method, as shown in fig. 2, the device includes: the synchronization module 10 is used for synchronizing the answer data of the user at regular time, wherein the answer data is synchronized from the MongoDB database to the Hive data warehouse; the sorting module 11 is configured to sort the examination question IDs under each knowledge point under each subject in the user answer data to obtain an examination question index relation table; the statistical module 12 is used for performing statistics and filing on the user question making records to obtain different answer records and obtain an answer record table; the export module 13 is used for exporting the examination question index relation table and the answer records to a temporary file, and compiling the data into PHP extension after being sorted and packaged; and the calling module 14 is used for loading the interface service into the memory when the interface service is started, and counting the answer accuracy of each question in the memory through the PHP extension.
In the synchronization module 10 of the embodiment of the present application, specifically, the driving test answer data in the montogdb database is synchronized to the Hive data warehouse at regular time.
In the sorting module 11 of the embodiment of the application, specifically, the examination question IDs of each knowledge point of each subject in the Hive data warehouse are sorted from small to large, and the sorting ID is an index ID.
In the statistical module 12 of the embodiment of the present application, specifically, the subject, the knowledge point, the examination question ID, the ranking ID, the area ID, the bit numerical value, and the like are used as an examination question bitmap index relationship table.
In the export module 13 of the embodiment of the present application, specifically, the Hive data warehouse is used to statistically archive all question making records of all users into different answer records, so as to make a bitmap answer record table.
Specifically, in the calling module 14 in the embodiment of the present application, when the interface service is started, the interface service is loaded into the memory, that is, the statistical code and the data are called through the function in the PHP extension to perform statistics, and finally two values are returned, one is the number of people who have done the topic, and the other is the number of people who have done the topic. And finally obtaining the answer accuracy of the examination question.
According to the embodiment of the present application, as shown in fig. 2, the sorting module 11 is configured to sort the examination question IDs under each knowledge point of each subject from small to large based on the Hive data warehouse pair, and use the sorted IDs as index IDs; and storing a title in each bit of the bitmap by using the bitmap algorithm.
Specifically, in the sorting module 11 of the embodiment of the present application, the examination question IDs under each knowledge point of each subject are sorted from small to large, and the sorted IDs are index IDs. The bitmap algorithm is utilized. As the number of the examination questions under one knowledge point does not exceed 240, the examination questions are divided into 4 shares, each share has 64 tracks, namely 64 bits in bitmap, and each bit stores one question. As shown in FIGS. 3 and 4, the 1 st digit is converted into 2, i.e. 2, which is a common decimal number 12; position 8 is 256, i.e. 28=256。
According to the embodiment of the present application, as an optimization in this embodiment, as shown in fig. 2, the statistics module 12 is configured to statistically archive all question making records of all users into different answer records based on a Hive data warehouse, so as to obtain a bitmap answer record table, where the bitmap answer record table includes: at least one or more subject IDs, knowledge point IDs, examination question IDs, user question answering bitmaps and user total numbers.
In the statistical module 12 of the embodiment of the present application, specifically, a Hive data warehouse is used to count and file all the question making records of all users into different answer records, so as to make a bitmap answer record table. The method comprises subject id, knowledge point id, examination question id, user question answering bitmap and user number, namely the total number of users in the same question answering situation.
The embodiment of the application also provides computer equipment. As shown in fig. 5, the computer device 20 may include: the at least one processor 201, e.g., CPU, the at least one network interface 204, the user interface 203, the memory 205, the at least one communication bus 202, and optionally, a display 206. Wherein a communication bus 202 is used to enable the connection communication between these components. The user interface 203 may include a touch screen, a keyboard or a mouse, among others. The network interface 204 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), and a communication connection may be established with the server via the network interface 204. The memory 205 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory, and the memory 205 includes a flash in the embodiment of the present invention. The memory 205 may optionally be at least one memory system located remotely from the processor 201. As shown in fig. 5, memory 205, which is a type of computer storage medium, may include an operating system, a network communication module, a user interface module, and program instructions.
It should be noted that the network interface 204 may be connected to a receiver, a transmitter or other communication module, and the other communication module may include, but is not limited to, a WiFi module, a bluetooth module, etc., and it is understood that the computer device in the embodiment of the present invention may also include a receiver, a transmitter, other communication module, etc.
Processor 201 may be used to call program instructions stored in memory 205 and cause computer device 20 to perform the following operations:
synchronizing the answer data of the user at regular time, wherein the answer data is synchronized from the MongoDB database to the Hive data warehouse;
sequencing the examination question IDs under each knowledge point under each subject in the user answer data to obtain an examination question index relation table;
making a question record of the user, counting and filing the question record of the user to obtain different answer records and obtain an answer record table;
exporting the examination question index relation table and the answer records to a temporary file, and compiling the data into a PHP extension after arranging and packaging the data;
and when the interface service is started, loading the interface service into the memory, and counting the answer correct rate of each question in the memory through the PHP extension.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. An answer statistical method, comprising:
synchronizing the answer data of the user at regular time, wherein the answer data is synchronized from the MongoDB database to the Hive data warehouse;
sequencing the examination question IDs under each knowledge point under each subject in the user answer data to obtain an examination question index relation table;
making a question record of the user, counting and filing the question record of the user to obtain different answer records and obtain an answer record table;
exporting the examination question index relation table and the answer records to a temporary file, and compiling the data into a PHP extension after arranging and packaging the data;
and when the interface service is started, loading the interface service into the memory, and counting the answer correct rate of each question in the memory through the PHP extension.
2. The answer statistical method of claim 1, wherein sorting the examination question IDs under each knowledge point under each subject in the user answer data to obtain an examination question index relationship table comprises:
sorting examination question IDs under each knowledge point of each subject from small to large based on a Hive data warehouse pair, and taking the sorted IDs as index IDs;
and storing a title in each bit of the bitmap by using the bitmap algorithm.
3. The answer statistical method of claim 1, wherein the step of statistically archiving the user's answer records to obtain different answer records comprises:
all the question making records of all users are counted and filed as different answer records based on a Hive data warehouse to obtain a bitmap answer record table, wherein the bitmap answer record table comprises the following steps: at least one or more subject IDs, knowledge point IDs, examination question IDs, user question answering bitmaps and user total numbers.
4. The answer statistical method of claim 1, wherein exporting the examination question index relation table and the answer record to a temporary file, and compiling the data into a PHP extension after being sorted and packaged comprises:
exporting the examination question index relation table and the answer records to a temporary file, and compiling answer statistical codes;
introducing and reading temporary file data in the answer statistic codes, packaging and packaging the temporary file data, and compiling the temporary file data into php expansion; wherein the php extension is used to provide a statistical function to the outside.
5. The answer counting method according to claim 4, wherein the answer is loaded into the memory when the interface service is started, and the counting of the answer accuracy of each question in the memory through the PHP extension comprises:
when the statistical system is inquired, the subject ID, the knowledge point ID and the examination question ID are transmitted, then the statistical code and the data are called through the statistical function for statistics, and two numerical values of the number of users answering the question and the number of users answering the question are returned.
6. An answer statistic device, comprising:
the synchronization module is used for synchronizing the answer data of the user at regular time, wherein the answer data is synchronized from the MongoDB database to the Hive data warehouse;
the sequencing module is used for sequencing the examination question IDs under each knowledge point under each subject in the user answer data to obtain an examination question index relation table;
the statistical module is used for counting and filing the question making records of the user to obtain different answer records and obtain an answer record table;
the export module is used for exporting the examination question index relation table and the answer records to a temporary file, and compiling the data into PHP extension after the data are sorted and packaged;
and the calling module is used for loading the interface service into the memory when the interface service is started, and counting the answer accuracy of each question in the memory through the PHP extension.
7. The answer statistic device according to claim 6, wherein the sorting module is configured to sort the examination question IDs of each knowledge point of each subject from small to large based on the Hive data warehouse pair, and use the sorted IDs as index IDs;
and storing a title in each bit of the bitmap by using the bitmap algorithm.
8. The answer statistic device according to claim 6, wherein said statistic module is for calculating the answer of said question
All the question making records of all users are counted and filed as different answer records based on a Hive data warehouse to obtain a bitmap answer record table, wherein the bitmap answer record table comprises the following steps: at least one or more subject IDs, knowledge point IDs, examination question IDs, user question answering bitmaps and user total numbers.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the answer statistics method of any one of claims 1 to 5 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the answer statistic method of any one of claims 1 to 5.
CN201911140252.3A 2019-11-19 2019-11-19 Answer statistical method and device, equipment and storage medium Withdrawn CN110968583A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911140252.3A CN110968583A (en) 2019-11-19 2019-11-19 Answer statistical method and device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911140252.3A CN110968583A (en) 2019-11-19 2019-11-19 Answer statistical method and device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110968583A true CN110968583A (en) 2020-04-07

Family

ID=70030876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911140252.3A Withdrawn CN110968583A (en) 2019-11-19 2019-11-19 Answer statistical method and device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110968583A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114024980A (en) * 2021-10-26 2022-02-08 南京元贝信息技术有限公司 Data multi-terminal synchronous processing method, device and equipment based on network request

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114024980A (en) * 2021-10-26 2022-02-08 南京元贝信息技术有限公司 Data multi-terminal synchronous processing method, device and equipment based on network request

Similar Documents

Publication Publication Date Title
CN108062367B (en) Data list uploading method and terminal thereof
CN110292775B (en) Method and device for acquiring difference data
CN108415980A (en) Question and answer data processing method, electronic device and storage medium
CN107958028A (en) Method, apparatus, storage medium and the terminal of data acquisition
CN107404481B (en) User information recognition methods and device
CN112668914A (en) Customer marketing management system based on cloud computing
CN104157065B (en) Internet voting method and device
CN105989076A (en) Data statistical method and device
CN110795203A (en) Resource scheduling method, device and system and computing equipment
CN107944000A (en) Flight freight rate update method, device, electronic equipment, storage medium
CN111142746B (en) System quota calculation method and device
CN109492024A (en) Data processing method, device, computer equipment and storage medium
CN107295082A (en) Running software processing method, apparatus and system
CN108520471A (en) It is overlapped community discovery method, device, equipment and storage medium
CN106874326A (en) A kind of item list obtains request processing method and device
CN114757639A (en) Data processing method, device, equipment and storage medium
CN110968583A (en) Answer statistical method and device, equipment and storage medium
CN110457312A (en) Acquisition method, device, equipment and the readable storage medium storing program for executing of diversiform data
CN107577550A (en) A kind of whether abnormal method and device of response for determining access request
CN109144624B (en) Method, storage medium, device and system for displaying unequal height lists in IOS
CN115729990A (en) Distributed data storage method and device, electronic equipment and storage medium
CN107562469A (en) A kind of title bar method for exhibiting data and system
CN110020166A (en) A kind of data analysing method and relevant device
CN109144809A (en) A kind of focal variation monitoring method, storage medium, electronic equipment and system
CN107995301B (en) Rapid data receiving and transmitting method based on Internet

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20200407

WW01 Invention patent application withdrawn after publication