CN107729482B - Method and device for collecting logs - Google Patents

Method and device for collecting logs Download PDF

Info

Publication number
CN107729482B
CN107729482B CN201710962278.0A CN201710962278A CN107729482B CN 107729482 B CN107729482 B CN 107729482B CN 201710962278 A CN201710962278 A CN 201710962278A CN 107729482 B CN107729482 B CN 107729482B
Authority
CN
China
Prior art keywords
client
jump
information
user
source
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
CN201710962278.0A
Other languages
Chinese (zh)
Other versions
CN107729482A (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 Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710962278.0A priority Critical patent/CN107729482B/en
Publication of CN107729482A publication Critical patent/CN107729482A/en
Application granted granted Critical
Publication of CN107729482B publication Critical patent/CN107729482B/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

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)

Abstract

The embodiment of the invention discloses a method and a device for collecting logs, and relates to the technical field of computers. Wherein, the method comprises the following steps: when a trigger event for switching the client is monitored, sending a skip request to a target client; under the condition of receiving the information of successful skip returned by the target client, generating a client switching identifier; and reporting the user log comprising the client switching identifier to a server. By the method, the user jumping from one client to another client can be effectively marked, and the traffic data of the jumping user can be rapidly and accurately identified by the server.

Description

Method and device for collecting logs
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for collecting logs.
Background
With the progress of computer software and hardware technology, the forms of clients are more and more diversified. For example, for a certain client, there may be a personal computer web page side, a mobile phone APP (application program) side, and the like.
A user is likely to jump from one form of client to another while browsing pages. For example, when browsing a certain shopping client, a user may switch from the mobile phone webpage end of the shopping client to the mobile phone APP end of the shopping client.
Due to the fact that the user skipping condition exists, when the server side counts the traffic indexes aiming at the client side before skipping, the phenomenon that the UV (independent visitor number) amplification is far larger than the PV (page view volume) amplification is likely to occur. For example, for a certain mobile phone web page, the initial time of the mobile phone web page is 10 UV value and the initial time of the mobile phone web page is 50 PV value. If the user A continuously visits 5 pages on the mobile phone webpage end, the amplification of the UV value of the mobile phone webpage end is 0.1 compared with the initial time, and the amplification of the PV value is 0.1 compared with the initial time. If the user A accesses a page on the webpage end of the mobile phone and then jumps to the APP end, the amplification of UV is 0.1, and the amplification of PV is 0.02. Clearly, the user jump situation results in a much greater UV amplification than PV amplification.
In order to keep the UV and PV amplification of the client consistent as much as possible, the traffic data of the jumping user needs to be removed. In the prior art, the following scheme is generally adopted for removing the flow data of the jumping user: the access depth of each user in the offline data warehouse flow table (namely the number of pages accessed by the user on the website) is counted, and then the user data with the access depth equal to 1 is removed. That is, in the prior art, a user with an access depth equal to 1 is considered as a jumping user, and a user with an access depth greater than 1 is considered as a non-jumping user.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: in the prior art, the server cannot directly distinguish the flow data of the jumping user from the flow data of the non-jumping user, and only counts the access depth and judges the jumping user and the non-jumping user according to the access depth. This approach is relatively crude and does not effectively identify the jumping user.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for collecting logs, so as to effectively mark a user jumping from one client to another client, thereby facilitating a server to quickly and accurately identify traffic data of the user jumping.
To achieve the above object, according to one aspect of the present invention, there is provided a method of collecting logs.
The method for collecting the logs comprises the following steps: when a trigger event for switching the client is monitored, sending a skip request to a target client; under the condition of receiving the information of successful skip returned by the target client, generating a client switching identifier; and reporting the user log comprising the client switching identifier to a server.
In one embodiment, the jump request includes a source client identification.
In one embodiment, after the step of sending the jump request to the target client is performed, the method further comprises: confirming that the information returned by the target client is received within the preset time; and the information returned by the target client is the information of successful jump or the information of failed jump.
In one embodiment, a source client in the trigger event of the switching client is a web page end, and a target client is an APP end.
To achieve the above object, according to another aspect of the present invention, there is provided another method of collecting logs.
The method for collecting the logs comprises the following steps: receiving a skip request of a source client; the skip request comprises a source client identifier; after the jump is successful according to the jump request, generating a user log comprising the source client identifier; and reporting the user log to a server.
In one embodiment, the method further comprises: after the jump is successful according to the jump request, the information of successful jump is sent to the source client; and after the jump fails according to the jump request, sending information of the jump failure to the source client.
To achieve the above object, according to still another aspect of the present invention, there is provided an apparatus for collecting logs.
The apparatus for collecting logs of the present invention comprises: the sending module is used for sending a skip request to the target client when a trigger event for switching the client is monitored; the generating module is used for generating a client switching identifier under the condition of receiving the information of successful skip returned by the target client; and the reporting module is used for reporting the user log comprising the client switching identifier to a server.
In one embodiment, the jump request includes a source client identification.
In one embodiment, the apparatus further comprises: the confirmation module is used for confirming that the information returned by the target client is received within the preset time after the sending module sends the jump request to the target client; and the information returned by the target client is the information of successful jump or the information of failed jump.
In one embodiment, a source client in the trigger event of the switching client is a web page end, and a target client is an APP end.
To achieve the above object, according to still another aspect of the present invention, there is provided another apparatus for collecting logs.
The apparatus for collecting logs of the present invention comprises: the receiving module is used for receiving a skip request of a source client; the skip request comprises a source client identifier; the generating module is used for generating a user log comprising the source client identifier after the jump is successful according to the jump request; and the reporting module is used for reporting the user log to a server.
In one embodiment, the apparatus further comprises: the sending module is used for sending information of successful skip to the source client after the skip is successful according to the skip request; and the source client is also used for sending the information of the jump failure to the source client after the jump failure is carried out according to the jump request.
To achieve the above object, according to still another aspect of the present invention, there is provided a terminal device.
The terminal device of the present invention includes: one or more processors; and storage means for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the method for collecting logs of the embodiment of the present invention.
To achieve the above object, according to still another aspect of the present invention, there is provided a computer-readable medium.
The computer readable medium of the present invention has stored thereon a computer program which, when executed by a processor, implements the method of collecting logs of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps of sending a skip request to a target client when a trigger event of switching the client is monitored, generating a client switching identifier under the condition that information of successful skip returned by the target client is received, reporting a user log comprising the client switching identifier to a server, and the like, so that users skipping from one client to another client can be accurately marked, and the server can be further facilitated to quickly and accurately identify flow data of skip users in a source client.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a method of collecting logs according to one embodiment of the invention;
FIG. 2 is a schematic diagram of a method of collecting logs according to another embodiment of the invention;
FIG. 3 is a schematic diagram of a method of collecting logs according to yet another embodiment of the invention;
FIG. 4 is a schematic diagram of an apparatus for collecting logs, according to one embodiment of the present invention;
FIG. 5 is a schematic diagram of an apparatus for collecting logs in accordance with another embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 7 is a block diagram of a computer system suitable for use with a terminal device implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
FIG. 1 is a schematic diagram of a method of collecting logs according to one embodiment of the invention. The method of the embodiment of the invention is executed by a source client. As shown in fig. 1, the method of the embodiment of the present invention includes:
step S101, when a trigger event for switching the client is monitored, a skip request is sent to the target client.
For example, the trigger event for switching the client may be a trigger event for switching from a webpage end to an APP (application program) end. That is, the source client is a web page side, and the target client is an APP side. For example, when a user accesses a mobile phone webpage end of a certain shopping platform, the user clicks a button on a certain page for switching to a mobile phone APP end of the shopping platform. And when monitoring the event that the user clicks the button, the mobile phone webpage end sends a skip request to the mobile phone APP end of the shopping platform.
In addition, the trigger event for switching the client may also be a trigger event for switching from the APP end to the web page end. For example, when a user accesses a mobile phone APP of a certain social platform, the user clicks a button on a certain page for switching to a mobile phone web page of the social platform. And when monitoring the event that the user clicks the button, the APP terminal of the mobile phone sends a skip request to the webpage terminal of the mobile phone of the social contact platform.
And step S102, under the condition that the information of successful skip returned by the target client is received, generating a client switching identifier.
Wherein the client switch identifier is used to mark a client switch event, which may take the form of "source client-target client". Illustratively, when the source client is a mobile phone web page end and the target client is a mobile phone APP end, a custom variable, namely, a flag, of a map type, may be added to a JS script of the mobile phone web page end for storing the client switching identifier. After the mobile phone webpage end confirms that the information of successful skip returned by the mobile phone APP end is received, a variable viewer _ alt _ flag is assigned to be M-APP. The client switching identifier "M-APP" may indicate that the mobile phone web page is switched to the mobile phone APP. Those skilled in the art can make modifications to the types of custom variables, variable names, and client switch identifiers without affecting the practice of the present invention.
And step S103, reporting the user log comprising the client switching identifier to a server.
In a specific implementation, the user log further includes: user identification, log collection time and the like. After receiving the user log reported by the source client, the server can quickly identify the flow data of the jumping user and the non-jumping user by judging whether the user log comprises the client switching identifier.
In the embodiment of the invention, when the trigger event of switching the client is monitored, the jump request is sent to the target client, the client switching identifier is generated under the condition that the information of successful jump returned by the target client is received, the user log comprising the client switching identifier is reported to the server, and the like, so that the user jumping from one client to another client can be accurately marked, and the server can be further facilitated to quickly and accurately identify the flow data of the jump user in the source client.
Fig. 2 is a schematic diagram of a method of collecting logs according to another embodiment of the present invention. The method of the embodiment of the invention is executed by a source client, the source client is a mobile phone webpage end (M end for short), and the target client is a mobile phone APP end. As shown in fig. 2, a method for collecting logs according to an embodiment of the present invention includes:
step S201, the user browses the M end of the A website.
During specific implementation, a button for switching to the APP end of the mobile phone can be set on some pages of the M end, and an event that the user clicks the button is monitored through a JS script (JavaScript, which is an object-and event-driven client-side scripting language) of the M end.
Step S202, when the M terminal monitors a click event for switching to the mobile phone APP terminal, a skip request is sent to the mobile phone APP terminal through a protocol.
Wherein the skip request may include an identification of the source client. For example, a jump request from the M-side to the APP-side of the mobile phone is: sdkmobile:// communicating params { "to": "home", "M _ param": '+ clparams +', "viewer _ org _ play": "M" }. In the jump request, "open APP:// communication" represents a protocol address agreed by both the M-side and the mobile phone APP-side, "params { }" represents a parameter and a parameter value carried in the jump request, "viewer _ org _ play" represents a variable storing an identifier of the source client, and "M" represents an identifier of the source client, that is, a mobile phone web page side.
Step S203, when the M end does not monitor the click event of switching to the mobile phone APP end, the M end normally reports the log.
And step S204, the M terminal judges whether the information returned by the APP terminal of the mobile phone is received within the preset time.
The returned information is information of success of the jump or information of failure of the jump, and the preset time may be 200 ms. In the specific implementation, a person skilled in the art can set the value of the preset time according to the requirement. In this step, if the M-side receives the information returned by the APP-side of the mobile phone within the preset time, step S205 is executed; if the M-side does not receive the information returned by the APP-side of the mobile phone within the preset time, the M-side does not execute step S205, but reports the log to the server normally.
By executing the step S204, program abnormality caused by that information returned by the APP end of the mobile phone cannot be received for a long time can be avoided, so that the robustness of the method for collecting logs in the present invention is improved. It should be noted that step S204 is an optional step. In another embodiment of the present invention, step S205 may be directly performed after step S202 is performed.
And step S205, judging whether the returned information is the information of successful jump.
In this step, if the information returned by the mobile phone APP end is the information that the jump is successful, step S206 is executed; if the information returned by the mobile phone APP end is the information of the jump failure, the M end normally reports the log to the server side without executing step S206.
By executing step S205, after it is ensured that the jump to the mobile phone APP end is successful, the client switching identifier can be generated again, so that the reliability of the method for collecting logs is improved.
And S206, the M terminal generates a client switching identifier.
Illustratively, under the condition that the M end receives the information of successful skip returned by the APP end of the mobile phone, a custom variable, namely, a flag, of a map type, may be added to the JS script of the M end, so as to store the client switching identifier. And, the value of the variable monitor _ alt _ flag is configured as "M-APP".
Step S207, the M end reports the user log including the client switching identification to the server end.
In specific implementation, the user log reported by the M-side further includes: user identification, log collection time and the like.
In the embodiment of the invention, the user jumping from the M end to the APP end of the mobile phone can be effectively marked through the process, so that the service end can accurately and quickly distinguish the flow data of the jumping user and the non-jumping user reported by the M end. Furthermore, the behavior of the jumping user and the behavior of the non-jumping user can be analyzed independently by the server side, so that the phenomenon that the UV amplification of the M end is inconsistent with the PV amplification is avoided as much as possible. In addition, by introducing step S204 and step S205, the robustness and reliability of the method of collecting logs of the embodiment of the present invention can be further improved.
Fig. 3 is a schematic diagram of a method of collecting logs according to still another embodiment of the present invention. The method of the embodiment of the invention is executed by the target client. As shown in fig. 3, a method for collecting logs according to an embodiment of the present invention includes:
and S301, receiving a jump request of a source client. The jump request includes a source client identification.
Illustratively, the source client is a mobile phone web page side (M side for short), and the target client is a mobile phone APP side. In specific implementation, a certain skip request received by the APP end of the mobile phone may be: sdkmobile:// communication? "to": home "," M _ param ": '+ clspaarams +'," viewer _ org _ play ": M" }. In the jump request, "open APP:// communication" represents a protocol address agreed by both the M-side and the mobile phone APP-side, "params { }" represents a parameter and a parameter value carried in the jump request, "viewer _ org _ play" represents a variable storing an identifier of the source client, and "M" represents an identifier of the source client, that is, a mobile phone web page side.
And step S302, under the condition that the target client successfully jumps according to the jump request, sending information of successful jump to the source client.
Illustratively, when the target client is a mobile phone APP and the source client is an M-client, if the mobile phone APP successfully skips, a return value "success" may be returned to the M-client through a callback function. After step S302, step S304 is performed.
Step S303, under the condition that the target client fails to jump according to the jump request, the target client sends information of the jump failure to the source client.
After step S303, the target ue reports the log to the server normally. It should be noted that steps S302 and S303 are optional steps. In another embodiment of the method for collecting logs performed by the target client, after the target client successfully jumps, step S304 may be directly performed without performing step S302.
Step S304, generating a user log comprising the source client identifier.
Illustratively, when the target client is a mobile phone APP, the mobile phone APP may first parse the identifier of the source client from the skip request, and store the identifier of the source client in the memory. Then, the source client identifier can be read from the memory through an SDK (Software Development Kit) at the APP end of the mobile phone, and a user log including the source client identifier is generated. In a specific implementation, the user log further includes: user identification, log collection time and the like.
Step S305, reporting the user log to a server.
In the embodiment of the invention, the source client identifier is carried in the skip request of the source client, the user log comprising the source client identifier is generated, and the user log is reported to the server, so that the server can analyze the drainage effect of the source client according to the log collected by the target client. In addition, after the target client successfully jumps, the information of successful jumping is sent to the source client, so that the source client can accurately mark the jumping user.
Fig. 4 is a schematic diagram of an apparatus for collecting logs according to one embodiment of the present invention. The device for collecting the logs is arranged at the source client side. As shown in fig. 4, an apparatus 400 for collecting logs according to an embodiment of the present invention includes: a sending module 401, a generating module 402, and a reporting module 403.
A sending module 401, configured to send a skip request to a target client when a trigger event for switching the clients is monitored.
For example, the trigger event for switching the client may be a trigger event for switching from the webpage end to the APP end. That is, the source client is a web page side, and the target client is an APP side. For example, when a user accesses a mobile phone webpage end of a certain shopping platform, the user clicks a button on a certain page for switching to a mobile phone APP end of the shopping platform. When monitoring an event of clicking the button, the sending module 401 sends a skip request to the mobile phone APP end of the shopping platform.
In addition, the trigger event for switching the client may also be a trigger event for switching from the APP end to the web page end. For example, when a user accesses a mobile phone APP of a certain social platform, the user clicks a button on a certain page for switching to a mobile phone web page of the social platform. When monitoring an event that the user clicks the button, the sending module 401 sends a skip request to the mobile phone web page of the social platform.
Wherein the skip request may include an identification of the source client. For example, a jump request from a web page end of a mobile phone to an APP end of the mobile phone is: sdkmobile:// communicating params { "to": "home", "M _ param": '+ clparams +', "viewer _ org _ play": "M" }. In the jump request, "open APP:// communication" represents a protocol address agreed by both the mobile phone webpage end and the mobile phone APP end, "params { }" represents a parameter and a parameter value carried in the jump request, "viewer _ org _ play" represents a variable storing the source client identifier, "M" represents the source client identifier, i.e., the mobile phone webpage end.
A generating module 402, configured to generate a client switching identifier when receiving information that the jump is successful, where the information is returned by the target client.
Wherein the client switch identifier is used to mark a client switch event, which may take the form of "source client-target client". For example, when the source client is a mobile phone web page end and the target client is a mobile phone APP end, the generating module 402 may add a custom variable, namely, a flag of map type, to the JS script, and after it is determined that information of success of the jump returned by the mobile phone APP end is received, assign the variable, namely, the flag of map type, to "M-APP". The client switching identifier 'M-APP' indicates switching from the mobile phone webpage end to the mobile phone APP end. Those skilled in the art can make modifications to the types of custom variables, variable names, and client switch identifiers without affecting the practice of the present invention.
A reporting module 403, configured to report the user log including the client switching identifier to a server.
In specific implementation, the jumping user log further includes: and collecting information such as time and user identification of the log.
Further, in this embodiment of the present invention, the apparatus for collecting logs may further include: and a confirmation module. And the confirmation module is configured to confirm that the information returned by the target client is received within a preset time after the sending module 401 sends the skip request to the target client.
And the information returned by the target client is the information of successful jump or the information of failed jump. In specific implementation, if the confirmation module confirms that the information returned by the target client is received within the preset time, whether the returned information is the information that the jump is successful is further judged. Under the condition that the returned information is the information of successful skip, the generation module 402 generates a client switching identifier; if the confirmation module does not receive the information returned by the target client within the preset time, the function of the generation module is not executed, and the log is normally reported to the server by the source client. In addition, in the specific implementation, a person skilled in the art can set the value of the preset time according to the requirement. For example, the preset time may be 200 ms.
By arranging the confirmation module, program abnormity caused by that information returned by the target client cannot be received for a long time can be avoided, and therefore the robustness of the log collection device is improved. It is noted that the validation module is an optional module. In another embodiment of the present invention, the apparatus for collecting logs provided to the source client may not include the confirmation module.
In the embodiment of the invention, when the sending module monitors the trigger event of switching the client, the sending module sends the jump request to the target client, and after the information of successful jump is received, the generating module generates the client switching identifier, so that the user jumping from the source client to the target client can be accurately and effectively marked. Furthermore, the user log comprising the client switching identifier is reported to the server through the reporting module, so that the server can accurately and quickly distinguish the flow data of the jumping user and the non-jumping user reported by the source client. Furthermore, the behavior of the jumping user and the behavior of the non-jumping user can be analyzed independently by the server side, so that the phenomenon that the UV amplification of the source client side is inconsistent with the PV amplification is avoided as much as possible.
Fig. 5 is a schematic diagram of an apparatus for collecting logs according to another embodiment of the present invention. The device for collecting the logs is arranged at the target client side. As shown in fig. 5, an apparatus 500 for collecting logs according to an embodiment of the present invention includes: a receiving module 501, a sending module 502, a generating module 503, and a reporting module 504.
A receiving module 501, configured to receive a skip request of a source client. The skip request includes an identification of the source client.
Illustratively, the source client is a mobile phone web page side (M side for short), and the target client is a mobile phone APP side. In a specific implementation, a certain skip request received by the receiving module may be: sdkmobile:// communication? "to": home "," M _ param ": '+ clspaarams +'," viewer _ org _ play ": M" }. In the jump request, "open APP:// communication" represents a protocol address agreed by both the M-side and the mobile phone APP-side, "params { }" represents a parameter and a parameter value carried in the jump request, "viewer _ org _ play" represents a variable storing an identifier of the source client, and "M" represents an identifier of the source client, that is, a mobile phone web page side.
A sending module 502, configured to send information that the target client successfully jumps to the source client after the target client successfully jumps according to the jump request. The sending module 502 is further configured to send the information of the jump failure to the source client after the target client fails to jump according to the jump request.
Illustratively, when the target client is a mobile phone APP end and the source client is an M end, after the mobile phone APP end successfully jumps, the sending module 502 may return a return value "success" to the M end through a callback function; after the jump of the APP end of the mobile phone fails, the sending module 502 may return a return value "error" to the M end through the callback function.
In the embodiment of the present invention, by setting the sending module 502, the source client can generate the client switching identifier after the target client successfully jumps, which is convenient for the log collecting device set in the source client to accurately and effectively mark the user jumping from the source client to the target client. It is noted that the sending module 502 is an optional module. In another embodiment, the sending module may not be provided in the apparatus for collecting logs 500 provided in the target client.
And a generating module 503, configured to generate a user log including a source client identifier after the target client successfully jumps according to the jump request.
In specific implementation, when the target client is a mobile phone APP, the function of the generating module 503 may be implemented by an SDK (Software Development Kit). After the receiving module 501 receives the skip request, the identifier of the source client may be parsed from the skip request, and the identifier of the source client may be stored in the memory. And then, reading the identifier of the source client from the memory through the SDK, and generating a user log comprising the identifier of the source client. In addition, in specific implementation, the user log generated by the SDK further includes: user identification, log collection time and the like.
A reporting module 504, configured to report the user log to a server.
In the embodiment of the invention, the receiving module receives the jump request comprising the source client identifier, the generating module generates the user log comprising the source client identifier, and the reporting module reports the user log to the server, so that the server can analyze the drainage effect from the source client according to the log data collected by the target client. In addition, the information of the skipping success or skipping failure is sent to the source client through the sending module, so that the source client can mark the skipping user accurately.
Fig. 6 illustrates an exemplary system architecture 600 to which the method of collecting logs or the apparatus for collecting logs of the embodiments of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. Various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like, may be installed on the terminal devices 601, 602, and 603.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server that provides various services, such as a background management server that supports shopping websites browsed by users using the terminal devices 601, 602, and 603. The background management server can analyze and process the received flow data and feed back the processing result to the terminal equipment.
It should be noted that the method for collecting logs provided by the embodiment of the present invention is generally executed by a terminal device, and accordingly, the apparatus for collecting logs is generally disposed in the terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
FIG. 7 illustrates a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the invention. The computer system illustrated in FIG. 7 is only an example and should not impose any limitations on the scope of use or functionality of embodiments of the invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments 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 can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention 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 invention, 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 the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, 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: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
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 invention. 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 or flowchart illustration, and combinations of blocks in the block diagrams 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 modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be generated in a processor, which may be described as: a processor comprises a sending module, a generating module and a reporting module. The names of the modules do not form a limitation on the modules themselves under certain conditions, for example, the reporting module may also be described as a "module sending a user log to a server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform the following: when a trigger event for switching the client is monitored, sending a skip request to a target client; under the condition of receiving the information of successful skip returned by the target client, generating a client switching identifier; and reporting the user log comprising the client switching identifier to a server.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A method for collecting logs, which is applied to a source client and comprises the following steps:
when a trigger event for switching the client is monitored, sending a skip request to a target client; the source client and the target client are clients of different categories on the same terminal device and on the same platform;
under the condition of receiving the information of successful skip returned by the target client, generating a client switching identifier;
and reporting the user log comprising the client switching identifier to a server so that the server identifies the flow data of the skipped user according to the user log.
2. The method of claim 1, wherein the skip request comprises a source client identification.
3. The method according to claim 1 or 2, wherein after performing the step of sending a jump request to the target client, the method further comprises:
confirming that the information returned by the target client is received within the preset time; and the information returned by the target client is the information of successful jump or the information of failed jump.
4. The method according to claim 1, wherein a source client in the trigger event of the switching client is a web page client, and a target client is an APP client.
5. A method for collecting logs, which is applied to a target client and comprises the following steps:
receiving a skip request of a source client; the skip request comprises a source client identifier; the source client and the target client are clients of different categories on the same terminal device and on the same platform;
after the jump is successful according to the jump request, generating a user log comprising the source client identifier;
and reporting the user log to a server so that the server identifies the flow data of the jumping user according to the user log.
6. The method of claim 5, further comprising:
after the jump is successful according to the jump request, the information of successful jump is sent to the source client; and after the jump fails according to the jump request, sending information of the jump failure to the source client.
7. An apparatus for collecting logs, the apparatus being provided at a source client, comprising:
the sending module is used for sending a skip request to the target client when a trigger event for switching the client is monitored; the source client and the target client are clients of different categories on the same terminal device and on the same platform;
the generating module is used for generating a client switching identifier under the condition of receiving the information of successful skip returned by the target client;
and the reporting module is used for reporting the user log comprising the client switching identifier to a server so that the server identifies the flow data of the user to be jumped according to the user log.
8. The apparatus of claim 7, wherein the skip request comprises a source client identification.
9. The apparatus of claim 7 or 8, further comprising:
the confirmation module is used for confirming that the information returned by the target client is received within the preset time after the sending module sends the jump request to the target client; and the information returned by the target client is the information of successful jump or the information of failed jump.
10. The apparatus according to claim 7, wherein the source client in the trigger event of the switching client is a web page client, and the target client is an APP client.
11. An apparatus for collecting logs, the apparatus being provided at a target client, the apparatus comprising:
the receiving module is used for receiving a skip request of a source client; the skip request comprises a source client identifier; the source client and the target client are clients of different categories on the same terminal device and on the same platform;
the generating module is used for generating a user log comprising the source client identifier after the jump is successful according to the jump request;
and the reporting module is used for reporting the user log to a server so that the server identifies the flow data of the user to be jumped according to the user log.
12. The apparatus of claim 11, further comprising:
the sending module is used for sending information of successful skip to the source client after the skip is successful according to the skip request; and the source client is also used for sending the information of the jump failure to the source client after the jump failure is carried out according to the jump request.
13. A terminal device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method of any one of claims 1 to 6.
CN201710962278.0A 2017-10-17 2017-10-17 Method and device for collecting logs Active CN107729482B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710962278.0A CN107729482B (en) 2017-10-17 2017-10-17 Method and device for collecting logs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710962278.0A CN107729482B (en) 2017-10-17 2017-10-17 Method and device for collecting logs

Publications (2)

Publication Number Publication Date
CN107729482A CN107729482A (en) 2018-02-23
CN107729482B true CN107729482B (en) 2021-04-30

Family

ID=61211650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710962278.0A Active CN107729482B (en) 2017-10-17 2017-10-17 Method and device for collecting logs

Country Status (1)

Country Link
CN (1) CN107729482B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101594594A (en) * 2009-06-30 2009-12-02 中兴通讯股份有限公司 A kind of LAN system and its implementation that realizes streaming media switch between peer device
CN102469441A (en) * 2010-11-08 2012-05-23 中国移动通信有限公司 Inter-terminal switching method, device, terminal and system for data service
CN102752327A (en) * 2011-04-19 2012-10-24 南京中兴新软件有限责任公司 Method, system and device for performing interaction between terminals and cloud server
CN104486650A (en) * 2014-12-29 2015-04-01 上海昌视网络科技有限公司 Method and system for binding of television terminal and mobile terminal and achieving switching showing

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI296477B (en) * 2005-03-23 2008-05-01 Quanta Comp Inc Single logon method on a server system and a server system with single logon functionality
CN104462478B (en) * 2014-12-18 2019-07-02 北京奇虎科技有限公司 Realize method, apparatus and client that mobile browser client accesses the web page
CN106919413A (en) * 2015-12-25 2017-07-04 北京奇虎科技有限公司 A kind of method and apparatus that application APP is called by webpage
CN106533735B (en) * 2016-10-11 2019-12-24 北京奇虎科技有限公司 Method, device, server and system for monitoring use behavior of mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101594594A (en) * 2009-06-30 2009-12-02 中兴通讯股份有限公司 A kind of LAN system and its implementation that realizes streaming media switch between peer device
CN102469441A (en) * 2010-11-08 2012-05-23 中国移动通信有限公司 Inter-terminal switching method, device, terminal and system for data service
CN102752327A (en) * 2011-04-19 2012-10-24 南京中兴新软件有限责任公司 Method, system and device for performing interaction between terminals and cloud server
CN104486650A (en) * 2014-12-29 2015-04-01 上海昌视网络科技有限公司 Method and system for binding of television terminal and mobile terminal and achieving switching showing

Also Published As

Publication number Publication date
CN107729482A (en) 2018-02-23

Similar Documents

Publication Publication Date Title
US20180183651A1 (en) Content push method and server, and terminal
CN110708346B (en) Information processing system and method
CN107844324B (en) Client page jump processing method and device
CN109829121B (en) Method and device for reporting click behavior data
CN105468506A (en) Application management method, device and terminal
CN110445632B (en) Method and device for preventing client from crashing
CN109587197B (en) Method, device and system for associating reported data
US10931771B2 (en) Method and apparatus for pushing information
CN109218041B (en) Request processing method and device for server system
CN112015383A (en) Login method and device
CN112118352B (en) Method and device for processing notification trigger message, electronic equipment and computer readable medium
US20150317143A1 (en) Method and apparatus for installing webpage application
CN110324432B (en) Data processing method, device and medium applied to terminal and computing equipment
CN107729482B (en) Method and device for collecting logs
CN108933823B (en) User touch method and device
CN112306791B (en) Performance monitoring method and device
CN112825519B (en) Method and device for identifying abnormal login
CN114417318A (en) Third-party page jumping method and device and electronic equipment
CN110457632B (en) Webpage loading processing method and device
CN110888770B (en) Method and device for transmitting information
CN111176982A (en) Test interface generation method and device
CN104978199A (en) Plug-in application method and device used for multiple browsers
CN110868477A (en) Task scheduling method, device and system
CN112448931B (en) Network hijacking monitoring method and device
CN114598524B (en) Method, device, equipment and storage medium for detecting agent tool

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