CN108536438B - Dotting module, method and computer readable medium for processing user behavior data - Google Patents

Dotting module, method and computer readable medium for processing user behavior data Download PDF

Info

Publication number
CN108536438B
CN108536438B CN201810319859.7A CN201810319859A CN108536438B CN 108536438 B CN108536438 B CN 108536438B CN 201810319859 A CN201810319859 A CN 201810319859A CN 108536438 B CN108536438 B CN 108536438B
Authority
CN
China
Prior art keywords
empty
parameter
user behavior
behavior data
parameters
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.)
Active
Application number
CN201810319859.7A
Other languages
Chinese (zh)
Other versions
CN108536438A (en
Inventor
张磊
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jinxin Ruitong Technology Co ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810319859.7A priority Critical patent/CN108536438B/en
Publication of CN108536438A publication Critical patent/CN108536438A/en
Application granted granted Critical
Publication of CN108536438B publication Critical patent/CN108536438B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a dotting module for processing user behavior data, which comprises: the data receiving unit is used for receiving any number and any type of user behavior data through the custom function and obtaining parameters corresponding to the user behavior data under the custom function; the judging unit is used for judging whether the parameter is empty or not; the uploading unit is used for uploading the user behavior data corresponding to the parameter which is judged to be not empty by the judging unit; and the feedback unit is used for feeding back the parameters judged to be empty by the judgment unit and/or the information of the abnormal conditions occurring in the uploading process of the uploading unit to the console. The invention also relates to a relevant dotting method for processing user behavior data and a relevant computer readable storage medium.

Description

Dotting module, method and computer readable medium for processing user behavior data
Technical Field
The invention relates to the field of computers, in particular to a dotting module and a dotting method for processing user behavior data and a related computer readable medium.
Background
In the development process of the client, a dotting function module is often used, and the dotting function module is mainly used for recording user behaviors. The biggest characteristic of the dotting module is that point location information changes more, and sometimes the point location information data volume is little, and sometimes the point location information data volume is bigger, and among the prior art, the solution to above-mentioned problem is solved through the mode of function overload, but in case point location information changes will need to go to reset new dotting function again, can make the change of whole dotting function more frequent like this, very difficult management. And because the number of the heavy-load functions used in the traditional scheme is large, automatic fault tolerance cannot be realized, if all the heavy-load functions need to be modified under the condition of global logic modification in dotting, the workload is huge, and other problems are very easily introduced.
Moreover, in the prior art, corresponding judgment logic cannot be made for dotting parameter information, so that the problem of a null pointer can be caused under the condition of some abnormal operation, and thus the whole system is crashed, so that the application program cannot normally operate.
Therefore, there is a need for a new dotting module and a corresponding dotting method for processing user behavior data.
Disclosure of Invention
In view of the above, in order to overcome at least one aspect of the above problems, an embodiment of the present invention provides a dotting module for processing user behavior data, including:
the data receiving unit is used for receiving any number and any type of user behavior data through a custom function and obtaining parameters corresponding to the user behavior data under the custom function;
the judging unit is used for judging whether the parameter is empty or not;
the uploading unit is used for uploading the user behavior data corresponding to the parameter which is judged to be not empty by the judging unit; and the number of the first and second groups,
and the feedback unit is used for feeding back the parameters judged to be empty by the judgment unit and/or the information of the abnormal conditions occurring in the uploading process of the uploading unit to the console.
For example, the parameter is an args parameter of the object type.
Further, the dotting module further comprises a processing unit, and the processing unit is used for processing the parameters fed back by the feedback unit and judged to be empty by the judgment unit and/or processing abnormal conditions fed back by the feedback unit and occurring in the uploading process of the uploading unit.
According to another aspect of the present invention, there is provided a dotting method for processing user behavior data, comprising the steps of:
s1, receiving any number and any type of user behavior data, and obtaining parameters corresponding to the user behavior data;
s2, judging whether the parameter is empty or not;
s3, uploading user behavior data corresponding to the parameters which are judged not to be empty; and the number of the first and second groups,
and S4, feeding back the parameters judged to be empty and/or feeding back information of abnormal conditions occurring in the uploading process.
For example, the parameter is an args parameter of the object type.
Further, the step S2 further includes:
s21, judging whether the args parameter is empty, and if the args parameter is empty, feeding back the empty args parameter to the console; if the args parameter is not null, go to step S22;
s22, judging whether the length of the args parameter is empty, and if the length of the args parameter is judged to be empty, feeding back the args parameter with the empty length to a console; if the length of the args parameter is not empty, performing step S23; and the number of the first and second groups,
and S23, judging whether each arg parameter in the args parameters is empty, if so, feeding back the empty arg parameters to the console, and if not, performing the step S3.
Further, in step S23, after determining that the arg parameter is not null, the method further includes:
s231, determining a data type of the user behavior data corresponding to the arg parameter, if the data type of the user behavior data corresponding to the arg parameter is an object type, performing step S232, and if the data type of the user behavior data corresponding to the arg parameter is a normal data type, not determining whether the data type is empty; and the number of the first and second groups,
and S232, judging whether each arg parameter in the args parameters is empty, feeding back the empty arg parameters to the console if the arg parameters are judged to be empty, and performing the step S3 if the arg parameters are not judged to be empty.
Further, the method further comprises:
s5, processing the parameters which are empty and/or processing the abnormal condition which occurs in the uploading process.
According to another aspect of the invention, a computer-readable medium is provided, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the method of processing user behavior data as any one of the above.
Compared with the prior art, the invention has the following advantages:
(1) any number of user behavior data of any type can be received through one function, the number of codes is greatly reduced, and the later-stage extension and enhancement of the dotting function are facilitated;
(2) empty judgment can be automatically realized, and the logic problem of empty hiding can be effectively solved;
(3) in the uploading process, if abnormal conditions occur, the abnormal conditions can be fed back and processed in time, so that the problems of program crash and the like caused by the occurrence of other abnormal conditions are effectively avoided.
Drawings
Other objects and advantages of the present invention will become apparent from the following description of the invention which refers to the accompanying drawings, and may assist in a comprehensive understanding of the invention.
FIG. 1 is a block diagram of a dotting module for processing user behavior data according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps performed in a dotting method for processing user behavior data according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings of the embodiments of the present invention. It should be apparent that the described embodiment is one embodiment of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the described embodiments of the invention without any inventive step, are within the scope of protection of the invention.
Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs.
According to an aspect of the present invention, an embodiment of the present invention provides a dotting module 100 for processing user behavior data, as shown in fig. 1, the dotting module 100 may include a data receiving unit 101, a determining unit 102, an uploading unit 103, and a feedback unit 104. Each unit is briefly described below.
The data receiving unit 101 is configured to receive any number of user behavior data and any type of user behavior data through a custom function, and obtain a parameter corresponding to the user behavior data under the custom function.
In a specific implementation process, the custom function may be:
Public void castPoint(Object…args)
the function is a public function and can be accessed by other classes; its return type is void type, i.e. no return value; the name is castPoint; for the function parameter, the length of a new characteristic variable parameter args in java is used as parameter information, and the parameter type of the variable parameter is Object type, that is, the parameter is the args parameter of the Object type. Objcet is a top-level abstract class in Java language, and according to the object-oriented characteristic, the abstract class can be used for receiving subclasses of any type of data, and therefore can be used for receiving any data object. Second, since the parameters of the function are set to the type of variable parameters, the function can be made to accept any number of parameters.
Any amount of user behavior data of any type can be accepted through the function, so that a reloading scheme in the traditional scheme can be replaced through one function, the number of codes is greatly reduced, and the expansion and the enhancement of the dotting function in the later period are facilitated.
The determining unit 102 is configured to determine whether a parameter corresponding to the user behavior data is null.
In the specific implementation process, the unit mainly determines whether the args parameter is empty. By the method, the judgment of whether the space is available or not can be automatically realized, and the logic problem of space hiding can be effectively solved.
The uploading unit 103 is configured to upload user behavior data corresponding to the parameter determined by the determining unit 102 to be not empty.
The feedback unit 104 is configured to feed back, to the console, the parameter determined to be empty by the determining unit 102 and/or information of an abnormal situation occurring during the uploading process by the uploading unit 103.
In a specific implementation project, there may be two feedback units 104, which are respectively used for feeding back the parameter determined to be empty by the determining unit 102 and feeding back information of an abnormal situation occurring in the uploading process by the uploading unit 103.
For example, the feedback unit 104 for feeding back the information of the abnormal situation occurring in the uploading process by the uploading unit 103 may be obtained by wrapping a layer of try-catch code block on the service logic after the arbitration logic. The Try-catch code block can ensure that when an exception occurs in the uploading process, the program of the dotting module can be executed into the catch code block, and if no exception occurs, the program is executed according to the original logic.
Further, the dotting module 100 may further include a processing unit, configured to process the parameter that is determined to be empty by the determining unit 102 and fed back by the feedback unit 104, and/or process an abnormal situation that occurs in the uploading process by the uploading unit 103 and fed back by the feedback unit 104.
In a specific implementation process, there may be two processing units, and the two processing units are respectively used for processing the parameter that is determined to be empty by the determining unit 102 and fed back by the feedback unit 104, and for processing an abnormal situation that occurs in an uploading process by the uploading unit 103 fed back by the feedback unit 104.
For example, if an empty parameter is determined, the parameter information may be fed back to the console through the feedback unit 104, and then the parameter may be processed through one of the processing units; if the abnormal condition occurs, the abnormal condition is processed through the other processing unit, and the continuous operation of the dotting module is stopped, so that the problem of program crash caused by the occurrence of other abnormal conditions is effectively avoided.
An embodiment of the present invention further provides a dotting method for processing user behavior data, as shown in fig. 2, the dotting method may include the following steps:
s1, receiving any number and any type of user behavior data, and obtaining parameters corresponding to the user behavior data;
in the specific implementation process, any number and any type of user behavior data are received through a custom function, and the structure, parameters, and names of the function are consistent with those of the functions in the above embodiments, which is not described herein again. For example, the parameters may be consistent with the parameters in the above embodiments, and are args parameters of the object type.
S2, judging whether the parameters corresponding to the user behavior data are null or not;
in a further preferred embodiment, step S2 may further include:
s21, judging whether the args parameter is empty, and if the args parameter is empty, feeding back the empty args parameter to the console; if the args parameter is not null, go to step S22;
firstly, judging the args, judging whether the args is empty or not, if the args is empty, indicating that no parameter information is transmitted, stopping dotting at the moment, specifically returning through a return statement, and outputting information of dotting parameter abnormity to a console.
S22, judging whether the length of the args parameter is empty, and if the length of the args parameter is empty, feeding back the args parameter with the empty length to the console; if the length of the args parameter is not empty, performing step S23;
if the args is not empty, the length of the args needs to be determined, specifically, length information of the parameter is obtained by an args. The obtained len represents the parameter number information in the dotting module, namely the user behavior data number information. If len is 0, indicating that the parameter format is 0, then it is necessary to terminate program execution and output parameter exception information to the console. If len is greater than 0, the subsequent determination is continued.
And S23, judging whether each arg parameter in the args parameters is empty, if so, feeding back the empty arg parameters to the console, and if not, executing the step S3.
If len is larger than 0, the contents in the args need to be determined one by one, specifically, the data contents in the args are taken out one by one through for circulation in java language, that is, the user behavior data is taken out. In the flow of each for loop, each time a piece of data is fetched, the fetched data is marked as arg, and it is first determined whether the object of the arg is of a normal data type or an object type. The specific judgment process is to judge whether the arg is an Object of an Object type through instanceof keyword and arg instanceof Object in java. If the determination is passed, it indicates that arg is an Object of type Object, otherwise it is a normal data type. It is not necessary to determine whether or not the data of the normal data type is empty, but it is necessary to determine whether or not the object is empty for the data of the object type.
In a further preferred embodiment, in step S23, after determining that the arg parameter is not null, the method may further include:
s231, judging the data type of the user behavior data corresponding to the arg parameter, if the data type of the user behavior data corresponding to the arg parameter is the object type, performing step S232, and if the data type of the user behavior data corresponding to the arg parameter is the common data type, not performing the judgment of whether the data type is empty;
and S232, judging whether each arg parameter in the args parameters is empty, feeding back the empty arg parameters to the console if the arg parameters are judged to be empty, and performing the step S3 if the arg parameters are not judged to be empty.
S3, uploading user behavior data corresponding to the parameters which are judged not to be empty;
in the uploading process, if an abnormal condition occurs, the processing method is the same as that described in the above embodiments, and will not be described herein again.
And S4, feeding back the parameters judged to be empty and/or feeding back information of abnormal conditions occurring in the uploading process.
The feedback process is the same as that described in the above embodiments, and will not be described herein.
In a further preferred embodiment, the dotting method for processing user behavior data according to the present invention may further include:
and S5, processing the parameters judged to be empty and/or processing abnormal situations occurring in the uploading process.
The specific processing procedure may be the same as that described in the above embodiments, and will not be described herein again.
Based on the same inventive concept, referring to fig. 3, an embodiment of the present invention further provides a computer-readable medium 201, on which a computer program 202 is stored, and when the computer program 202 is executed by a processor, the steps of the method for processing user behavior data as described in any one of the above embodiments can be implemented.
It should also be noted that, in the case of the embodiments of the present invention, features of the embodiments and examples may be combined with each other to obtain a new embodiment without conflict.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (6)

1. A dotting module for processing user behavior data, comprising:
the data receiving unit is used for receiving any number of user behavior data and any type of user behavior data through a custom function and obtaining parameters corresponding to the user behavior data under the custom function, wherein the parameters are args parameters of an object type;
the judging unit is used for judging whether the parameters are empty or not, judging whether the length of the args parameters is empty or not, and judging whether each arg parameter in the args parameters is empty or not;
the uploading unit is used for uploading the user behavior data corresponding to the parameter which is judged to be not empty by the judging unit; and
and the feedback unit is used for feeding back the parameters judged to be empty by the judgment unit and/or the information of the abnormal conditions occurring in the uploading process of the uploading unit to the console.
2. The dotting module according to claim 1, further comprising a processing unit, configured to process the parameter that is determined to be empty by the determining unit and is fed back by the feedback unit and/or process an abnormal situation that occurs in an uploading process of the uploading unit and is fed back by the feedback unit.
3. A dotting method for processing user behavior data, comprising the steps of:
s1, receiving any number and type of user behavior data, and obtaining parameters corresponding to the user behavior data, wherein the parameters are args parameters of object types;
s2, judging whether the parameter is empty or not;
s3, uploading user behavior data corresponding to the parameters which are judged not to be empty; and
s4, feeding back the parameters judged to be empty and/or feeding back the information of the abnormal conditions occurring in the uploading process;
wherein the step S2 further includes:
s21, judging whether the args parameter is empty, and if the args parameter is empty, feeding back the empty args parameter to the console; if the args parameter is not null, go to step S22;
s22, judging whether the length of the args parameter is empty, and if the length of the args parameter is judged to be empty, feeding back the args parameter with the empty length to a console; if the length of the args parameter is not empty, performing step S23; and
and S23, judging whether each arg parameter in the args parameters is empty, if so, feeding back the empty arg parameters to the console, and if not, performing the step S3.
4. The method according to claim 3, wherein in the step S23, after determining that the arg parameter is not null, the method further comprises:
s231, determining a data type of the user behavior data corresponding to the arg parameter, if the data type of the user behavior data corresponding to the arg parameter is an object type, performing step S232, and if the data type of the user behavior data corresponding to the arg parameter is a normal data type, not determining whether the data type is empty; and
and S232, judging whether the arg parameter is empty, feeding back the arg parameter which is empty to the console if the arg parameter is judged to be empty, and performing the step S3 if the arg parameter is not judged to be empty.
5. The method of any one of claims 3-4, wherein the method further comprises:
s5, processing the parameters which are empty and/or processing the abnormal condition which occurs in the uploading process.
6. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 3 to 5.
CN201810319859.7A 2018-04-10 2018-04-10 Dotting module, method and computer readable medium for processing user behavior data Active CN108536438B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810319859.7A CN108536438B (en) 2018-04-10 2018-04-10 Dotting module, method and computer readable medium for processing user behavior data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810319859.7A CN108536438B (en) 2018-04-10 2018-04-10 Dotting module, method and computer readable medium for processing user behavior data

Publications (2)

Publication Number Publication Date
CN108536438A CN108536438A (en) 2018-09-14
CN108536438B true CN108536438B (en) 2021-11-09

Family

ID=63480825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810319859.7A Active CN108536438B (en) 2018-04-10 2018-04-10 Dotting module, method and computer readable medium for processing user behavior data

Country Status (1)

Country Link
CN (1) CN108536438B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7885618B1 (en) * 2005-09-02 2011-02-08 Magnolia Broadband Inc. Generating calibration data for a transmit diversity communication device
CN105117660A (en) * 2015-08-04 2015-12-02 杭州朗和科技有限公司 Database system starting method and apparatus
CN106210792A (en) * 2016-06-24 2016-12-07 武汉斗鱼网络科技有限公司 Any active ues collection maintaining method based on time wheel disc and page behavior and system
CN106294101A (en) * 2015-05-19 2017-01-04 阿里巴巴集团控股有限公司 The page gets method of testing and device ready
CN106507149A (en) * 2016-11-24 2017-03-15 武汉斗鱼网络科技有限公司 Video preference information processing method, apparatus and system
CN107092483A (en) * 2017-03-24 2017-08-25 武汉斗鱼网络科技有限公司 The method and system of data type in a kind of automatic parsing daily record storehouse

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8719618B2 (en) * 2012-06-13 2014-05-06 International Business Machines Corporation Dynamic cache correction mechanism to allow constant access to addressable index
CN104916155B (en) * 2015-05-22 2017-10-13 深圳北斗应用技术研究院有限公司 A kind of real-time public communication information service system
CN106227711A (en) * 2016-07-26 2016-12-14 无锡天脉聚源传媒科技有限公司 A kind of method and device processing custom parameter
CN107508705B (en) * 2017-08-21 2020-07-07 北京蓝海讯通科技股份有限公司 Resource tree construction method of HTTP element and computing equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7885618B1 (en) * 2005-09-02 2011-02-08 Magnolia Broadband Inc. Generating calibration data for a transmit diversity communication device
CN106294101A (en) * 2015-05-19 2017-01-04 阿里巴巴集团控股有限公司 The page gets method of testing and device ready
CN105117660A (en) * 2015-08-04 2015-12-02 杭州朗和科技有限公司 Database system starting method and apparatus
CN106210792A (en) * 2016-06-24 2016-12-07 武汉斗鱼网络科技有限公司 Any active ues collection maintaining method based on time wheel disc and page behavior and system
CN106507149A (en) * 2016-11-24 2017-03-15 武汉斗鱼网络科技有限公司 Video preference information processing method, apparatus and system
CN107092483A (en) * 2017-03-24 2017-08-25 武汉斗鱼网络科技有限公司 The method and system of data type in a kind of automatic parsing daily record storehouse

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
java 可变长参数 Object...object;lcczzu;《https://blog.csdn.net/lcczzu/article/details/46652565》;20150626;1 *

Also Published As

Publication number Publication date
CN108536438A (en) 2018-09-14

Similar Documents

Publication Publication Date Title
KR101999409B1 (en) Formatting data by example
US8346889B1 (en) Event-driven module loading
CN108665239B (en) Workflow processing method, workflow processing device, computer equipment and storage medium
CN111708771A (en) Data duplicate checking method, device, equipment and computer storage medium
CN113407383B (en) Main and standby system switching method and device, server and main and standby system
US20220284020A1 (en) Data processing method, apparatus, and system
CN110716943A (en) Missing data additional recording method and device, computer equipment and storage medium
CN113535587B (en) Target application detection method and device and computer equipment
US20110078657A1 (en) Operation management server, rollback execution method, and rollback execution program
CN108536438B (en) Dotting module, method and computer readable medium for processing user behavior data
CN114647548A (en) Log generation method and device
US10467076B1 (en) System and method of input validation
US20210382764A1 (en) Comparisons of application programming interface interactions to determine compatibilities
CN111176987A (en) Method and device for uniformly outputting front-end log, computer equipment and storage medium
CN112817922B (en) Log dynamic printing method and device, computer equipment and storage medium
CN114756362A (en) Resource quota management method and system, intelligent terminal and storage medium
US20090313628A1 (en) Dynamically batching remote object model commands
CN112765188A (en) Configuration information processing method, configuration management system, electronic device, and storage medium
CN111061576A (en) Method and system for creating entity object
US7634684B2 (en) Intelligent configuration for restarting failed application server instances
CN116301758B (en) Rule editing method, device, equipment and medium based on event time points
US20240249011A1 (en) Time-delay-based access control for continuous integration pipelines
CN116955765A (en) Message pushing method, device, computer equipment, storage medium and product
CN115981968A (en) Method and device for monitoring pdf file loading, electronic equipment and storage medium
CN117648345A (en) Data verification method and device

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
TR01 Transfer of patent right

Effective date of registration: 20240117

Address after: Room 8434, Building 3, No. 3 Xijing Road, Badachu High tech Park, Shijingshan District, Beijing, 100000

Patentee after: Beijing Jinxin Ruitong Technology Co.,Ltd.

Address before: 430000 Wuhan Donghu Development Zone, Wuhan, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right