CN111061477A - Menu generation method, device, equipment and medium based on SPSS application program - Google Patents

Menu generation method, device, equipment and medium based on SPSS application program Download PDF

Info

Publication number
CN111061477A
CN111061477A CN201911135557.5A CN201911135557A CN111061477A CN 111061477 A CN111061477 A CN 111061477A CN 201911135557 A CN201911135557 A CN 201911135557A CN 111061477 A CN111061477 A CN 111061477A
Authority
CN
China
Prior art keywords
data processing
spss
menu
variable
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911135557.5A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911135557.5A priority Critical patent/CN111061477A/en
Publication of CN111061477A publication Critical patent/CN111061477A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a menu generation method, a device, equipment and a medium based on an SPSS application program, wherein the method comprises the steps of obtaining an implementation environment for constructing a custom menu in the SPSS application program; implementing a data processing dialog box which is associated with the environment layout custom menu and is applied to a questionnaire survey scene in the custom menu, and generating action logic of the data processing dialog box; and associating the user-defined menu with the data processing dialog box, and adding the user-defined menu to a user interface. According to the invention, the encapsulation of the data processing logic in the questionnaire scene is realized by adding the user-defined menu in the SPSS user interface and associating the user-defined menu with the data processing dialog box, so that repeated manual operation of repeated processes by data analysts is reduced, the efficiency is further improved, and the possibility of mistake making of manual operation is also reduced.

Description

Menu generation method, device, equipment and medium based on SPSS application program
Technical Field
The present invention relates to the field of data analysis, and in particular, to a menu generation method, apparatus, device, and medium based on an SPSS application.
Background
In the data processing link in the field of questionnaire survey, data processing can be generally carried out by depending on SPSS software and manual work or by depending on Excel VBA in the prior art.
Because the flexibility of the SPSS language in the SPSS software is poor when data processing is performed, manual intervention is required to repeatedly perform processing of each link such as data definition, data cleaning, new variable definition, individual case weighting, cross table generation and the like for each questionnaire, and each link requires a data processor to think of required operations and complete implementation in combination with understanding of the SPSS basic menu by the data processor. This results in inefficient data processing and error-prone, which is increasingly evident, especially when the data processing personnel are not familiar with the SPSS software;
the basic functions provided by Excel are not in accordance with the questionnaire survey data processing scene, and the VBA needs to be used by considering both formula writing of a statistical analysis algorithm and statement writing of batch processing, so that the Excel is complex and has poor implementability.
Disclosure of Invention
In order to solve the technical problem that a high-encapsulation data processing menu for a questionnaire survey scene cannot be provided in the prior art, embodiments of the present invention provide a menu generation method, apparatus, device, and medium based on an SPSS application.
In one aspect, the present invention provides a menu generating method based on an SPSS application, where the method includes:
acquiring an implementation environment for constructing a custom menu in an SPSS application program;
implementing a data processing dialog box which is associated with the environment layout custom menu and is applied to a questionnaire survey scene in the custom menu, and generating action logic of the data processing dialog box;
and associating the user-defined menu with the data processing dialog box, and adding the user-defined menu to a user interface.
In another aspect, the present invention provides a menu generating apparatus based on an SPSS application, the apparatus including:
the implementation environment acquisition module is used for acquiring an implementation environment for constructing a custom menu in the SPSS application program;
the data processing dialog box construction module is used for implementing a data processing dialog box which is associated with the environment layout custom menu and is applied to a questionnaire survey scene in the custom menu and generating action logic of the data processing dialog box;
and the association visualization module is used for associating the user-defined menu with the data processing dialog box and adding the user-defined menu to a user interface.
In another aspect, the present invention provides a computer storage medium having at least one instruction, at least one program, code set, or set of instructions stored therein, which is loaded and executed by a processor to implement a method for generating a menu based on an SPSS application as described above.
In another aspect, the present invention provides a menu generating device based on SPSS application, the device comprising a processor and a memory, the memory storing at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded by the processor and executing one of the above-mentioned menu generating methods based on SPSS application.
The invention provides a menu generation method, a device, equipment and a medium based on an SPSS application program, which realize the encapsulation of data processing logic in a questionnaire scene by adding a user-defined menu in an SPSS user interface and associating a data processing dialog box with the user-defined menu, thereby reducing the repeated manual operation of data analysts on repeated processes, further improving the efficiency and simultaneously reducing the possibility of mistake making of manual operation.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic diagram of an implementation environment of a menu generation method based on an SPSS application according to the present invention;
FIG. 2 is a flowchart of a menu generation method based on SPSS application according to the present invention;
FIG. 3 is a flow diagram of an implementation environment provided by the present invention for obtaining custom menus built in an SPSS application;
FIG. 4 is a schematic diagram of the SPSS application software installed with Python language extension package provided by the present invention;
FIG. 5 is a diagram of an implementation environment for opening a custom menu provided by the present invention;
FIG. 6 is a diagram of an implementation environment of a custom menu provided by the present invention;
FIG. 7 is a schematic diagram of the action logic of a data processing dialog box applied to a questionnaire survey scene and associated with a custom menu implementation environment layout, which is provided by the present invention, to generate the data processing dialog box;
FIG. 8 is a schematic diagram of a data processing dialog provided by the present invention;
FIG. 9 is a schematic diagram of a data processing dialog box with "age and academic calendar" as an example of the first check box provided by the present invention;
FIG. 10 is a flow diagram of the present invention providing the logic of the acts of associating a target variable with a target control and determining a target control association based on the target variable and the data processing sub-logic;
FIG. 11 is a schematic diagram of a batch processing dialog provided by the present invention;
FIG. 12 is a schematic flow chart of the batch processing based on the combination of SPSS and Python provided by the present invention;
FIG. 13 is a flowchart illustrating a process for implementing normalization of names of target variables based on the combination of SPSS and Python according to the present invention;
FIG. 14 is a schematic flow chart illustrating the process of implementing median processing based on the combination of SPSS and Python according to the present invention;
FIG. 15 is a schematic diagram of a custom menu setup provided by the present invention;
FIG. 16 is a schematic diagram of a custom menu add provided by the present invention;
FIG. 17 is a schematic view of a menu usage interface for "age calculation and processing" provided by the present invention;
fig. 18 is a block diagram of a menu generating apparatus based on SPSS application provided in the present invention;
fig. 19 is a hardware structural diagram of an apparatus for implementing the method provided by the embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the 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 obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention 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 is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. 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 server 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 order to make the objects, technical solutions and advantages disclosed in the embodiments of the present invention more clearly apparent, the embodiments of the present invention are described in further detail below with reference to the accompanying drawings and the embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of the invention and are not intended to limit the embodiments of the invention.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood 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 one or more of that feature. In the description of the present embodiment, "a plurality" means two or more unless otherwise specified. In order to facilitate understanding of the technical solutions and the technical effects thereof described in the embodiments of the present invention, the embodiments of the present invention first explain related terms:
SPSS (statistical Product and Service solutions): SPSS is a generic term for a series of software products and related services offered by IBM corporation for statistical analysis operations, data mining, predictive analysis, and decision support tasks, and is a "statistical product and service solution" software.
Python: an interpreted scripting language is also a cross-platform computer programming language. Is an object-oriented dynamic type language, originally designed for writing automated scripts, is increasingly being used for the development of independent, large projects with the continual updating of versions and the addition of new functionality to the language.
Questionnaire survey method: the survey method is that the surveyor uses the uniformly designed questionnaire to know the situation or inquire the opinion of the selected survey object.
Data cleaning: which refers to finding and correcting recognizable errors in data files, including checking data consistency, processing invalid and missing values, etc.
Excel: microsoft Office Excel is a piece of spreadsheet software written by Microsoft for computers using Windows and Apple Macintosh operating systems.
VBA: visual Basic for Applications is a standard macro language. The VBA language cannot run alone but is called by Microsoft Office software. The VBA is an object-oriented interpreted language, and is generally used to implement functions not provided in Excel, write custom functions, implement automation functions, and the like.
R language: is a language and operating environment for statistical analysis, mapping. The R language is a free, source code open software that is an excellent tool for statistical calculations and statistical charting.
Although some data processors in the prior art may manually compile some programs by using Excel VBA, and simplify some data statistical analysis processes, most data processors may still choose to use SPSS software to process questionnaire data because Excel does not bind to questionnaire survey scenes. The processing flow and the rule of questionnaire survey data are basically similar at present, and all basically comprise basic links such as data definition, data cleaning, new variable definition, individual case weighting and cross table generation.
First, the embodiment of the present invention discloses an implementation environment of a menu generation method based on an SPSS application program in a possible embodiment.
Referring to fig. 1, the implementation environment includes at least one terminal 10 and a data processing server 30. The data processing server 30 may be implemented as a stand-alone server or as a server cluster of multiple servers. The data processing server 30 may acquire questionnaire survey data uploaded by each terminal 10 in communication therewith, perform data processing such as data cleansing and data statistics on the questionnaire survey data, display the processing result, and also feed back the processing result to the terminal 10.
The terminal 10 and the data processing server 30 may each be provided with SPSS software, and the SPSS software may perform data definition, data cleaning, new variable definition, individual case weighting, and/or cross table generation by implementing the SPSS application-based menu generation method according to the embodiment of the present invention.
In a preferred embodiment, the terminal 10 communicates with the data processing server 30 via a reliable TCP transport protocol or a user datagram protocol UDP.
Referring to fig. 2, a flow chart of a menu generation method based on SPSS application, which may be run in the implementation environment of fig. 1, may include:
s101, acquiring an implementation environment for constructing a custom menu in the SPSS application program.
The embodiment of the invention improves the processing speed of questionnaire survey data in a questionnaire survey scene by defining a self-defined menu which can be suitable for the questionnaire survey scene for an SPSS application program, wherein the self-defined menu comprises but is not limited to a data cleaning menu, a data definition menu, a menu for weighting individual cases, and a cross table generation menu, variable definition can be carried out in each menu according to the actual requirement of menu construction, and data processing logics corresponding to each menu are generated, and the design of the self-defined menu is favorable for reducing the intervention degree of manual operation of data processing personnel and relieving the pressure of the data processing personnel.
In order to complete the generation of the custom menu in the SPSS application, in the embodiment of the present invention, first, an implementation environment for building the custom menu needs to be built, and in a feasible embodiment, the obtaining of the implementation environment for building the custom menu in the SPSS application is, as shown in fig. 3, included:
s1011, installing SPSS application software with a Python language extension package.
The embodiment of the invention can be implemented in the SPSS application software with the Python expansion package installed, so that the SPSS application software with the Python language expansion package is installed firstly in the step. In particular, SPSS 19 and later versions support the installation of Python extension packages. As shown in FIG. 4, when installing IBM SPSS Statistics 25, the "Yes" selection may be directly chosen to install essences for Python.
And S1013, running the SPSS application software with the Python language extension package, and entering an implementation environment of a user-defined menu in the SPSS application software.
In particular, the implementation environment of the custom menu may be entered by executing a custom dialog function. As shown in FIG. 5, under the SPSS extended menu, selecting "Utility-custom dialog builder" opens the environment for implementing the custom menu.
As shown in fig. 6, a schematic diagram of an implementation environment of the custom menu is shown. The implementation environment schematic diagram comprises a tool area, an editing area, an attribute area and a grammar area, wherein the editing area is used for editing a dialog box displayed after a custom menu is triggered, the tool area is used for providing various dialog box support controls for editing the dialog box, the controls comprise basic controls such as a source list, a check box, a combination box and a text box, attributes and action logics can be added to the controls by dragging the controls into the editing area, the attributes of the controls are added through the attribute area, the action logics are added through the grammar area, and the grammar area can use SPSS grammar to design action logics pointed by the controls in combination with Python grammar.
And S103, arranging a data processing dialog box which is associated with the custom menu and is applied to a questionnaire survey scene in the custom menu implementation environment, and generating action logic of the data processing dialog box.
Specifically, the action logic may be implemented based on the interaction of SPSS with Python, or based on the interaction of SPSS with R language.
Specifically, each custom menu is customized, which may trigger its associated one data processing dialog box that may perform data definition, data cleansing, new variable definition, weighting of individual cases, or generate cross-table functions.
Specifically, the step of laying out a data processing dialog box associated with the custom menu and applied to a questionnaire survey scene in the custom menu implementation environment, and generating an action logic of the data processing dialog box, as shown in fig. 7, includes:
and S1031, acquiring data processing logic of the data processing dialog box, wherein the data processing logic is applied to questionnaire survey scenes.
Taking the data processing dialog box for data cleaning as an example, the corresponding data processing logic includes the following selectable sub-logics, each of which is as follows:
(1) data cleansing based on age and academic relevance in questionnaires
Age and academic are a pair of attributes with certain relevance, and therefore can be used as an index for data cleansing, such as age of 14 years, while the academic filled in is an university student. If this is rare, the question sheet of the responder can be cleaned, assuming that the responder did not respond seriously when the responder filled out the question sheet.
(2) Data cleansing based on age and professional associations in questionnaires
Age and academic calendar are also a pair of attributes with certain relevance, and therefore can be used as another index for data cleansing, for example, the age filled out by the responder is 14 years, and the occupation filled out by the responder is retirement. If this is rare, the question sheet of the responder can be cleaned, assuming that the responder did not respond seriously when the responder filled out the question sheet.
(3) Data cleansing based on academic and professional associations in questionnaires
The academic calendar and the profession are also a pair of attributes with certain relevance, and therefore can be used as another index for data cleaning, for example, the academic calendar filled by the responder is a Chinese scholar, and the profession filled by the responder is a doctor teacher. If this is rare, the question sheet of the responder can be cleaned, assuming that the responder did not respond seriously when the responder filled out the question sheet.
(4) Data cleaning based on answer duration in questionnaire
If the answer time is too short, it may indicate that the answer-filling person does not answer seriously, for example, if a questionnaire needs to answer for more than 30 seconds normally, and the answer-filling person answers for only 10 seconds, the answer-filling person is considered not to answer seriously, and the questionnaire of the answer-filling person can be cleaned.
(5) Data cleansing based on relevant attribute pairs in questionnaires
The relevant attribute pair is related to the specific content of the questionnaire and has a pair of attributes of relevant relationship, for example, the cognition experience and the use experience are a pair of relevant attribute pairs with relevant relationship, if a responder fills in a relevant item of a certain product which is used by the responder but does not select the relevant item of 'listening to the product', the responder is considered not to answer seriously when answering, and the questionnaire of the responder can be cleaned.
S1033, determining a target control according to the data processing logic, and determining a data processing sub-logic corresponding to the target control in the data processing logic.
And S1035, associating target variables for the target control, and determining action logic associated with the target control according to the target variables and the data processing sub-logic.
As shown in fig. 8, the user can select (1) - (4) data processing sub-logics from the data processing logics and get their corresponding data processing dialogs. In order to get the data processing dialog, first a target control needs to be determined, wherein the data processing sub-logics (1) - (3) can each be triggered using a check box control, and the data processing sub-logic (4) can be triggered using a text box control. Therefore, the check box control and the text box control in the tool area can be dragged into the editing area, the editing area can comprise three check box controls and one text box control, the three check box controls are respectively associated with one target variable, and therefore, the three variables can be seen in the attribute area in the figure. In order to further optimize the layout of the data processing dialog box, a static text control can be dragged into the editing area, and the data processing dialog box is named in a mode of writing static text.
In fig. 9, the first check box is "age and academic calendar" as an example, and corresponds to the data processing sub-logic (1), and when the check box is checked, the data processing sub-logic (1) can be executed when the data processing dialog box executes the data cleansing function.
Specifically, the associating a target variable with a target control and determining an action logic associated with the target control according to the target variable and the data processing sub-logic, as shown in fig. 10, include:
and S10351, determining the name of the target variable corresponding to the target control and the mapping relation between the state of the target control and the value of the target variable.
Taking attribute editing of a first check box control 'age and academic calendar' as an example, editing the name of a target variable in the check box control in the attribute area, determining the name as 'age _ edu', determining the relation between the value of the target variable and the state of the target control, and when the target control is in an unselected state, representing that the corresponding data processing sub-logic is not started, wherein the value of the target variable age _ edu is 0; when the target control is in the selected state, the corresponding data processing sub-logic of the target control is started, and the value of the target variable age _ edu is 1. The check box control is not started in a default state, and the target variable age _ edu is 0 in a default value.
And S10353, determining action logic corresponding to the target control based on the target variable and the data processing sub-logic corresponding to the target control, transmitting the target variable to the data processing sub-logic realized based on Python language in the action logic based on SPSS language, and executing the data processing action realized based on SPSS language according to the execution result of the data processing sub-logic.
Specifically, the action logic records and edits in a grammar area, Python and SPSS statements can be written in the grammar area, and the target control content is controlled or responded to together, so that the processing of questionnaire survey data is completed.
The embodiment of the invention analyzes both Python and SPSS languages, and the following conclusion is obtained:
the disadvantages of SPSS are that batch processing is inconvenient, there are disadvantages to character processing, it requires a combination of multiple menus to complete some basic data processing/analysis processes, and it is impossible to use intermediate variables to transfer process values. The SPSS has an advantage in that it can better support multiple response sets in questionnaire survey data corresponding to a questionnaire frequently-used question type "multiple choice questions".
The Python has the advantages of batch processing and character processing, and can temporarily store intermediate variables. The Python has the disadvantage that a code writing mode for questionnaires and character types such as a multiple response set is not provided easily.
In the embodiment of the invention, the SPSS language is used in the action logic to capture the value of the target variable and execute the data processing action, and the data processing sub-logic is realized based on Python, so that the advantages of the SPSS grammar and the advantages of the Python are combined with each other, and the disadvantages of the SPSS grammar and the disadvantages of the Python grammar are avoided.
In a possible embodiment, the determining, based on the target variable and the data processing sub-logic corresponding to the target control, an action logic corresponding to the target control includes: and the SPSS statement transmits the target variable to a bearer variable of the target variable set in the Python statement, and the mapping relation between the target variable in the target control and the state of the target control is established by circularly assigning the bearer variable of the target variable in the Python language.
For example, the questionnaire survey data includes values of 1, 2, 3, 4, 5, 6, and … … for a topic, and the values correspond to the year 2010, 2009, 2008, 2007, 2006, 2005, … …, and the like for the year of birth. Data processing in the SPSS language requires labeling of values, that is, 1 corresponds to 2010, 2 corresponds to 2009, and 3 corresponds to 2008, and conversion to the SPSS operation requires an analyst to manually input the corresponding relationships one by one, or manually write all the corresponding relationships in the SPSS grammar editing. As shown in fig. 11, if there is a total of 53 values and the corresponding relationship between the label, it is necessary to manually input 53 times.
In the feasible embodiment, the mapping relationship between the target variable in the target control and the state of the target control is established in batch in the SPSS by using the cyclic batch processing advantage of the Python language and based on the interaction between Python and the SPSS. Specifically, in order to establish the corresponding relationship between 53 values and the tags shown in the figure, as shown in fig. 12, an incremental numerical value in a specified range may be generated by a loop statement of Python language, then a corresponding year may be generated by a loop decrement of Python language, then a character string may be generated by a Python loop, the character string corresponds to a state of the target control, and finally a mapping relationship between the target variable and the state of the target control in the target control may be established by Python in combination with the SPSS syntax to construct the SPSS statement.
In a possible embodiment, the determining, based on the target variable and the data processing sub-logic corresponding to the target control, an action logic corresponding to the target control includes: and the SPSS statement transmits the target variable to a bearer variable of the target variable set in the Python statement, data batch processing is carried out in Python language based on the bearer variable of the target variable, and a data processing result is output by combining with the SPSS language.
Assuming that the interviewee age needs to be calculated, the analyst needs to do rule thinking and translate into SPSS operations. The first step is converted into … … years old from 2019 to 2010 and 10 years old from 2019 to 2009; the second step corresponds to the values 1, 2, 3, 4, 5, 6 of the target variable corresponding to ages 9, 10, 11, 12, 13, 14 … …, respectively; thirdly, extracting rules and converting the rules into a calculation formula: 10 for 1+9, 11 for 2+9, and 12 for 3+9 12 … …. According to the embodiment of the invention, the ages of the interviewees can be automatically output by executing batch processing according to the calculation formula without manual participation.
In a possible embodiment, the determining, based on the target variable and the data processing sub-logic corresponding to the target control, an action logic corresponding to the target control includes: extracting variable keywords in a questionnaire survey scene, extracting variable names corresponding to the variable keywords by using a Python language, and carrying out normalization processing on the names of target variables corresponding to the variable names based on an SPSS language.
In the questionnaire research scenario, most questionnaires need to be added with questions to inquire basic population attribute information of users such as birth year, gender, occupation and the like. When analyzing data, it is often necessary to label these topics with a specific variable name, such as the year of birth, using the variable name "birthyear". However, this flag will cause the analyst to manually search and modify the question because of the different number and sequence of questions each time different questionnaire items are processed. As shown in fig. 13, the Python can be used in the embodiment of the present invention to automatically identify whether there is a word eye such as "year of birth" in the tag of the variable, and further automatically modify the variable name to "birthday".
In a possible embodiment, the determining, based on the target variable and the data processing sub-logic corresponding to the target control, an action logic corresponding to the target control includes: and storing an intermediate variable by using a Python language, performing data processing according to the intermediate variable, and outputting a data result through an SPSS language.
During questionnaire data analysis, it is often necessary to use some intermediate value to aid in the calculation. For example, the male and female ratios in the questionnaire need to be counted and compared with the netizen large disc (from external data), so as to determine whether the sampling condition has a deviation and whether the sample deviation needs to be processed by weight matching.
Under the self-owned mechanism of the SPSS, the statistical result of the male and female proportion is only in an output window and cannot participate in subsequent calculation; on the other hand, external data such as a netizen disk cannot be stored in questionnaire survey data analyzed by the SPSS. As shown in fig. 14, the embodiment of the present invention may use Python to store these intermediate values and participate in the related calculation, and then transmit the calculation result to the SPSS.
The embodiment of the present invention may also optimize the logic structure of data processing from other aspects based on a combination manner of the SPSS language and the Python language, which is not necessarily exemplified in the embodiment of the present invention. For example, when the questionnaire survey data contains repeated data, the SPSS only supports recognizing and marking the repeated data, and then filters and deletes the repeated data according to the marking, which requires two menu operations to delete the repeated data; the method of combining the SPSS language and the Python language in the embodiment of the invention can complete two steps in one user-defined menu in one step. For another example, the above marking of the birth year of the user, the calculation of the age, and the comparison with the netizen disk may all use the control menus of Python and SPSS to make one menu.
Referring to fig. 9, when data processing is performed based on age and academic calendar according to the embodiment of the present invention, the check of the first check box "age and academic calendar" is passed as%% age _ edu%%. If the value is 1, the check box is checked, and the corresponding age and academic contradiction condition check is carried out. And the value can be assigned to a Python variable by combining the flexibility of the Python language, and a condition judgment statement is used for setting a relevant processing program, so that action logic is obtained. The following statements:
Figure BDA0002279498460000131
the sentence indicates that when the first check box "age and academic calendar" is checked, the judgment and cleaning of the contradiction between age and academic calendar are performed on the data opened in the SPSS. The concrete explanation is as follows: 1) first defining a variable named PAB1 to be 99; 2) judging whether the age _ edu is checked (1 represents checked, and 0 represents not checked); 3) if the age and the academic calendar are checked, if the age is less than 14 years old but the academic calendar is high and above (age <14& edu > -2), the value of the PAB1 is modified to be 2; 4) the SPSS statement is used to screen PAB1 for 99 values, while data with values not equal to 99 are purged.
And S105, associating the custom menu with the data processing dialog box, and adding the custom menu to a user interface.
Specifically, as shown in fig. 15, an association attribute may be set for the custom menu, the custom menu may be associated with the data processing dialog in the setting dialog, and the set custom menu may be added to the toolbar, that is, the newly created custom menu may be normally used in the SPSS.
The embodiment of the invention is exemplified by data cleaning, and a plurality of other data processing links, such as data definition (setting variable labels, value labels and the like), data cleaning, new variable definition, weighting to individual case, generation of cross tables and the like, are also arranged in a questionnaire scene.
The menu generation method based on the SPSS application program disclosed by the embodiment of the invention can add a self-defined function menu in SPSS software, as shown in fig. 16, the part enclosed by the frame is the self-defined menu added in the SPSS, and when the menu generation method is used, only the menu function is clicked according to the function setting, and relevant information is filled. Fig. 17 is a menu usage interface of "age calculation and processing", in which "2019" is input information for calculating the age of the responder according to the birth year information of the responder filled in the questionnaire survey data, and three check menus under the setting of the age segment can be used for customizing the setting scheme of the age segment, for example, "segmenting by age" means that the user is segmented by age into "60 after, 70 after, 80 after, 90 after, 00 after" and corresponding variables are generated in the SPSS to store the information.
According to the menu generation method based on the SPSS application program disclosed by the embodiment of the invention, the encapsulation of data processing logic in a questionnaire scene is realized by adding the user-defined menu in the SPSS user interface and associating the user-defined menu with the data processing dialog box, so that repeated manual operation of repeated processes by data analysts is reduced, the efficiency is further improved, and meanwhile, the possibility of mistake making of manual operation is also reduced. In the practical application process, it is found that in the case of questionnaire data processing, manual operation takes 1-2 days for data processing/analysis, and only tens of minutes under the scheme. And part of data processing personnel hope to end the learning of the SPSS, and the simplified menu obtained by the scheme can reduce the cognitive load on the learning of the SPSS menu, and is convenient for simple operation (checking or filling simple information) to complete a complex data processing/analyzing process. Furthermore, in the embodiment of the present invention, a mode of combining the SPSS language and the Python language is used to implement the data processing logic, so that the efficiency of data processing can be improved.
The embodiment of the invention also discloses a menu generating device based on the SPSS application program, as shown in fig. 18, the device comprises:
an implementation environment obtaining module 201, configured to obtain an implementation environment for building a custom menu in an SPSS application;
the data processing dialog box building module 203 is used for laying out a data processing dialog box which is associated with the custom menu and is applied to a questionnaire survey scene in the custom menu implementation environment, and generating action logic of the data processing dialog box;
and the association visualization module 205 is configured to associate the custom menu with the data processing dialog box, and add the custom menu to a user interface.
Specifically, the embodiments of the menu generating apparatus and method based on SPSS application programs described in the embodiments of the present invention are all based on the same inventive concept. For details, please refer to the method embodiment, which is not described herein.
The embodiment of the invention also provides a computer storage medium, and the computer storage medium can store a plurality of instructions. The instructions may be adapted to be loaded by a processor and execute a menu generating method based on an SPSS application according to an embodiment of the present invention, the method at least including the following steps:
a menu generating method based on SPSS application program,
implementing a data processing dialog box which is associated with the environment layout custom menu and is applied to a questionnaire survey scene in the custom menu, and generating action logic of the data processing dialog box;
and associating the user-defined menu with the data processing dialog box, and adding the user-defined menu to a user interface.
In a preferred embodiment, the obtaining an implementation environment for building a custom menu in the SPSS application includes:
installing SPSS application software with a Python language extension package;
and running the SPSS application software with the Python language extension package, and entering a self-defined menu implementation environment in the SPSS application software.
In a preferred embodiment, the step of laying out a data processing dialog box associated with a custom menu in the custom menu implementation environment and applied to a questionnaire survey scene, and generating the action logic of the data processing dialog box includes:
acquiring data processing logic of the data processing dialog box applied to a questionnaire survey scene;
determining a target control according to the data processing logic and a data processing sub-logic corresponding to the target control in the data processing logic;
and associating a target variable for the target control, and determining action logic associated with the target control according to the target variable and the data processing sub-logic.
In a preferred embodiment, the action logic is implemented based on interaction of SPSS with Python, or based on interaction of SPSS with R language.
In a preferred embodiment, the associating a target variable with a target control and determining an action logic associated with the target control according to the target variable and the data processing sub-logic includes:
determining the name of a target variable corresponding to the target control and the mapping relation between the state of the target control and the value of the target variable;
and determining action logic corresponding to the target control based on the target variable and the data processing sub-logic corresponding to the target control, transmitting the target variable to the data processing sub-logic realized based on Python language in the action logic based on SPSS language, and executing the data processing action realized based on SPSS language according to the execution result of the data processing sub-logic.
In a preferred embodiment, the determining, based on the target variable and the data processing sub-logic corresponding to the target control, an action logic corresponding to the target control includes:
the SPSS statement transmits the target variable to a bearer variable of the target variable set in the Python statement, and the mapping relation between the target variable in the target control and the state of the target control is established through cyclic assignment of the bearer variable of the target variable in the Python language;
and/or the presence of a gas in the gas,
and the SPSS statement transmits the target variable to a bearer variable of the target variable set in the Python statement, data batch processing is carried out in Python language based on the bearer variable of the target variable, and a data processing result is output by combining with the SPSS language.
In a preferred embodiment, the determining, based on the target variable and the data processing sub-logic corresponding to the target control, an action logic corresponding to the target control includes:
extracting variable keywords in a questionnaire survey scene, extracting variable names corresponding to the variable keywords by using a Python language, and carrying out standardized processing on the names of target variables corresponding to the variable names based on an SPSS language;
and/or the presence of a gas in the gas,
and storing an intermediate variable by using a Python language, performing data processing according to the intermediate variable, and outputting a data result through an SPSS language.
Further, fig. 19 shows a hardware structure diagram of an apparatus for implementing the method provided by the embodiment of the present invention, and the apparatus may participate in forming or containing the device or system provided by the embodiment of the present invention. As shown in fig. 19, the device 10 may include one or more (shown as 102a, 102b, … …, 102 n) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 19 is merely illustrative and is not intended to limit the structure of the electronic device. For example, device 10 may also include more or fewer components than shown in FIG. 19, or have a different configuration than shown in FIG. 19.
It should be noted that the one or more processors 102 and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, the data processing circuitry may be a single, stand-alone processing module, or incorporated in whole or in part into any of the other elements in the device 10 (or mobile device). As referred to in the embodiments of the application, the data processing circuit acts as a processor control (e.g. selection of a variable resistance termination path connected to the interface).
The memory 104 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the method described in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, so as to implement the above-mentioned menu generating method based on the SPSS application. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory located remotely from processor 102, which may be connected to device 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of such networks may include wireless networks provided by the communication provider of the device 10. In one example, the transmission device 106 includes a network adapter (NIC) that can be connected to other network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the device 10 (or mobile device).
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device and server embodiments, since they are substantially similar to the method embodiments, the description is simple, and the relevant points can be referred to the partial description of the method embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A menu generation method based on SPSS application program is characterized by comprising the following steps:
acquiring an implementation environment for constructing a custom menu in an SPSS application program;
implementing a data processing dialog box which is associated with the environment layout custom menu and is applied to a questionnaire survey scene in the custom menu, and generating action logic of the data processing dialog box;
and associating the user-defined menu with the data processing dialog box, and adding the user-defined menu to a user interface.
2. The method of claim 1, wherein obtaining an implementation environment for building a custom menu in the SPSS application comprises:
installing SPSS application software with a Python language extension package;
and running the SPSS application software with the Python language extension package, and entering a self-defined menu implementation environment in the SPSS application software.
3. The method of claim 1, wherein the step of laying out a data processing dialog box associated with the custom menu and applied to a questionnaire survey scene in the custom menu implementation environment, and generating the action logic of the data processing dialog box comprises:
acquiring data processing logic of the data processing dialog box applied to a questionnaire survey scene;
determining a target control according to the data processing logic and a data processing sub-logic corresponding to the target control in the data processing logic;
and associating a target variable for the target control, and determining action logic associated with the target control according to the target variable and the data processing sub-logic.
4. The method of claim 3, wherein:
the action logic is realized based on the interaction of SPSS and Python or the interaction of SPSS and R language.
5. The method of claim 3 or 4, wherein associating a target variable with a target control and determining action logic associated with the target control based on the target variable and the data processing sub-logic comprises:
determining the name of a target variable corresponding to the target control and the mapping relation between the state of the target control and the value of the target variable;
and determining action logic corresponding to the target control based on the target variable and the data processing sub-logic corresponding to the target control, transmitting the target variable to the data processing sub-logic realized based on Python language in the action logic based on SPSS language, and executing the data processing action realized based on SPSS language according to the execution result of the data processing sub-logic.
6. The method of claim 5, wherein the determining action logic corresponding to the target control based on the target variable and the data processing sub-logic corresponding to the target control comprises:
the SPSS statement transmits the target variable to a bearer variable of the target variable set in the Python statement, and the mapping relation between the target variable in the target control and the state of the target control is established through cyclic assignment of the bearer variable of the target variable in the Python language;
and/or the presence of a gas in the gas,
and the SPSS statement transmits the target variable to a bearer variable of the target variable set in the Python statement, data batch processing is carried out in Python language based on the bearer variable of the target variable, and a data processing result is output by combining with the SPSS language.
7. The method of claim 5, wherein the determining action logic corresponding to the target control based on the target variable and the data processing sub-logic corresponding to the target control comprises:
extracting variable keywords in a questionnaire survey scene, extracting variable names corresponding to the variable keywords by using a Python language, and carrying out standardized processing on the names of target variables corresponding to the variable names based on an SPSS language;
and/or the presence of a gas in the gas,
and storing an intermediate variable by using a Python language, performing data processing according to the intermediate variable, and outputting a data result through an SPSS language.
8. An apparatus for generating a menu based on an SPSS application, the apparatus comprising:
the implementation environment acquisition module is used for acquiring an implementation environment for constructing a custom menu in the SPSS application program;
the data processing dialog box construction module is used for implementing a data processing dialog box which is associated with the environment layout custom menu and is applied to a questionnaire survey scene in the custom menu and generating action logic of the data processing dialog box;
and the association visualization module is used for associating the user-defined menu with the data processing dialog box and adding the user-defined menu to a user interface.
9. A computer storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement a SPSS application based menu generation method as claimed in any one of claims 1 to 7.
10. An SPSS application based menu generating device, the device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, the at least one instruction, the at least one program, set of codes, or set of instructions being loaded by the processor and performing a SPSS application based menu generating method as claimed in any one of claims 1 to 7.
CN201911135557.5A 2019-11-19 2019-11-19 Menu generation method, device, equipment and medium based on SPSS application program Pending CN111061477A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911135557.5A CN111061477A (en) 2019-11-19 2019-11-19 Menu generation method, device, equipment and medium based on SPSS application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911135557.5A CN111061477A (en) 2019-11-19 2019-11-19 Menu generation method, device, equipment and medium based on SPSS application program

Publications (1)

Publication Number Publication Date
CN111061477A true CN111061477A (en) 2020-04-24

Family

ID=70298021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911135557.5A Pending CN111061477A (en) 2019-11-19 2019-11-19 Menu generation method, device, equipment and medium based on SPSS application program

Country Status (1)

Country Link
CN (1) CN111061477A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113781123A (en) * 2021-09-15 2021-12-10 北京有竹居网络技术有限公司 Questionnaire data processing method and device, computer equipment and storage medium
CN114428605A (en) * 2022-04-06 2022-05-03 北京精雕科技集团有限公司 Automatic system information interaction method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080059443A1 (en) * 2006-09-01 2008-03-06 France Telecom Method and system for the extraction of a data table from a data base, corresponding computer program product
CN102946319A (en) * 2012-09-29 2013-02-27 焦点科技股份有限公司 System and method for analyzing network user behavior information
CN105677371A (en) * 2016-03-18 2016-06-15 山东华软金盾软件股份有限公司 Method and system for quickly generating software interface
US20170371404A1 (en) * 2012-11-21 2017-12-28 Open Text Corporation Method and system for dynamic selection of application dialog layout design
CN110462583A (en) * 2017-03-20 2019-11-15 谷歌有限责任公司 Automatic interface design

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080059443A1 (en) * 2006-09-01 2008-03-06 France Telecom Method and system for the extraction of a data table from a data base, corresponding computer program product
CN102946319A (en) * 2012-09-29 2013-02-27 焦点科技股份有限公司 System and method for analyzing network user behavior information
US20170371404A1 (en) * 2012-11-21 2017-12-28 Open Text Corporation Method and system for dynamic selection of application dialog layout design
CN105677371A (en) * 2016-03-18 2016-06-15 山东华软金盾软件股份有限公司 Method and system for quickly generating software interface
CN110462583A (en) * 2017-03-20 2019-11-15 谷歌有限责任公司 Automatic interface design

Non-Patent Citations (8)

* Cited by examiner, † Cited by third party
Title
佚名: "IBM SPSS Statistics 与用户自定义 Python模块的集成及分析", 《HTTP://WWW.VOIDCN.COM/ARTICLE/P-HBSGANNF-BDU.HTML》 *
冯宇: "《市场调查与预测分析[M]》", 30 September 2018, 北京理工大学出版社 *
刘如等: "《大数据时代科技情报可视化应用研究[M]》", 31 December 2015, 兵器工业出版社 *
刘小红: "《服装营销数据分析[M]》", 30 September 2005, 中国纺织出版社 *
吴增基等: "《现代社会调查方法[M]》", 31 May 2018, 上海人民出版社 *
李卫英: "《学前教育统计基础与SPSS应用[M]》", 31 May 2019, 陕西师范大学出版社 *
李树茁等: "《农民工的社会网络与生育》", 1 October 2008 *
陶靖轩: "《应用经济统计学[M]》", 30 April 2010, 中国计量出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113781123A (en) * 2021-09-15 2021-12-10 北京有竹居网络技术有限公司 Questionnaire data processing method and device, computer equipment and storage medium
CN114428605A (en) * 2022-04-06 2022-05-03 北京精雕科技集团有限公司 Automatic system information interaction method and device

Similar Documents

Publication Publication Date Title
CN109923568B (en) Mobile data insight platform for data analysis
CN109923535B (en) Insight object as portable user application object
CN109740122B (en) Method and device for converting thinking guide graph use case file
US20190065624A1 (en) Method and device for obtaining answer, and computer device
US20150142858A1 (en) Identifying and formatting data for data migration
US11288064B1 (en) Robotic process automation for interactive documentation
US20190057335A1 (en) Targeted data element detection for crowd sourced projects with machine learning
US10990359B2 (en) Use and advancements of assistive technology in automation for the visually-impaired workforce
US9703767B2 (en) Spreadsheet cell dependency management
CN109472007B (en) Automatic question creating method and device for medical questionnaire, electronic equipment and storage medium
CN111061477A (en) Menu generation method, device, equipment and medium based on SPSS application program
US20200356469A1 (en) Test automation systems and methods using logical identifiers
De Souza et al. Estimating the effort of mobile application development
US20120150751A1 (en) Dialog Page Interaction Model
US20220171918A1 (en) User interface for managing extended schemas
CN112199261A (en) Application program performance analysis method and device and electronic equipment
US20200342471A1 (en) Computer system and method for electronic survey programming
CN117314139A (en) Modeling method and device for business process, terminal equipment and storage medium
US10606728B2 (en) Framework for detecting source code anomalies
CN115237425A (en) Code viewing method and device, computer equipment and storage medium
CN109636619A (en) Quantify returning for platform and surveys method, apparatus, electronic equipment and readable medium
CN114968725A (en) Task dependency relationship correction method and device, computer equipment and storage medium
de Souza et al. Meffortmob: A effort size measurement for mobile application development
CN114008600A (en) Chat robot diagnostic visualization
Kannan et al. Backup Automation Using Power Automate for Malaysian Vaccination Centres

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40022182

Country of ref document: HK

RJ01 Rejection of invention patent application after publication

Application publication date: 20200424

RJ01 Rejection of invention patent application after publication