CN111382038B - Method, device, electronic equipment and storage medium for reporting service data - Google Patents

Method, device, electronic equipment and storage medium for reporting service data Download PDF

Info

Publication number
CN111382038B
CN111382038B CN201811626774.XA CN201811626774A CN111382038B CN 111382038 B CN111382038 B CN 111382038B CN 201811626774 A CN201811626774 A CN 201811626774A CN 111382038 B CN111382038 B CN 111382038B
Authority
CN
China
Prior art keywords
service data
control
user behavior
key path
interactive control
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
CN201811626774.XA
Other languages
Chinese (zh)
Other versions
CN111382038A (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 Microlive Vision Technology Co Ltd
Original Assignee
Beijing Microlive Vision 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 Beijing Microlive Vision Technology Co Ltd filed Critical Beijing Microlive Vision Technology Co Ltd
Priority to CN201811626774.XA priority Critical patent/CN111382038B/en
Publication of CN111382038A publication Critical patent/CN111382038A/en
Application granted granted Critical
Publication of CN111382038B publication Critical patent/CN111382038B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/535Tracking the activity of the user

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure provides a method, a device, an electronic device and a storage medium for reporting service data, wherein the method comprises the following steps: determining a key path corresponding to the interactive control identification according to the interactive control identification and the mapping relation between the locally stored control identification and the key path; acquiring service data associated with the user behavior event according to the determined key path; and sending the service data to a server. In the embodiment of the disclosure, for any interactive control needing to collect service data associated with a user behavior event, the service data associated with the user behavior event is determined according to the identifier of the interactive control and the mapping relation between the control identifier and the key path, and the service data is automatically reported to the server, so that the manual embedding of each interactive control needing the service data is not needed, the workload of manual embedding is reduced, and the embedding error rate is reduced.

Description

Method, device, electronic equipment and storage medium for reporting service data
Technical Field
The present disclosure relates to the field of computer processing technologies, and in particular, to a method and an apparatus for reporting service data, an electronic device, and a storage medium.
Background
When information is pushed to a user, in order to make content pushed to the user more conform to the preference of the user, it is necessary to know what operations the user specifically executes in an APP (Application, Application program), and usually, depending on some user events, for example, when the user clicks a certain button, an event is reported, so that what operations the user has is known according to the event, and the actions and preferences of the user are analyzed according to the obtained operations, and related content is pushed to the user according to the analyzed result.
At present, reporting of service data associated with a user event in an APP is generally implemented by a buried point, where the buried point sends a corresponding network request to report a user operation while executing the user operation. However, in practical applications, there are various operations in an APP, that is, thousands of embedded points are needed, but performing the embedded point operation and subsequently maintaining the embedded points require extremely large costs of manpower and material resources, which further causes a great waste of resources, and when a program is adjusted, the embedded points are very prone to errors.
Disclosure of Invention
The purpose of this disclosure is to solve at least one of the above technical drawbacks and to improve the user experience. The technical scheme adopted by the disclosure is as follows:
in a first aspect, the present disclosure provides a method for reporting service data, including:
determining a key path corresponding to the interactive control identification according to the interactive control identification and the mapping relation between the locally stored control identification and the key path;
acquiring service data associated with the user behavior event according to the determined key path;
and sending the service data to a server.
In an optional embodiment of the first aspect of the present disclosure, the acquiring, according to the determined key path, service data associated with a user behavior event includes:
determining a storage position for storing the service data according to the determined key path;
and acquiring the service data from the determined storage position.
In an optional embodiment of the first aspect of the disclosure, the method further comprises:
and receiving the mapping relation between the control identification and the key path sent by the server.
In an optional embodiment of the first aspect of the present disclosure, after receiving the mapping relationship between the control identifier and the key path sent by the server, the method further includes:
in an optional embodiment of the first aspect of the present disclosure, if a mapping relationship between the control identifier and the key path is locally stored, the stored mapping relationship is updated according to the currently received mapping relationship.
In an optional embodiment of the first aspect of the present disclosure, if the interactive control is a preconfigured interactive control that needs to collect user behavior events, the method further includes:
intercepting a system method which is corresponding to the interactive control and is used for realizing an interactive function corresponding to the interactive control after detecting the operation of a user on the interactive control;
executing a pre-configured method for collecting user behavior events corresponding to the interactive controls through a system method to obtain the user behavior events corresponding to the interactive controls;
and sending the user behavior event and the service data to a server.
In an optional embodiment of the first aspect of the present disclosure, a system method for intercepting an interaction control to implement an interaction function corresponding to the interaction control includes:
and performing hook operation on a system method corresponding to the interactive control and used for realizing the interactive function corresponding to the interactive control based on the method for collecting the user behavior event corresponding to the interactive control.
In a second aspect, the present disclosure provides an apparatus for reporting service data, where the apparatus includes:
the determining module is used for determining a key path corresponding to the interactive control identification according to the interactive control identification and the mapping relation between the locally stored control identification and the key path;
the service data acquisition module is used for acquiring service data associated with the user behavior event according to the determined key path;
and the service data sending module is used for sending the service data to the server.
In an optional embodiment of the second aspect of the present disclosure, when the service data obtaining module obtains the service data associated with the user behavior event according to the determined key path, the service data obtaining module is specifically configured to:
determining a storage space for storing the service data according to the determined key path;
and acquiring the service data from the determined storage space.
In an optional embodiment of the second aspect of the disclosure, the apparatus further comprises:
and the mapping relation receiving module is used for receiving the mapping relation between the control identification and the key path sent by the server.
In an optional embodiment of the second aspect of the present disclosure, the mapping relation receiving module is further configured to:
after receiving the mapping relation between the control identifier and the key path sent by the server, if the mapping relation between the control identifier and the key path is locally stored, updating the stored mapping relation according to the currently received mapping relation.
In an optional embodiment of the second aspect of the disclosure, the apparatus further comprises:
the behavior event acquisition module is used for intercepting a system method which is corresponding to the interaction control and is used for realizing an interaction function corresponding to the interaction control after detecting the operation of the user on the interaction control when the interaction control is a pre-configured interaction control needing to collect user behavior events; and executing a pre-configured method for collecting the user behavior event corresponding to the interactive control by the system method to obtain the user behavior event corresponding to the interactive control, and sending the user behavior event and the service data to the server.
In an optional embodiment of the second aspect of the present disclosure, when the behavior event collection module intercepts a system method corresponding to the interaction control and used for implementing an interaction function corresponding to the interaction control, the method is specifically configured to:
and performing hook operation on a system method corresponding to the interactive control and used for realizing the interactive function corresponding to the interactive control based on the method for collecting the user behavior event corresponding to the interactive control.
In a third aspect, the present disclosure provides an electronic terminal, comprising:
a processor and a memory;
a memory for storing computer operating instructions;
a processor for performing the method as shown in any embodiment of the first aspect of the present disclosure by invoking computer operational instructions.
In a fourth aspect, the present disclosure provides a computer storage medium having a computer program stored thereon, the storage medium having at least one instruction, at least one program, set of codes, or set of instructions stored thereon, the at least one instruction, at least one program, set of codes, or set of instructions being loaded and executed by a processor to implement a method as shown in any one of the embodiments of the first aspect of the disclosure.
The technical scheme provided by the embodiment of the disclosure has the following beneficial effects:
according to the method, the device, the electronic equipment and the storage medium for reporting the service data, for any interactive control needing to collect the user behavior event, after the operation of the user on the interactive control is detected, the user behavior event corresponding to the interactive control can be obtained by executing the preconfigured method for collecting the user behavior event corresponding to the interactive control, the service data associated with the user behavior event is obtained according to the key path corresponding to the identification of the interactive control, the collected user behavior event and the collected service data can be automatically reported to the server, and the manual embedding of each user behavior control needing to be collected in the prior art is not needed, so that the workload of manual embedding of points is effectively reduced, and the error rate of embedding points is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings used in the description of the embodiments of the present disclosure will be briefly described below.
Fig. 1 is a schematic flowchart of a method for reporting service data according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an apparatus for reporting service data according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below by referring to the drawings are exemplary only for explaining technical aspects of the present disclosure, and are not construed as limiting the present disclosure.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems in specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
An embodiment of the present disclosure provides a method for reporting service data, as shown in fig. 1, the method may include:
and S110, determining a key path corresponding to the interactive control identification according to the interactive control identification and the mapping relation between the locally stored control identification and the key path.
And step S120, acquiring service data associated with the user behavior event according to the determined key path.
Step S130, sending the service data to the server.
According to the method, the device, the electronic equipment and the storage medium for reporting the service data, for any interactive control needing to collect the service data associated with the user behavior event, the service data associated with the user behavior event can be determined according to the identification of the interactive control and the mapping relation between the control identification and the key path, and the service data is automatically reported to the server, so that the manual embedding of each interactive control needing the service data is not needed, the workload of manual embedding is reduced, and the embedding error rate is reduced.
The methods provided by the embodiments of the present disclosure are described in detail below.
And S110, determining a key path corresponding to the identification of the interactive control according to the identification of the interactive control and the mapping relation between the locally stored control and the key path.
The key path indicates a path with an arbitrary depth, the path points to a specific attribute of the object, such as a path that may specify an object ID (Identification) attribute, a path that may specify a Name attribute of the object, a path that may specify a URL (Uniform Resource Locator) attribute of the object, and the like, and different key paths indicate paths that point to different attributes of the object, and a certain attribute of the object may be obtained according to the key path after the key path is known. For example, the key path represents a path pointing to the ID attribute of the interactive control, and at this time, the ID of the interactive control can be obtained based on the key path.
In the mapping relationship between the identifier of the control and the key path, how many key paths the identifier of each control corresponds to, that is, how many attributes of the interactive object need to be acquired can be configured in advance, which is not limited in the embodiment of the present disclosure. For example, for the interaction control a, the interaction control a needs to acquire 2 attributes, at this time, the identifier of the interaction control a corresponds to two key paths, for the interaction control B, the interaction control B needs to acquire 1 attribute, and at this time, the identifier of the interaction control B only corresponds to 1 key path.
The identification of the interactive control can be preconfigured, for example, the identification of each interactive control can be set by a manual method, or the identification of the interactive control before being reused can be automatically tested. That is, in practical applications, an identifier needs to be made for each control in the APP in advance, so that an interactive control can be uniquely located through the identifier.
Correspondingly, after the interactive control is uniquely positioned according to the identification of the interactive control, and the mapping relation between the control and the key path is locally stored, the corresponding key path can be found according to the identification of the interactive control.
And step S120, acquiring service data associated with the user behavior event according to the determined key path.
The service data associated with the user behavior event refers to other data that can further represent the user behavior event, such as text or picture data that is acquired from a background (server) and displayed on a display interface, and what service data associated with the user behavior event needs to be acquired specifically for each interactive control can be configured according to actual needs. For example, for a UIbutton, that is, a button, whose interaction function is to implement that a user approves a certain video, the corresponding user behavior event may be "the user approves the video", and the service data associated with the user behavior event may be which video is specifically approved; for another example, for an interactive control that needs to collect a user behavior event to be UITableView, which video is specifically presented by the UITableView may be used as the service data associated with the user behavior event.
In the embodiment of the present disclosure, acquiring service data associated with a user behavior event according to a determined key path includes:
determining a storage position for storing the service data according to the determined key path;
and acquiring the service data from the determined storage position.
In practical application, the key path may point to a path of any depth, so that the key path may point to a storage location where the service data is stored, that is, the storage location where the service data is stored may be determined according to the key path, and after the storage location where the service data is stored is determined, the service data may be acquired based on the determined storage location.
In an example, if the interaction control element that needs to collect the user behavior event is UItableView, the user behavior event that needs to be collected is the playing time of the video, and the service data associated with the user behavior event is the video name. After the user clicks the UItableView, the playing time length of the UItableView is obtained through the mode, then the identifier of the UItableView and the mapping relation between the identifier of the control and the key path are obtained, the key path corresponding to the identifier of the UItableView is found, wherein the key path points to the path for obtaining the video name of the UItableView (namely the storage position for storing the service data), the storage position for storing the video name can be determined according to the path for pointing to the video name of the UItableView, and the video name, namely the service data related to the user behavior event, can be obtained in the determined storage position.
In the embodiment of the present disclosure, since the service data associated with the user behavior event is obtained, the analysis of the user preference can be more accurate, and it is ensured that the message pushed to the user better conforms to the user preference.
In an embodiment of the present disclosure, the method further includes:
and receiving the mapping relation between the control identification and the key path sent by the server.
In practical application, the control identifies the mapping relation with the key path. The method can be pre-configured in the server, so that when the storage position of a certain attribute of a certain interactive control is found to be changed, the key path corresponding to the attribute can be modified conveniently. Since the mapping relationship between the control identifier and the key path may be preconfigured in the server, the mapping relationship between the control identifier and the key path sent by the server needs to be received first, and then the mapping relationship between the control identifier and the key path needs to be stored locally.
In this embodiment of the present disclosure, after receiving the mapping relationship between the control and the key path sent by the server, the method further includes:
and if the mapping relation between the control and the key path is locally stored, updating the stored mapping relation according to the currently received mapping relation.
In practical application, after receiving the mapping relationship between the control identifier and the key path sent by the server, if a mapping relationship between the control identifier and the key path is already stored locally at this time, the stored control identifier and the key path need to be updated according to the currently received control identifier and key path. The stored control identifier and the key path are specifically updated in what manner, and may be configured in advance according to actual needs.
In an example, after receiving a mapping relationship between a control identifier and a key path sent by a server, if a mapping relationship between a control identifier and a key path is already stored locally at this time, it is determined whether a new correspondence between a control identifier and a key path is added to the received control identifier and the key path, or whether an original correspondence between an original control identifier and a key path is modified, if so, the newly added correspondence between the control identifier and the key path is added to the mapping relationship between the locally stored control identifier and the key path, or a changed part of the mapping relationship between the locally stored control identifier and the key path is modified, otherwise, the mapping relationship between the locally stored control identifier and the key path is not modified.
In another example, after receiving the mapping relationship between the control identifier and the key path sent by the server, if a mapping relationship between a control identifier and a key path is already stored locally at this time, the mapping relationship between the locally stored control identifier and a key path may be deleted, and the mapping relationship between the received control identifier and a key path may be saved.
Step S130, reporting the service data to a server.
In practical application, after the service data of the interactive control, which is associated with the user behavior event, is obtained, the obtained service data, which is associated with the user behavior event, is sent to the server, so that analysis can be performed according to the received service data, which is associated with the user behavior event, and the preference of the user can be better known.
In this disclosure, if the interactive control is a preconfigured interactive control that needs to collect user behavior events, the method further includes:
intercepting a system method which is corresponding to the interactive control and is used for realizing an interactive function corresponding to the interactive control after detecting the operation of a user on the interactive control;
executing a pre-configured method for collecting user behavior events corresponding to the interactive controls through a system method to obtain the user behavior events corresponding to the interactive controls;
and sending the user behavior event and the service data to a server.
In practical application, which interaction controls are specific to interaction controls that need to collect user behavior events may be preconfigured according to practical requirements, and the embodiment of the present disclosure is not limited. For example, the interaction control pieces that need to collect user behavior events may be configured as a cell, an ui view, a UIbutton, a table, a Gesture, and the like. Which user behavior events need to be collected specifically for each interaction control can also be set according to actual needs, for example, the user behavior events need to be collected in the interaction control UItableview can be the playing duration of a video, and the like.
The operation of the user on the interaction control means that the user selects the interaction control to indicate that the user wants to use the function corresponding to the interaction control, that is, the user selects the action of the interaction control. For example, when the interaction control needing to collect the user behavior event is a UIbutton, the user clicks the UIbutton to represent the operation of the user on the interaction control; for another example, when the interaction control needing to collect the user behavior event is gettrue, the Gesture of the user represents the operation of the user on the interaction control.
Correspondingly, after the operation of the user on the interactive control is detected, the user behavior event corresponding to the interactive control is obtained by intercepting the system method corresponding to the interactive control and used for realizing the interactive function corresponding to the interactive control and executing the pre-configured method for collecting the user behavior event corresponding to the interactive control through the system method.
The system method corresponding to the interactive control for realizing the interactive function corresponding to the interactive control refers to a method capable of realizing the interactive function corresponding to the interactive control, for example, for an interactive function corresponding to an interactive control UIbutton, music is played, and at this time, the method capable of realizing music playing is the system method corresponding to the interactive control UIbutton for realizing the corresponding interactive function. The method for collecting the user behavior event corresponding to the interactive control may be preconfigured according to actual requirements, and the embodiment of the disclosure is not limited.
In an example, for an interaction control UIbutton, a user behavior event that needs to be collected may be user behavior information generated by a user using the interaction control, for example, for a UIbutton with a function of playing music, a corresponding user behavior event may be "the user has played music", and at this time, a preconfigured method may be set as a method for collecting an interaction function (such as playing music) corresponding to the interaction control. For another example, the user behavior event that the interaction control UItableview needs to collect may be the playing time length of the video, and then the preconfigured method may be set as the method for collecting the playing time length of the video.
In the embodiment of the present disclosure, a system method for intercepting an interaction control performs a preconfigured method for collecting a user behavior event corresponding to the interaction control, including:
and performing hook operation on the system method corresponding to the interactive control based on the method for collecting the user behavior event corresponding to the interactive control.
The hook operation in the embodiment of the present disclosure, that is, the hook function, is not limited to the hook operation of the windows system, and also includes a processing method similar to a hook mechanism, and the execution logic function of a certain function of the target process can be modified through the hook operation. Generally speaking, hook is to execute the method to be implemented by intercepting some system function or system method of the operating system, that is, when the system calls the system function or system method of hook, the hook function will get control right first and execute the configured actual operation to be executed.
That is to say, in practical applications, when a user behavior event corresponding to the interactive control needs to be collected, hook operation may be performed on a system method corresponding to the interactive control, that is, a system method that the interactive control needs to invoke, so that when the user operation on the interactive control is received, the system method may be intercepted, and a method for collecting the user behavior event of the interactive control is executed, thereby collecting the user behavior event corresponding to the interactive control.
For different interactive controls, the specific implementation manner of hook is configured based on the specific type of the interactive control, that is, the implementation manner of hook is generally different for different interactive controls. For example, for an interactive control that needs to collect user behavior events, hook is generally a system method that needs to be called by the interactive control, so that when a user uses the interactive control by clicking or the like, the system executes a configured method for collecting the user behavior events corresponding to the interactive control when calling the system method, and further obtains the user behavior events corresponding to the interactive control.
In an example, if an interaction control element that needs to collect user behavior events is a UIbutton, that is, a button, and for the UIbutton, a system object corresponding to the UIbutton is a target, a system method for implementing an interaction function corresponding to the UIbutton is a selector method, and when the interaction function corresponding to the interaction control element does not need to be collected, after a user clicks the UIbutton, a message is sent to the selector of the target object, that is, a selector method is called, in the scheme of the embodiment of the present disclosure, when a user behavior event corresponding to the UIbutton needs to be collected, an add target of the target object can be called through hook: the selector method is used to execute a preconfigured method for collecting user behavior events, such as when actually writing code, hook add target can be written as: a selector: . In the method, a target object of the UIButton is obtained, and then a hook selector: xxx can be written into a hook selector method of hook for the target, wherein xxx is a preconfigured method for collecting user behavior events, after a user clicks the UIButton, the preconfigured method for collecting the user behavior events is automatically executed to collect the user behavior events, for example, the preconfigured method is a reporting operation, and the corresponding operation events are automatically reported when the user clicks the button, that is, the operation time of the user on the button is reported to a server.
In another example, if the interaction control element that needs to collect the user behavior event is UITableView, the user behavior event may be a play duration of a video under the UITableView, for the UITableView, a system object corresponding to the UITableView is delegatet, and the system method for implementing the interaction function corresponding to the UITableView is setdelegatate method.
When the user behavior event corresponding to the UITableView does not need to be collected, after the user clicks the UITableView, a tableview: didSelectCellAtIndexPath: message is sent to the delete object. In the scheme of the embodiment of the disclosure, when a user behavior event corresponding to the UITableView needs to be collected, a delete of the tableview can be obtained by calling a setdelegat method from a delete object through a hook, and then a preconfigured method for collecting the user behavior event is executed by using a method of retrieving the delegat of the delete. For example, in practical applications, the preconfigured method for collecting the playing time of the video may be set as a hook cell applet and a hook cell dispcut, when the user clicks the UITableView, the hook cell applet method is automatically executed to obtain a playing time node of the video, and when the video playing is finished, the hook cell dispcut method is called to obtain an ending time node of the video, so that the playing time can be calculated according to the two time nodes.
It should be noted that, for other interaction controls that need to collect user behavior events, such as gettrue, the adopted mode is similar to the principle of the method in the above example, and the core principle is implemented in the IOS Runtime (IOS Runtime), i.e., hook, i.e., the system object and method corresponding to the hook interaction control, and is not described herein again.
Further, after the user behavior event and the service data are obtained, the user behavior event and the service data are sent to the server.
In practical application, after the user behavior event and the service data of the interactive control are obtained, the obtained user behavior event and the obtained service data are sent to the server, so that analysis can be performed according to the reported user behavior event and the reported service data, and the preference of the user can be better known. For example, the obtained user behavior event is the playing duration of the video, the service data associated with the user behavior event is the video name, and at this time, the playing duration and the video name of the video can be sent to the server.
Based on the same principle as the method shown in fig. 1, an embodiment of the present disclosure further provides an apparatus 20 for reporting service data, where as shown in fig. 2, the apparatus 20 may include: a determination module 210, a service data acquisition module 220, and a service data transmission module 230, wherein,
the determining module 210 is configured to determine a key path corresponding to the identifier of the interactive control according to the identifier of the interactive control and a mapping relationship between the locally stored control identifier and the key path;
the service data acquisition module 220 is configured to acquire service data associated with the user behavior event according to the determined key path;
a service data sending module 230, configured to send the service data to the server.
In the embodiment of the present disclosure, when the service data obtaining module obtains the service data associated with the user behavior event according to the determined key path, the service data obtaining module is specifically configured to:
determining a storage space for storing the service data according to the determined key path;
and acquiring the service data from the determined storage space.
In the embodiment of the present disclosure, the apparatus further includes:
and the mapping relation receiving module is used for receiving the mapping relation between the control identification and the key path sent by the server.
In the embodiment of the present disclosure, the mapping relationship receiving module is further configured to:
after receiving the mapping relation between the control identifier and the key path sent by the server, if the mapping relation between the control identifier and the key path is locally stored, updating the stored mapping relation according to the currently received mapping relation.
In the embodiment of the present disclosure, the apparatus may further include:
the behavior event acquisition module is used for intercepting a system method which is corresponding to the interaction control and is used for realizing an interaction function corresponding to the interaction control after detecting the operation of the user on the interaction control when the interaction control is a pre-configured interaction control needing to collect user behavior events; and executing a pre-configured method for collecting the user behavior event corresponding to the interactive control by the system method to obtain the user behavior event corresponding to the interactive control, and sending the user behavior event and the service data to the server.
In the embodiment of the present disclosure, when the behavior event collection module intercepts a system method corresponding to the interactive control and used for implementing an interactive function corresponding to the interactive control, the method is specifically configured to:
and performing hook operation on a system method corresponding to the interactive control and used for realizing the interactive function corresponding to the interactive control based on the method for collecting the user behavior event corresponding to the interactive control.
Based on the same principle as the method for reporting service data in the embodiment of the present disclosure, an embodiment of the present disclosure further provides an electronic device, where the electronic device may include but is not limited to: a processor and a memory; a memory for storing computer operating instructions; and the processor is used for executing the method shown in the embodiment by calling the computer operation instruction.
Based on the same principle as the method for reporting service data in the embodiment of the present disclosure, an embodiment of the present disclosure further provides a computer storage medium, where a computer program is stored on the computer storage medium, the computer storage medium stores at least one instruction, at least one section of program, a code set, or an instruction set, and the at least one instruction, the at least one section of program, the code set, or the instruction set is loaded and executed by a processor to implement the method shown in the embodiment, which is not described herein again.
In the scheme of the embodiment of the disclosure, for any interactive control needing to collect service data associated with a user behavior event, the service data associated with the user behavior event is determined according to the identifier of the interactive control and the mapping relation between the control identifier and the key path, and the service data is automatically reported to the server, so that each interactive control needing the service data does not need to be manually embedded with points, the workload of manual embedding of points is reduced, and the error rate of embedding points is reduced.
Referring now to fig. 3, a schematic diagram of an electronic device 300 suitable for implementing embodiments of the present disclosure is shown, where the electronic device 300 may be a terminal device or a server. The terminal device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal (e.g., a car navigation terminal), etc., and a fixed terminal such as a digital TV, a desktop computer, etc., among others. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, the electronic device 300 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage means 308 into a Random Access Memory (RAM) 303. In the RAM303, various programs and data necessary for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM302, and the RAM303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device 300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. 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 in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (7)

1. A method for reporting service data is characterized by comprising the following steps:
receiving and storing a mapping relation between a control identifier and a key path sent by a server;
determining a key path corresponding to the interactive control identification according to the interactive control identification and the mapping relation between the locally stored control identification and the key path;
determining a storage position for storing the service data according to the determined key path, and acquiring the service data associated with the user behavior event from the determined storage position;
and sending the service data to the server.
2. The method according to claim 1, wherein after receiving the mapping relationship between the control identifier sent by the server and the key path, further comprising:
and if the mapping relation between the control identification and the key path is locally stored, updating the stored mapping relation according to the currently received mapping relation.
3. The method of any of claims 1-2, wherein if the interactive control is a preconfigured interactive control that requires a collection of user behavior events, the method further comprises:
intercepting a system method which is corresponding to the interaction control and is used for realizing an interaction function corresponding to the interaction control after the operation of a user on the interaction control is detected;
executing a preconfigured method for collecting user behavior events corresponding to the interactive control through the system method to obtain the user behavior events corresponding to the interactive control;
and sending the user behavior event and the service data to a server.
4. The method of claim 3, wherein intercepting the system method corresponding to the interaction control for implementing the interaction function corresponding to the interaction control comprises:
and based on the method for collecting the user behavior event corresponding to the interactive control, performing hook operation on a system method corresponding to the interactive control and used for realizing the interactive function corresponding to the interactive control.
5. An apparatus for reporting service data, comprising:
the mapping relation receiving module is used for receiving and storing the mapping relation between the control identification and the key path sent by the server;
the determining module is used for determining a key path corresponding to the interactive control identification according to the interactive control identification and the mapping relation between the locally stored control identification and the key path;
the service data acquisition module is used for determining a storage space for storing the service data according to the determined key path and acquiring the service data related to the user behavior event from the determined storage space;
and the service data sending module is used for sending the service data to the server.
6. An electronic device, comprising:
a processor and a memory;
the memory is used for storing computer operation instructions;
the processor is used for executing the method of any one of the claims 1 to 4 by calling the computer operation instruction.
7. A computer storage medium, having a computer program stored thereon, the storage medium having a computer program stored thereon, which is loaded and executed by a processor to implement the method of any of the preceding claims 1 to 4.
CN201811626774.XA 2018-12-28 2018-12-28 Method, device, electronic equipment and storage medium for reporting service data Active CN111382038B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811626774.XA CN111382038B (en) 2018-12-28 2018-12-28 Method, device, electronic equipment and storage medium for reporting service data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811626774.XA CN111382038B (en) 2018-12-28 2018-12-28 Method, device, electronic equipment and storage medium for reporting service data

Publications (2)

Publication Number Publication Date
CN111382038A CN111382038A (en) 2020-07-07
CN111382038B true CN111382038B (en) 2022-01-04

Family

ID=71214695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811626774.XA Active CN111382038B (en) 2018-12-28 2018-12-28 Method, device, electronic equipment and storage medium for reporting service data

Country Status (1)

Country Link
CN (1) CN111382038B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817782B (en) * 2021-02-20 2023-10-13 腾讯科技(深圳)有限公司 Data acquisition reporting method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104267958A (en) * 2014-09-29 2015-01-07 北京网秦天下科技有限公司 Mobile application container and management method thereof
CN106502672A (en) * 2016-10-21 2017-03-15 用友网络科技股份有限公司 A kind of method that document information is shown with different grain size
CN107018046A (en) * 2017-06-06 2017-08-04 上海鋆创信息技术有限公司 A kind of collecting method, device, terminal and storage medium
CN107423048A (en) * 2017-04-14 2017-12-01 网易乐得科技有限公司 Method, apparatus, medium and the computing device of Data Collection

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104267958A (en) * 2014-09-29 2015-01-07 北京网秦天下科技有限公司 Mobile application container and management method thereof
CN106502672A (en) * 2016-10-21 2017-03-15 用友网络科技股份有限公司 A kind of method that document information is shown with different grain size
CN107423048A (en) * 2017-04-14 2017-12-01 网易乐得科技有限公司 Method, apparatus, medium and the computing device of Data Collection
CN107018046A (en) * 2017-06-06 2017-08-04 上海鋆创信息技术有限公司 A kind of collecting method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN111382038A (en) 2020-07-07

Similar Documents

Publication Publication Date Title
CN109582310B (en) Data processing method and device, electronic equipment and computer readable storage medium
CN109857506B (en) Method and device for realizing guide information, electronic equipment and storage medium
CN109408481B (en) Log collection rule updating method and device, electronic equipment and readable medium
CN110209315B (en) Method and device for displaying characters in user interface, electronic equipment and storage medium
CN111897740B (en) User interface testing method and device, electronic equipment and computer readable medium
CN113254105B (en) Resource processing method and device, storage medium and electronic equipment
CN109618216B (en) Method, device and equipment for displaying video loading state identification and storage medium
CN112953791A (en) Network detection method and device, electronic equipment and computer readable storage medium
CN110618768B (en) Information presentation method and device
CN111694629A (en) Information display method and device and electronic equipment
CN111382039A (en) Method, device, electronic equipment and storage medium for reporting user behavior event
CN111382038B (en) Method, device, electronic equipment and storage medium for reporting service data
CN112905281A (en) View display method and device, electronic equipment and storage medium
CN110069186B (en) Method and equipment for displaying operation interface of application
CN111382058B (en) Service testing method and device, server and storage medium
CN110619101B (en) Method and apparatus for processing information
CN111767062A (en) Application configuration data updating method, device, equipment and storage medium
CN111198853A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111367592B (en) Information processing method and device
WO2020224295A1 (en) Information management method, device, and system
CN110086880B (en) Method and apparatus for creating instances of network requests
CN111382057B (en) Test case generation method, test method and device, server and storage medium
CN115391770A (en) Program monitoring method, device, electronic equipment and computer readable storage medium
CN111294657A (en) Information processing method and device
CN111212296A (en) Live broadcast room gift list configuration method, device, medium and electronic equipment

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