CN113468455A - User selection behavior acquisition method and device, client and server equipment - Google Patents

User selection behavior acquisition method and device, client and server equipment Download PDF

Info

Publication number
CN113468455A
CN113468455A CN202110726256.0A CN202110726256A CN113468455A CN 113468455 A CN113468455 A CN 113468455A CN 202110726256 A CN202110726256 A CN 202110726256A CN 113468455 A CN113468455 A CN 113468455A
Authority
CN
China
Prior art keywords
questionnaire
data
request data
user
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110726256.0A
Other languages
Chinese (zh)
Other versions
CN113468455B (en
Inventor
杨泽伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110726256.0A priority Critical patent/CN113468455B/en
Publication of CN113468455A publication Critical patent/CN113468455A/en
Application granted granted Critical
Publication of CN113468455B publication Critical patent/CN113468455B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9536Search customisation based on social or collaborative filtering
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a user selection behavior acquisition method, a user selection behavior acquisition device, a client and server equipment, relates to the technical field of computers, and solves the technical problem of poor user experience caused by the conflict between JavaScript and HTML structures. The method comprises the following steps: traversing each array in the questionnaire data for generating the questionnaire, splicing each array in the questionnaire data according to a preset CSS rule mode, and generating a CSS rule text; sending the CSS rule text to the client through the first data interface, so that the client executes the background image background-image attribute set in the CSS rule text under the condition that an input label in the CSS rule text is switched to a checked state, and submits second request data to the server through the second data interface; and analyzing based on the second request data to obtain the current title and the user selection behavior corresponding to the current title.

Description

User selection behavior acquisition method and device, client and server equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for obtaining a user selection behavior, a client, and a server device.
Background
With the advent of the big data age, recording user selection behavior is becoming a common way to collect user data. Currently, the user is usually provided with one or more pages of choice questions for single or multiple choice through an online questionnaire website, and finally, the collected choice result set is submitted to a server for program analysis of user data.
The inventor researches and discovers that a JavaScript code is implanted in the questionnaire website, a script tag introduced by the JavaScript code conflicts with an HTML structure of a rendered page, and further user experience is reduced, for example, the situation that a user sees a local page blank in a moment or a small part of time in the questionnaire page loading process possibly occurs, and the whole first screen loading experience is influenced.
Disclosure of Invention
The application aims to provide a method, a device, a client and server equipment for acquiring a user selection behavior, wherein the acquisition of the user selection behavior is realized by replacing JavaScript codes with a Cascading Style Sheet (CCS), so that the problems can be solved, and the user experience is improved.
In a first aspect, an embodiment of the present application provides a method for obtaining a user-selected behavior, where a page is obtained by executing a software application and rendering the page on a browser of a client, where a questionnaire for obtaining the user-selected behavior is presented on the page, and the method is applied to a server, and the method includes:
traversing each array in questionnaire data used for generating the questionnaire, splicing each array in the questionnaire data according to a preset CSS rule mode to generate a CSS rule text, wherein the questionnaire data comprises at least one array, and each array corresponds to one question and a plurality of options corresponding to the question;
according to first request data sent by the client, the CSS rule text is sent to the client through a first data interface, so that the client submits second request data to the server through a second data interface according to the CSS rule text, wherein the first data interface and the second data interface respectively comprise the state of the questionnaire, the current question ID and the current answer ID corresponding to the current question;
and analyzing based on the second request data to obtain the current title and the user selection behavior corresponding to the current title.
In one possible implementation, the second request data carries a browser cookie, and the method further includes:
and verifying the browser cookie according to a preset browser cookie to determine the user identity.
In one possible implementation, the method further comprises:
and if the historical progress information of the questionnaire data corresponding to the user is verified according to the browser cookie, sending the historical progress information to the client.
In a possible implementation, the step of analyzing based on the second request data to obtain a current topic and a user selection behavior corresponding to the current topic further includes:
parsing out one or more of the current topics based on the second request data, including: the system comprises a topic sequence number, an option type and a user selection behavior, wherein the user selection behavior comprises an answer option selected by a user for a current topic;
and determining the user selection behavior corresponding to the current title from the second request data according to the option type.
In a possible implementation, the step of determining, from the second request data, a user selection behavior corresponding to the current topic according to the option type includes:
if the option type is single selection, determining the user selection behavior according to the last array member in the array members corresponding to the current question;
and if the option type is multi-selection, determining the user selection behavior according to odd-numbered array members in the array members corresponding to the current title.
In one possible implementation, the method further comprises:
when a browser page is initialized, receiving third request data sent by the client through a third data interface, and determining starting time according to the third request data;
receiving fourth request data sent by the client through a fourth data interface, and determining an end time according to the fourth request data, wherein the fourth data interface is triggered by a user submission control.
In one possible implementation, the method further comprises:
and if the receiving time of the request data exceeds the time range formed by the starting time and the ending time, the request data is invalid.
In a second aspect, a user-selected behavior obtaining method is provided, where a page is obtained by executing a software application and rendering the page on a browser of a client, and a questionnaire for obtaining a user-selected behavior is presented on the page, and the method is applied to the client, and includes:
receiving a CSS rule text through a first data interface by first request data sent to a server;
inserting the CSS rule text into a head tag of the page HTML structure, and traversing each array in the CSS rule text to obtain an HTML structure for the questionnaire and a CSS style sheet for the questionnaire;
responding to the operation of a selection control corresponding to the answer option of each question, switching an input label in the CSS rule text to a checked state, executing a background image background-image attribute set in the CSS rule text, and submitting second request data to the server through a second data interface so that the server analyzes the second request data to obtain a current question and a user selection behavior corresponding to the current question, wherein the data interface comprises the state of the questionnaire, the current question ID and the current answer ID corresponding to the current question.
In one possible implementation, the step of inserting the CSS rule text in the head tag of the page HTML structure includes:
and inserting the CSS rule text into a head tag of an HTML structure through a link tag.
In one possible implementation, the step of submitting the second request data to the server through the second data interface includes:
and submitting second request data carrying the browser cookie to the server through a second data interface so that the server equipment performs user identity authentication according to the browser cookie.
In one possible implementation, the method further comprises:
sending first request data carrying a browser cookie to the server through a first data interface so that the server verifies the historical progress information of questionnaire data corresponding to the user according to the browser cookie;
and displaying the position of the historical questionnaire according to the historical progress information.
In one possible implementation, the method further comprises:
when a browser page is initialized, sending third request data to the server through a third data interface, so that the server determines starting time according to the third request data;
and responding to the triggering operation aiming at the submitting control, and sending fourth request data to the server through a fourth interface so that the server obtains end time according to the fourth request data.
In one possible implementation, the method further comprises:
and if the sending time of the request data exceeds the time range formed by the starting time and the ending time, the request data is invalid.
In a third aspect, a user-selected behavior obtaining apparatus is provided, where a page is obtained by executing a software application and rendering the page on a browser of a client, where a questionnaire for obtaining a user-selected behavior is presented on the page, the apparatus is applied to a server, and the apparatus includes:
the generating module is used for traversing each array in questionnaire data used for generating the questionnaire, splicing each array in the questionnaire data according to a preset CSS rule mode, and generating a CSS rule text, wherein the questionnaire data comprises at least one array, and each array corresponds to one question and a plurality of options corresponding to the question;
the sending module is used for sending the CSS rule text to the client through a first data interface according to first request data sent by the client, so that the client submits second request data to the server through a second data interface according to the CSS rule text, wherein the first data interface and the second data interface respectively comprise the state of the questionnaire, the current question ID and the current answer ID corresponding to the current question;
and the analysis module is used for analyzing based on the second request data to obtain the current question and the user selection behavior corresponding to the current question.
In a fourth aspect, there is provided a user-selected behavior obtaining apparatus, which obtains a page by executing a software application and rendering the page on a browser of a client, where the page presents a questionnaire for obtaining a user-selected behavior, and the apparatus is applied to the client, and includes:
the receiving module is used for receiving the CSS rule text through a first data interface according to first request data sent to the server;
the inserting module is used for inserting the CSS rule text into the head tag of the page HTML structure, traversing each array in the CSS rule text, and obtaining the HTML structure aiming at the questionnaire and the CSS style sheet aiming at the questionnaire;
and the triggering module responds to the operation of a selection control corresponding to the answer option of each question, switches an input label in the CSS rule text to a checked state, executes the background image background-image attribute set in the CSS rule text, and submits second request data to the server through a second data interface so that the server analyzes the second request data to obtain the current question and the user selection behavior corresponding to the current question, wherein the data interface comprises the state of the questionnaire, the current question ID and the current answer ID corresponding to the current question.
In a fifth aspect, an embodiment of the present application further provides a server device, which includes a memory and a processor, where the memory stores a computer program that is executable on the processor, and the processor executes the computer program to implement the method in the first aspect.
In a sixth aspect, this embodiment of the present application further provides a client device, which includes a memory and a processor, where the memory stores a computer program executable on the processor, and the processor implements the method of the second aspect when executing the computer program.
In a seventh aspect, this embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to execute the method of the first aspect or the second aspect.
The embodiment of the application brings the following beneficial effects:
according to the method, the device, the client and the server for obtaining the user selection behavior, a series of technical problems of poor experience and performance bottleneck caused by the fact that a JavaScript code conflicts with a page HTML structure can be relieved through the scheme.
Because the traditional user selection behavior is generally obtained through a questionnaire flow in a page, a developer can act as a controller role in the whole questionnaire flow by implanting JavaScript code into the page, and can directly use a script to operate a Document Object Model (DOM). However, in the actual application process, the JavaScript code may generate a conflict with the HTML structure of the page, so that the user may have a poor experience. In the scheme, the JavaScript codes are replaced by Cascading Style Sheets (CSSs) to obtain the user selection behaviors, namely, the server side equipment generates a CSS rule text according to each question and answer in questionnaire data according to a preset CSS rule mode, and issues the CSS rule text through a data interface requested by a client side; when a user triggers a selection control, an input label in the CSS rule text is switched to a checked state, a background image background-image attribute is set in the CSS rule text, and a second data interface is triggered to send a current title and a selection behavior of the user to a server. JavaScript codes are replaced by CSS, no script is inserted, and invasion and conflict of page HTML structures can not be generated, so that bad experience of users can be improved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the detailed description of the present application or the technical solutions in the prior art, the drawings needed to be used in the detailed description of the present application or the prior art description will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a method for acquiring a user-selected behavior according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another method for acquiring a user-selected behavior according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an apparatus for acquiring a user-selected behavior according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of another user selection behavior acquisition device according to an embodiment of the present application;
fig. 5 shows a schematic structural diagram of a server device or a client device provided in an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present application. 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.
The terms "comprising" and "having," and any variations thereof, as referred to in the embodiments of the present application, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Currently, the recorded user selection behavior can be used in analysis scenarios such as user guidance and dynamic planning. The user selection behavior can reflect a plurality of interaction indexes, useful indexes such as effective use time, selection intention, interaction frequency and behavior conversion of the user on the current page can be evolved from the behaviors, and conversion application of the user data is facilitated in some application scenes.
Generally, one or more pages of selection questions are set through an online questionnaire website for single selection or multiple selection of a user, and finally, a collected selection result set is submitted to a server for program analysis of user data. In the conventional solution, JavaScript code is embedded into a page to control the whole questionnaire flow. After the questionnaire module is initialized, a state variable for storing the whole questionnaire data is created, a selection event (single-selection/multiple-selection) is bound for each selection button, the selection events are injected into logic for inserting the currently selected answer of the user into the state variable when the user triggers the selection button, and when the whole questionnaire process is finished, namely the user finishes all questions, the state variable recorded with all the selected answers of the user is automatically submitted to a server for program analysis of the user data.
Through the user selection behaviors, effective questionnaire data can be obtained, and other useful indexes can be collected in the questionnaire making process. And finally, the server analyzes the data to obtain a data report aiming at the user behavior.
The inventor researches and discovers that the above-mentioned manner of obtaining the user selection behavior has some defects from the viewpoint of design principle, performance optimization and user interaction, and specifically includes the following points:
1. the whole questionnaire flow can act as a controller by implanting JavaScript code into the page. As is known, the script tag is introduced by injecting JavaScript code, and when the HTML structure of the rendering page encounters the script tag, the GUI rendering process is suspended and switched to the JS execution thread to load the JavaScript code. At this time, because the GUI rendering process is suspended, the original Document Object Model (DOM) and CSS Object Model (CSSOM) cannot be rendered in the process. And when the JS execution thread is completely executed, switching back to the GUI rendering process to continue rendering the DOM and CSSOM. From the perspective of a user, a situation that a local page is seen to be blank at an instant or a small part of time in the loading process of the whole page may occur, and the overall first screen loading experience is affected.
2. The current questionnaire process is to store the answer of each step of questions through state variables, and most questionnaire websites cannot automatically submit data to a server every time a selection button is clicked. In the actual application process, when the page is closed or jammed due to some reasons, and the user reopens the page, all the answers to the questionnaire previously selected by the user are lost, and the experience is poor.
3. At present, JavaScript controls the whole questionnaire flow, the mode of directly using scripts to operate the DOM is convenient, but a lot of user experience or performance bottlenecks are ignored when the project is more complex. For example, when the user makes a questionnaire, some DOM changes may be triggered by a selection event, which in turn means switching and communication between the JS execution thread and the GUI thread, thereby affecting the overall performance of the website. This performance bottleneck is all the more evident if there are too many pages of the questionnaire.
Based on this, the embodiment of the application provides a method, a device, a client and server equipment for obtaining a user selection behavior, and through the scheme, a series of technical problems of poor experience and performance bottleneck caused by the fact that a JavaScript code conflicts with a page HTML structure can be relieved.
Embodiments of the present application are further described below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a method for acquiring a user selection behavior according to an embodiment of the present application.
The method is applied to a server, a page is obtained by executing a software application and rendering on a browser of a client, and a questionnaire for acquiring a user selection behavior is presented on the page, as shown in fig. 1, and the method comprises the following steps:
step S102, traversing each array in the questionnaire data for generating the questionnaire, splicing each array in the questionnaire data according to a preset CSS rule mode, and generating a CSS rule text, wherein the questionnaire data comprises at least one array, and each array corresponds to one topic and a plurality of options corresponding to the topic.
The questionnaire is a common mode for acquiring user selection behaviors, namely questionnaire survey, and the questionnaire can be generated on a page through questionnaire data in the application; the questionnaire data comprises at least one question and an answer corresponding to each question. As an alternative embodiment, the questionnaire data can be presented in a list form, the list includes a plurality of arrays, each array corresponds to a topic and its options, as follows:
[
{anwer:[{aid:“a1”,val“A1”},{aid:“a2”,val“A2”},{aid:“a3”,val“A3”}],qid:“a”},
{anwer:[{aid:“b1”,val“B1”},{aid:“b2”,val“B2”},{aid:“b3”,val“B3”}],qid:“b”},
{anwer:[{aid:“c1”,val“C1”},{aid:“c2”,val“C2”},{aid:“c3”,val“C3”}],qid:“c”},
{anwer:[{aid:“d1”,val“D1”},{aid:“d2”,val“D2”},{aid:“d3”,val“D3”}],qid:“d”},
{anwer:[{aid:“e1”,val“E1”},{aid:“e2”,val“E2”},{aid:“e3”,val“E3”}],qid:“e”}
]
it should be noted that qid represents the ID of the current question, and aid represents the ID of the current answer. Wherein the association relationship between qid and aid has been processed in advance at the server. It can be seen that the questionnaire data includes a, b, c, d, and e for five topics, each topic corresponds to an array, and the array includes all the options in the corresponding topic, that is, for the current topic a, it includes three answer options a1, a2, and a 3.
It can be understood that the questionnaire data is traversed, and each corresponding question array in the questionnaire data is sequentially spliced according to a preset CSS rule manner until each question array in the questionnaire data is traversed, so that a CSS rule text about the questionnaire data is generated for subsequent insertion in a client browser, JavaScript codes are replaced, and conflicts to HTML structures are alleviated.
And step S104, according to the first request data sent by the client, sending the CSS rule text to the client through a first data interface, so that the client sets background image background-image attributes in the CSS rule text under the condition that an input label in the CSS rule text is switched to a closed state, and submits second request data to the server through a second data interface, wherein the data interface comprises the state of a questionnaire, the current question ID and the current answer ID corresponding to the current question.
The first request data is a request signal sent by the client to obtain the CSS from the server, the first data interface is a channel for the server to send the CSS to the client, the CSS rule text comprises an input label and a background image background-image attribute, and the CSS style sheet is processed according to a UI provided by a designer.
It should be noted that, the data interface in this step may be as follows: https:// axb. comstate ═ xxx & qid ═ yy & aid ═ zzz, wherein state represents what state the current questionnaire flow is in (including three states of start, going question making and end ending), qid represents the ID of the current question, and aid represents the ID of the current answer.
It can be understood that, in this step, the CSS rule text including the 5-channel title is sent to the client through the first data interface, so that the client executes setting of a background image background-image attribute in the CSS rule text when an input tag in the CSS rule text is switched to a closed state, and submits the second request data to the server through the second data interface, where the second request data corresponds to a parameter of the second data interface and a current title, that is, after the user clicks an option b3 of the title b, the client input tag is switched to a closed state, and at this time, the second data interface https:// axb.
And S106, analyzing based on the second request data to obtain the current title and the user selection behavior corresponding to the current title.
And analyzing according to the second request data corresponding to the second data interface, so that the current question is in a question making state, the current question is b, and the user selects the option b3 as an answer.
In the embodiment of the application, the JavaScript code is replaced by the cascading style sheet CSS to obtain the user selection behavior, namely, the server side equipment generates a CSS rule text according to each question and answer in the questionnaire data according to a preset CSS rule mode, and issues the CSS rule text through a data interface requested by a client side; when a user triggers a selection control, an input label in the CSS rule text is switched to a checked state, a background image background-image attribute is set in the CSS rule text, and a second data interface is triggered to send a current title and a selection behavior of the user to a server. JavaScript codes are replaced by CSS, no script is inserted, and invasion and conflict of page HTML structures can not be generated, so that bad experience of users can be improved.
It should be noted that, the embodiment of the present invention is not intended to replace the conventional questionnaire form, but to diversify the development mode of the questionnaire website, and provide a development mode with higher reliability, more convenience, higher efficiency, and lower cost for the questionnaire website.
The above steps are described in detail below.
In some embodiments, the identity of the user acquiring the selection behavior may be identified and verified, so that the user selection behavior acquisition process is more secure and reliable. As an example, after step S106, the method may further include the steps of:
step 1.1), if the second request data carries the browser cookie, verifying the browser cookie according to the browser cookie pre-configured by the server side, and determining the user identity.
And if the browser cookie preset in the server side is consistent with the browser cookie carried in the second request data, the identity authentication of the user is considered to be passed.
Based on the step 1.1), the answer progress of each user can be recorded, so that after the user exits the page automatically due to page faults or personal reasons of the user, the original answer progress, namely the user selection behavior, is still in the original state, and the user continues to collect the answer progress on the original basis, and the user experience is improved. As an example, after step 1.1), the method may further comprise the steps of:
and step 1.2), if the historical progress information of the questionnaire data corresponding to the user is verified according to the cookie of the browser, sending the historical progress information to the client.
Illustratively, when the server verifies the identity information of the current user based on the browser cookie, such as an identity ID, account information, and the like, it is searched whether the historical answer progress exists in the identity information, and if so, the historical progress information is sent to the client, so that the browser page of the client is displayed from the position where the user answered last time. The historical progress information refers to the last answer recording information in the questionnaire, and if the historical progress information of the user A is the last answer to the topic c, the browser page is displayed from the topic c at this time, so that the user can conveniently select to answer.
In some embodiments, based on the step S106, the categories may be classified according to specific topic types, so that the server can more accurately obtain the selection behavior of the user. As an example, the step S106 may include the following steps:
step 2.1), resolving one or more of the current topics based on the second request data, including: the question sequence number, the option type and the user selection behavior, wherein the user selection behavior comprises answer options selected by a user aiming at the current question;
and 2.2) determining the user selection behavior corresponding to the current title from the second request data according to the option type.
The operation times of the user on the selection control may be different due to single selection and multiple selection, and different user selection behavior acquisition modes are adopted for the single selection and the multiple selection respectively in the embodiment of the invention.
In some embodiments, the topic types of topics can be differentiated to make the user selection behavior acquisition more accurate. As an example, the step 2.2) may include the steps of:
step 2.2.1), if the option type is single selection, determining a user selection behavior according to the last array member in the array members corresponding to the current question;
and 2.2.2), if the option type is multi-selection, determining the user selection behavior according to the array members which appear odd times in the array members corresponding to the current title.
When a selection button of the page is clicked by a user and a selection event is triggered, backsound-image rule analysis is executed when a check state of a certain input label is triggered, data is submitted to a server, the server receives a request https:// abc. However, the whole questionnaire process may have a situation that multiple selections occur in one question, so that the final answer selected by the user needs to be judged in the server and then recorded in the database.
Assuming that the question a is single-choice and the question b is multiple-choice, after receiving multiple pieces of request data, the server analyzes the following answer sequence: [ a1, a3, a2, a1, b1, b3, b2, b1, b3, b3], at which time the answer sequence selected by each answer may be sorted according to the above questionnaire data list. Problem a is [ a1, a3, a2, a1], problem b is [ b1, b3, b2, b1, b3, b3 ].
For the single selection option, the above problem a is the single selection option. The single-choice options have mutual exclusivity, after the target option is selected, the target option cannot be clicked any more, and only other options can be clicked, so that the last array member a1 in the answer sequence is the final answer of the single-choice options.
For the multiple selection option, the above question b is the multiple selection option. The multi-choice option has coexistence, the selected target option can be clicked again to cancel, and the selection can be clicked again, so that multiple requests can be submitted, and therefore, single selection and cancellation mutually cancel, so that if the number of clicks of the answer is in the singular number, the selection is indicated, and if the number of clicks of the answer is in the double number, the non-selection is indicated, and then the array member b3 and the group member b2 are final answers of the multi-choice option.
In some embodiments, the time range for acquisition of the user selection behavior may be defined to make the user selection behavior time-efficient and referential. As an example, the method may further comprise the steps of:
step 3.1), when the browser page is initialized, receiving third request data sent by the client through a third data interface, and determining starting time according to the third request data;
and 3.2) receiving fourth request data sent by the client through a fourth data interface, and determining the end time according to the fourth request data, wherein the fourth data interface is triggered by the user submitting control.
Illustratively, when a client browser page is initialized, the server is informed of the start time of the server recording through the third data interface, and similarly, when a user completes the whole questionnaire and clicks the submission control, the client informs the server of the end time of the server recording through the fourth data interface.
Based on the step 3.1) and the step 3.2), a time range for acquiring the user selection behavior can be defined, so that the server screens out the user selection behavior which does not meet the specification, reliability of the user selection behavior is ensured, and the user selection behavior can be conveniently used as application data of a subsequent application scene. As an example, after step 3.2), the method may further comprise the steps of:
and 3.3) if the receiving time of the request data exceeds the time range formed by the starting time and the ending time, the request data is invalid.
Here, the embodiment of the present invention determines the validity of the request data acquired over the time range, that is, the server does not record or participate in subsequent operations related to the user behavior for the invalid user selection behavior.
It should be noted that, the start time and the end time are implicitly set as time boundaries by the overall questionnaire flow using background-image, so that the server receives the two third data interfaces and the fourth data interface of the questionnaire flow and can record the start time and the end time, and then the question answering request in the time range is processed as a valid request, otherwise, the question answering request is processed as an invalid request.
The whole scheme design of the embodiment of the invention is realized by using a pure CSS, and the original JavaScript event binding is replaced by skillfully using a background-image non-perception loading mode. Furthermore, the cost of maintaining CSS code is also much lower than JavaScript code. From the aspect of performance optimization, the smart CSS rule is used for replacing browser native events in certain specific scenes, so that the optimization behavior is excellent, and the wide application is facilitated.
Further, fig. 2 is a schematic flowchart of another method for acquiring a user-selected behavior according to an embodiment of the present application. The method is applied to a client, a page is obtained by executing a software application and rendering on a browser of the client, and a questionnaire for acquiring a user selection behavior is presented on the page, as shown in fig. 2, and the method comprises the following steps:
step S202, the first request data sent to the server receives the CSS rule text through the first data interface.
And S204, inserting a CSS rule text into the head tag of the page HTML structure, traversing each array in the CSS rule text, and obtaining the HTML structure aiming at the questionnaire and the CSS style sheet aiming at the questionnaire.
The CSS rule text can be marked by the server according to a specific identifier, and the CSS rule text can be marked as an A file.
It should be noted that after the page is developed and released to the production environment (on-line), when the user clicks the selection button corresponding to each option under each question, the corresponding CSS style in the file a is triggered. Illustratively, the HTML structure construction is based on a questionnaire data list process, as follows:
Figure BDA0003138773710000161
the input label is used for rendering the selection button, the radio button is used when the type is set to be radio, and the multi-selection button is used when the type is set to be checkbox. The id of each input tag corresponds to aid in the questionnaire data list, and the form is customized, and the structure of a 1-selector is used in the above example code.
For example, clicking # a 1-selector switches the corresponding input tag to a closed state, and after the switching is completed, the analysis of the CSS rule of background-image is executed, so as to trigger https:// axb.
Step S206, responding to the operation of the selection control corresponding to the answer option of each question, switching an input label in the CSS rule text to a checked state, executing a background image background-image attribute set in the CSS rule text, and submitting second request data to the server through a second data interface so that the server analyzes the second request data to obtain the current question and a user selection behavior corresponding to the current question, wherein the data interface comprises the state of the questionnaire, the current question ID and the current answer ID corresponding to the current question.
Wherein, the selection control (selection button) corresponds to the options contained in each topic. The developer does not need to bind an event for each selection button, the pressure of a browser event pool is effectively reduced by using a zero event mode, meanwhile, the switching and communication between the JS rendering engine and the GUI rendering engine are reduced, and the performance of the browser is fully utilized.
As an alternative embodiment, the step S104 further includes: CSS rule text is inserted into the head tag of the HTML structure via the link tag.
It can be understood that no JavaScript code is accessed in the whole process of the embodiment of the invention, namely no script is inserted, so that no extra JavaScript code invades into the original HTML structure, the non-invasion effect is realized, and the phenomenon that the script tag is loaded to cause the blocked rendering does not exist. Since the A file is loaded into HTML using the link tag, the rendering is not blocked by the link tag, so that normal loading rendering of the page can be maintained. The loading skill of the CSS rule is skillfully applied in the file A, the URL in the background-image is not triggered to request the server side when the file is analyzed, the background-image rule analysis is executed to submit data to the server side when the check state of a certain input label is triggered, namely, the background-image rule analysis is executed when a user triggers a selection control, so that the function of binding events for each selection button by JavaScript is replaced, and the effect of no perception is realized. Too many JavaScript binding events can pressurize a browser event pool, and the event binding is released by skillfully utilizing CSS rules, so that the whole questionnaire flow does not involve any script insertion, script implantation and event binding (zero script zero event), and the user selection behavior is recorded without invasion and script perception.
In a preferred embodiment of practical application, based on the CSS rule text including the questionnaire data generated by the server, no additional JavaScript code intrusion exists in the HTML structure of the client browser page, so that the original user bad experience is improved.
It should be noted that there is no state variable in the whole questionnaire flow, so it is not necessary to spend time developing some policies to manage these states, and there is certainly no data interaction problem such as how to save or share these questionnaire data or how to incrementally insert into the state variable, which is not necessary to deal with the above conventional solutions.
It can be understood that, each time a user answers on a browser page, the user is sent to the server through the data interface, that is, the server records the user selection behavior of each question in the questionnaire, and the operation of returning to the server after the whole questionnaire is answered by the state variables is different from the operation in the traditional sense.
In some embodiments, the user's identity may be verified to ensure the reliability of the user's selection behavior. As an example, the step S206 may include the following steps:
and 4.1) submitting second request data carrying the browser cookie to the server through the second data interface so that the server equipment can carry out user identity authentication according to the browser cookie.
Based on the step 4.1), on the basis of identifying the user identity, the historical answering progress corresponding to each user identity is obtained, so that the user does not need to answer again when accidentally quitting the page. As an example, after step 4.1), the method may further comprise the steps of:
step 4.2), sending first request data carrying the browser cookie to the server through the first data interface so that the server verifies the historical progress information of the questionnaire data corresponding to the user according to the browser cookie;
and 4.3) displaying the position of the historical questionnaire according to the historical progress information.
After the user clicks the selection control each time, the client submits corresponding request data to the server, so that the steps of the whole process are recorded by the server, when the page is closed or jammed due to some reasons and reenters the questionnaire process, the server can directly inform the page to enter the question of the original terminal, the answer selected by the user before is ensured to be the original answer, and the user is prevented from being bad experience caused by information loss.
In some embodiments, the validity of the obtained user selection behavior may be guaranteed by defining a time range involved by the user selection behavior. As an example, before step S206, the method may further include the steps of:
and 5.1) when the browser page is initialized, sending third request data to the server through a third data interface so that the server determines the starting time according to the third request data.
And 5.2) responding to the triggering operation aiming at the submitting control, and sending fourth request data to the server through the fourth interface so that the server obtains the end time according to the fourth request data.
Here, when the user answers all questions in the questionnaire, the user clicks the submission control, and the triggering of the data interface corresponding to the end time is realized.
Based on the step 5.1) and the step 5.2), the effectiveness of the user selection behavior can be identified according to the set time range, so as to ensure the reliability of the record of the user selection behavior. As an example, after step 5.2), the method may further comprise the steps of:
and 5.3) if the sending time of the request data exceeds the time range formed by the starting time and the ending time, the request data is invalid.
It should be noted that, if there is no time range divided as a boundary, the above-mentioned behaviors may not have any reference meaning, because it is not known whether the user is effective in solving the problem. Therefore, control of automatic call requests is added for starting and ending the questionnaire flow, namely https:// abc.combate ═ start is triggered automatically when the page is initialized and https:// abc.combate ═ end is triggered when the answer-finished user clicks a submit button. The server can record the starting time and the ending time after receiving the two interfaces of the questionnaire process, so that the answering request in the time range is taken as an effective request, otherwise, the answering request is processed according to an ineffective request, the server is helped to judge the effectiveness and the real-time performance of the whole questionnaire process, and meanwhile, some malicious requests and illegal requests are filtered, the accuracy of the questionnaire process of the user is guaranteed, and the server is protected from malicious damage of some crawler applications.
Fig. 3 provides a schematic structural diagram of a user-selected behavior obtaining apparatus, where the user-selected behavior obtaining apparatus 300 obtains a page by executing a software application and rendering the page on a browser of a client, where the page presents a questionnaire for obtaining a user-selected behavior, and the apparatus is applied to a server, and the apparatus includes:
the generating module 301 traverses each array in the questionnaire data used for generating the questionnaire, splices each array in the questionnaire data according to a preset CSS rule mode, and generates a CSS rule text, wherein the questionnaire data includes at least one array, and each array corresponds to one topic and a plurality of options corresponding to the topic;
a sending module 302, configured to send the CSS rule text to the client through a first data interface according to first request data sent by the client, so that the client executes setting of a background image background-image attribute in the CSS rule text when an input tag in the CSS rule text is switched to a closed state, and submits second request data to the server through a second data interface, where the data interface includes a state where the questionnaire is located, a current question ID, and a current answer ID corresponding to the current question;
and the analysis module 303 analyzes based on the second request data to obtain a current question and a user selection behavior corresponding to the current question.
In the practical application process, because the whole scheme design is realized by using the pure CSS, the page loading blocking like the script tag is not generated, the page can be normally loaded by using the pure CSS design development mode, and the HTML structure and the CSS style do not have any rendering conflict.
In one possible implementation, the second request data carries a browser cookie, and the apparatus further includes: and the identity determination module is used for verifying the browser cookie according to the preset browser cookie and determining the identity of the user.
In one possible implementation, the identity determination module is further specifically configured to send the historical progress information to the client if the historical progress information of the questionnaire data corresponding to the user is verified according to the browser cookie.
In a possible implementation, the parsing module 303 is further specifically configured to parse out one or more of the current titles based on the second request data, including: the system comprises a topic sequence number, an option type and a user selection behavior, wherein the user selection behavior comprises an answer option selected by a user for a current topic; and determining the user selection behavior corresponding to the current title from the second request data according to the option type.
In a possible implementation, the parsing module 303 is further specifically configured to determine the user selection behavior according to a last array member of the array members corresponding to the current question if the option type is single-selection; and if the option type is multi-selection, determining the user selection behavior according to odd-numbered array members in the array members corresponding to the current title.
In one possible implementation, the apparatus further comprises: the time determining module is used for receiving third request data sent by the client through a third data interface when a browser page is initialized, and determining starting time according to the third request data; receiving fourth request data sent by the client through a fourth data interface, and determining an end time according to the fourth request data, wherein the fourth data interface is triggered by a user submission control.
In a possible implementation, the time determining module is further specifically configured to invalidate the request data if the receiving time of the request data exceeds a time range formed by the start time and the end time.
Fig. 4 provides a schematic structural diagram of another user-selected behavior acquisition apparatus, in which a user-selected behavior acquisition apparatus 400 executes a software application and renders a page on a browser of a client, where a questionnaire for acquiring a user-selected behavior is presented on the page, and the apparatus is applied to the client, and includes:
the receiving module 401 receives the CSS rule text through a first data interface for the first request data sent to the server;
the inserting module 402 is used for inserting the CSS rule text into the head tag of the page HTML structure, traversing each array in the CSS rule text, and obtaining an HTML structure for the questionnaire and a CSS style sheet for the questionnaire;
the triggering module 403, in response to an operation of selecting a control corresponding to an answer option of each question, switches an input tag in the CSS rule text to a checked state, executes a background image background-image attribute set in the CSS rule text, and submits second request data to the server through a second data interface, so that the server parses the second request data to obtain a current question and a user selection behavior corresponding to the current question, where the data interface includes a state where the questionnaire is located, a current question ID, and a current answer ID corresponding to the current question.
In one possible implementation, the inserting module 402 is further specifically configured to insert the CSS rule text into a head tag of an HTML structure through a link tag.
In a possible implementation, the triggering module 403 is further specifically configured to submit, to the server through a second data interface, second request data carrying a browser cookie, so that the server device performs user identity authentication according to the browser cookie.
In one possible implementation, the apparatus further comprises:
the history progress display module is used for sending first request data carrying a browser cookie to the server through a first data interface so that the server verifies history progress information of questionnaire data corresponding to the user according to the browser cookie; and displaying the position of the historical questionnaire according to the historical progress information.
In one possible implementation, the apparatus further comprises: the time determining module is used for sending third request data to the server through a third data interface when the browser page is initialized, so that the server determines starting time according to the third request data; and responding to the triggering operation aiming at the submitting control, and sending fourth request data to the server through a fourth interface so that the server obtains end time according to the fourth request data.
In one possible implementation, the apparatus further comprises: and the time verification module is used for invalidating the request data if the sending time of the request data exceeds a time range formed by the starting time and the ending time.
As shown in fig. 5, an electronic device 500 includes a memory 501 and a processor 502, where the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the steps of the method provided by the foregoing embodiment.
Referring to fig. 5, the electronic device further includes: a bus 503 and a communication interface 504, and the processor 502, the communication interface 504 and the memory 501 are connected by the bus 503; the processor 502 is for executing executable modules, e.g. computer programs, stored in the memory 501.
The Memory 501 may include a Random Access Memory (RAM), and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 504 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
Bus 503 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 5, but this does not indicate only one bus or one type of bus.
The memory 501 is used for storing a program, and the processor 502 executes the program after receiving an execution instruction, and the method performed by the apparatus defined by the process disclosed in any of the foregoing embodiments of the present application may be applied to the processor 502, or implemented by the processor 502.
The processor 502 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 502. The processor 502 may be a general-purpose processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory X01, and the processor X02 reads the information in the memory X01, and completes the steps of the above method in combination with the hardware thereof.
Corresponding to the above-mentioned method for acquiring a user-selected behavior, an embodiment of the present application further provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to execute the steps of the method for acquiring a user-selected behavior.
The device for acquiring the user selection behavior provided by the embodiment of the application may be specific hardware on the device, or software or firmware installed on the device, and the like. The device provided by the embodiment of the present application has the same implementation principle and technical effect as the foregoing method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiments where no part of the device embodiments is mentioned. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
For another example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method for acquiring the user selection behavior according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the scope of the embodiments of the present application. Are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (18)

1. A method for obtaining a user-selected behavior, wherein a page is obtained by executing a software application and rendering the page on a browser of a client, and a questionnaire for obtaining the user-selected behavior is presented on the page, and the method comprises:
traversing each array in questionnaire data, splicing each array in the questionnaire data according to a preset CSS rule mode, and generating a CSS rule text, wherein the questionnaire data is used for generating the questionnaire, the questionnaire data comprises at least one array, and each array corresponds to one question and a plurality of options corresponding to the question;
according to first request data sent by the client, the CSS rule text is sent to the client through a first data interface, so that the client submits second request data to a server through a second data interface according to the CSS rule text, wherein the first data interface and the second data interface respectively comprise the state of the questionnaire, the current question ID and the current answer ID corresponding to the current question;
and analyzing based on the second request data to obtain the current title and the user selection behavior corresponding to the current title.
2. The method of claim 1, wherein the second request data carries a browser cookie, the method further comprising:
and verifying the browser cookie according to a preset browser cookie to determine the user identity.
3. The method of claim 2, further comprising:
and if the historical progress information of the questionnaire data corresponding to the user is verified according to the browser cookie, sending the historical progress information to the client.
4. The method according to claim 1, wherein the step of analyzing based on the second request data to obtain a current topic and a user selection behavior corresponding to the current topic further comprises:
parsing out one or more of the current topics based on the second request data, including: the system comprises a topic sequence number, an option type and a user selection behavior, wherein the user selection behavior comprises an answer option selected by a user for a current topic;
and determining the user selection behavior corresponding to the current title from the second request data according to the option type.
5. The method according to claim 4, wherein the step of determining the user selection behavior corresponding to the current topic from the second request data according to the option type comprises:
if the option type is single selection, determining the user selection behavior according to the last array member in the array members corresponding to the current question;
and if the option type is multi-selection, determining the user selection behavior according to odd-numbered array members in the array members corresponding to the current title.
6. The method of claim 1, further comprising:
when a browser page is initialized, receiving third request data sent by the client through a third data interface, and determining starting time according to the third request data;
receiving fourth request data sent by the client through a fourth data interface, and determining an end time according to the fourth request data, wherein the fourth data interface is triggered by a user submission control.
7. The method of claim 6, further comprising:
and if the receiving time of the request data exceeds the time range formed by the starting time and the ending time, the request data is invalid.
8. A method for obtaining a user-selected behavior, wherein a page is obtained by executing a software application and rendering the page on a browser of a client, and a questionnaire for obtaining the user-selected behavior is presented on the page, and the method comprises:
receiving a CSS rule text through a first data interface by first request data sent to a server;
inserting the CSS rule text into a head tag of the page HTML structure, and traversing each array in the CSS rule text to obtain an HTML structure for the questionnaire and a CSS style sheet for the questionnaire;
responding to the operation of a selection control corresponding to the answer option of each question, switching an input label in the CSS rule text to a checked state, executing a background image background-image attribute set in the CSS rule text, and submitting second request data to the server through a second data interface so that the server analyzes the second request data to obtain a current question and a user selection behavior corresponding to the current question, wherein the data interface comprises the state of the questionnaire, the current question ID and the current answer ID corresponding to the current question.
9. The method of claim 8, wherein the step of inserting the CSS rule text in the head tag of the page HTML structure comprises:
and inserting the CSS rule text into a head tag of an HTML structure through a link tag.
10. The method of claim 8, wherein the step of submitting the second request data to the server via a second data interface comprises:
and submitting second request data carrying the browser cookie to the server through a second data interface so that the server equipment performs user identity authentication according to the browser cookie.
11. The method of claim 10, further comprising:
sending first request data carrying a browser cookie to the server through a first data interface so that the server verifies the historical progress information of questionnaire data corresponding to the user according to the browser cookie;
and displaying the position of the historical questionnaire according to the historical progress information.
12. The method of claim 8, further comprising:
when a browser page is initialized, sending third request data to the server through a third data interface, so that the server determines starting time according to the third request data;
and responding to the triggering operation aiming at the submitting control, and sending fourth request data to the server through a fourth interface so that the server obtains end time according to the fourth request data.
13. The method of claim 12, further comprising:
and if the sending time of the request data exceeds the time range formed by the starting time and the ending time, the request data is invalid.
14. A user-selected behavior acquisition apparatus, wherein a page is obtained by executing a software application and rendering on a browser of a client, and a questionnaire for acquiring a user-selected behavior is presented on the page, the apparatus is applied to a server, and the apparatus comprises:
the generating module is used for traversing each array in questionnaire data used for generating the questionnaire, splicing each array in the questionnaire data according to a preset CSS rule mode, and generating a CSS rule text, wherein the questionnaire data comprises at least one array, and each array corresponds to one question and a plurality of options corresponding to the question;
the sending module is used for sending the CSS rule text to the client through a first data interface according to first request data sent by the client, so that the client submits second request data to the server through a second data interface according to the CSS rule text, wherein the first data interface and the second data interface respectively comprise the state of the questionnaire, the current question ID and the current answer ID corresponding to the current question;
and the analysis module is used for analyzing based on the second request data to obtain the current question and the user selection behavior corresponding to the current question.
15. A user-selected behavior acquisition apparatus that executes a software application and renders a page on a browser of a client, the page presenting a questionnaire for acquiring a user-selected behavior, the apparatus being applied to the client, the apparatus comprising:
the receiving module is used for receiving the CSS rule text through a first data interface according to first request data sent to the server;
the inserting module is used for inserting the CSS rule text into the head tag of the page HTML structure, traversing each array in the CSS rule text, and obtaining the HTML structure aiming at the questionnaire and the CSS style sheet aiming at the questionnaire;
and the triggering module responds to the operation of a selection control corresponding to the answer option of each question, switches an input label in the CSS rule text to a checked state, executes the background image background-image attribute set in the CSS rule text, and submits second request data to the server through a second data interface so that the server analyzes the second request data to obtain the current question and the user selection behavior corresponding to the current question, wherein the data interface comprises the state of the questionnaire, the current question ID and the current answer ID corresponding to the current question.
16. A server device comprising a memory and a processor, wherein the memory stores a computer program operable on the processor, and wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.
17. A client device comprising a memory, a processor, and a computer program stored in the memory and operable on the processor, wherein the processor implements the steps of the method of any of the preceding claims 8 to 13 when executing the computer program.
18. A computer readable storage medium having stored thereon computer executable instructions which, when invoked and executed by a processor, cause the processor to execute the method of any of claims 1 to 13.
CN202110726256.0A 2021-06-29 2021-06-29 User selection behavior acquisition method and device, client and server equipment Active CN113468455B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110726256.0A CN113468455B (en) 2021-06-29 2021-06-29 User selection behavior acquisition method and device, client and server equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110726256.0A CN113468455B (en) 2021-06-29 2021-06-29 User selection behavior acquisition method and device, client and server equipment

Publications (2)

Publication Number Publication Date
CN113468455A true CN113468455A (en) 2021-10-01
CN113468455B CN113468455B (en) 2023-06-30

Family

ID=77873671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110726256.0A Active CN113468455B (en) 2021-06-29 2021-06-29 User selection behavior acquisition method and device, client and server equipment

Country Status (1)

Country Link
CN (1) CN113468455B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114629716A (en) * 2022-03-31 2022-06-14 广东电网有限责任公司 User password resetting method and device

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100179833A1 (en) * 2009-01-12 2010-07-15 Roizen Michael F Automated coaching
CN102685254A (en) * 2012-05-31 2012-09-19 深圳英宝通科技有限公司 Control method and system for cross-platform mobile network terminal
US20140108095A1 (en) * 2012-10-15 2014-04-17 Iperceptions Inc. System and method for generating and providing customized survey questionnaires
CN105096163A (en) * 2015-08-11 2015-11-25 精硕世纪科技(北京)有限公司 Electronic questionnaire data processing method and device
CN106020925A (en) * 2016-06-08 2016-10-12 腾讯科技(深圳)有限公司 Method and device for displaying opening and closing effect on webpage based on CSS
CN107995977A (en) * 2017-09-07 2018-05-04 深圳市云中飞网络科技有限公司 Interface processing method, device, computer-readable storage medium and electronic equipment
US20190065444A1 (en) * 2017-08-30 2019-02-28 Explica, Inc. Techniques for efficient & high-throughput web content-creation
US20190384582A1 (en) * 2017-01-23 2019-12-19 Alkira Software Holdings Pty Ltd Facilitated user interaction
CN110929482A (en) * 2019-10-28 2020-03-27 汕头大学医学院 Questionnaire generation method and system
CN111291974A (en) * 2020-01-17 2020-06-16 中国矿业大学(北京) Method and system for quantitatively analyzing tissue security culture
US10798089B1 (en) * 2019-06-11 2020-10-06 Capital One Services, Llc System and method for capturing information
CN111814426A (en) * 2020-07-20 2020-10-23 腾讯科技(深圳)有限公司 Questionnaire page configuration method and device, computer equipment and storage medium
WO2021098242A1 (en) * 2020-02-27 2021-05-27 百度在线网络技术(北京)有限公司 Page processing method and apparatus, electronic device and computer readable medium
CN113032701A (en) * 2021-05-24 2021-06-25 北京创新乐知网络技术有限公司 Method and device for displaying choice questions

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100179833A1 (en) * 2009-01-12 2010-07-15 Roizen Michael F Automated coaching
CN102685254A (en) * 2012-05-31 2012-09-19 深圳英宝通科技有限公司 Control method and system for cross-platform mobile network terminal
US20140108095A1 (en) * 2012-10-15 2014-04-17 Iperceptions Inc. System and method for generating and providing customized survey questionnaires
CN105096163A (en) * 2015-08-11 2015-11-25 精硕世纪科技(北京)有限公司 Electronic questionnaire data processing method and device
CN106020925A (en) * 2016-06-08 2016-10-12 腾讯科技(深圳)有限公司 Method and device for displaying opening and closing effect on webpage based on CSS
US20190384582A1 (en) * 2017-01-23 2019-12-19 Alkira Software Holdings Pty Ltd Facilitated user interaction
US20190065444A1 (en) * 2017-08-30 2019-02-28 Explica, Inc. Techniques for efficient & high-throughput web content-creation
CN107995977A (en) * 2017-09-07 2018-05-04 深圳市云中飞网络科技有限公司 Interface processing method, device, computer-readable storage medium and electronic equipment
US10798089B1 (en) * 2019-06-11 2020-10-06 Capital One Services, Llc System and method for capturing information
CN110929482A (en) * 2019-10-28 2020-03-27 汕头大学医学院 Questionnaire generation method and system
CN111291974A (en) * 2020-01-17 2020-06-16 中国矿业大学(北京) Method and system for quantitatively analyzing tissue security culture
WO2021098242A1 (en) * 2020-02-27 2021-05-27 百度在线网络技术(北京)有限公司 Page processing method and apparatus, electronic device and computer readable medium
CN111814426A (en) * 2020-07-20 2020-10-23 腾讯科技(深圳)有限公司 Questionnaire page configuration method and device, computer equipment and storage medium
CN113032701A (en) * 2021-05-24 2021-06-25 北京创新乐知网络技术有限公司 Method and device for displaying choice questions

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
屈倩倩;阚红星;高勇;: "基于Blockly可视化编程教育系统的设计与实现", 微型电脑应用 *
骆慧勇;: "通用调查问卷系统设计与实现", 金融科技时代 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114629716A (en) * 2022-03-31 2022-06-14 广东电网有限责任公司 User password resetting method and device

Also Published As

Publication number Publication date
CN113468455B (en) 2023-06-30

Similar Documents

Publication Publication Date Title
CN108984389B (en) Application program testing method and terminal equipment
US10587612B2 (en) Automated detection of login sequence for web form-based authentication
EP3273362A1 (en) Webpage access method, apparatus, device and non-volatile computer storage medium
CN104102643A (en) Method and device for snapshoting page
WO2016011879A1 (en) Web page display method and apparatus
CN111475161B (en) Method, device and equipment for accessing component
CN111026625A (en) Method, device and storage medium for calculating page rendering time
WO2021104387A1 (en) Method for automatically identifying valid data acquisition module and system
US10079738B1 (en) Using a network crawler to test objects of a network document
US20170346909A1 (en) Client-side bottleneck analysis using real user monitoring data
CN111539775A (en) Application program management method and device
CN112800751A (en) Method, device, equipment and storage medium for configuring and checking mobile terminal webpage form
CN113468455A (en) User selection behavior acquisition method and device, client and server equipment
CN111522749A (en) Page testing method and device, readable storage medium and electronic equipment
CN110399723B (en) Vulnerability detection method and device, storage medium and electronic device
CN104025089B (en) The method and system creeped based on situation
CN109815083B (en) Application crash monitoring method and device, electronic equipment and medium
CN112131085A (en) Method, system and device for recording and playing back Internet business process
CN112130908A (en) Method and device for setting user guide
WO2014051578A1 (en) Capturing an application state in a conversation
CN108229127B (en) System and method for generating authentication data in advance to distinguish clients
CN113656739A (en) Website data storage method and device
CN110659191B (en) Buried data analysis method, buried data analysis device, computer equipment and storage medium
CN110018766B (en) Webpage form filling method and device
US10296449B2 (en) Recording an application test

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant