CN111639007A - Data processing method, device, terminal and computer readable storage medium - Google Patents

Data processing method, device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN111639007A
CN111639007A CN202010474713.7A CN202010474713A CN111639007A CN 111639007 A CN111639007 A CN 111639007A CN 202010474713 A CN202010474713 A CN 202010474713A CN 111639007 A CN111639007 A CN 111639007A
Authority
CN
China
Prior art keywords
event
uploaded
data
base class
buried point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010474713.7A
Other languages
Chinese (zh)
Other versions
CN111639007B (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.)
Wuxi Jinyun Zhilian Technology Co.,Ltd.
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010474713.7A priority Critical patent/CN111639007B/en
Publication of CN111639007A publication Critical patent/CN111639007A/en
Application granted granted Critical
Publication of CN111639007B publication Critical patent/CN111639007B/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/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

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

Abstract

The embodiment of the application provides a data processing method, a data processing device, a terminal and a computer readable storage medium, and relates to the field of cloud computing. The method is applied to the terminal and comprises the following steps: when a user triggering interaction event is monitored, judging whether the interaction event inherits a preset buried point event base class or not; the preset embedded point event base class represents a specified event to be uploaded; and if the interactive event inherits the preset buried point event base class, determining the event parameter of the interactive event as the data to be uploaded. Based on the processing, the data can be uploaded according to the requirements of developers, and the uploaded invalid data can be reduced.

Description

Data processing method, device, terminal and computer readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method, an apparatus, a terminal, and a computer-readable storage medium.
Background
With the rapid development of computer technology, users can access a network through an application in a terminal, for example, the users can shop, watch videos, browse news, and the like through the application. The application program can acquire data of the application program used by the user in the using process of the user, the data can comprise event parameters of interaction events triggered by the user, and further, the operation habits of the user can be determined based on the data, and the application program can be optimized.
In order to acquire the above data, a developer of the application program may bury the point in the application program based on a preset burying point manner, that is, set upload data at a specified position in the application program. For example, all page controls capable of generating interaction in the application program may be marked, and then the application program may obtain event parameters of interaction events between the user and all page controls in the application program through the marking, and upload the event parameters to the server.
However, in the above manner, the application program may upload event parameters of the interaction events between the user and all the page controls, and uploading of data according to the needs of the developer cannot be achieved, which results in uploading of more invalid data.
Disclosure of Invention
An object of the embodiments of the present application is to provide a data processing method, an apparatus, a terminal, and a computer-readable storage medium, which can reduce uploaded invalid data. The specific technical scheme is as follows:
in a first aspect, in order to achieve the above object, an embodiment of the present application discloses a data processing method, where the method is applied to a terminal, and the method includes:
when a user trigger interaction event is monitored, judging whether the interaction event inherits a preset buried point event base class or not; the preset embedded point event base class represents a specified event to be uploaded;
and if the interactive event inherits the preset buried point event base class, determining the event parameter of the interactive event as the data to be uploaded.
Optionally, after the determining whether the interaction event inherits the preset buried point event base class, the method further includes:
and if the interactive event does not inherit the preset buried point event base class, determining the event parameter of the interactive event as the data not to be uploaded.
Optionally, the method further includes:
when the interaction event is monitored, sending the interaction event to a server;
receiving a result state sent by the server and used for responding to the interaction event as a first result state;
if the first result state inherits a preset buried point result state base class, determining that the first result state is a data state to be uploaded; and the preset buried point result state base class represents a specified result state to be uploaded.
Optionally, after receiving the result status sent by the server for responding to the interaction event as the first result status, the method further includes:
and updating the page where the interaction event is located based on the first result state.
Optionally, the method further includes:
when a specified type event except the interaction event is monitored, judging whether the specified type event inherits the preset buried point event base class or not;
if the event of the specified type is inherited to the preset buried point event base class, determining the event parameter of the event of the specified type as data to be uploaded;
and if the specified type event does not inherit the preset buried point event base class, determining that the event parameter of the specified type event is data which is not to be uploaded.
Optionally, the event of the specified type includes a page jump event and/or a popup event.
Optionally, after determining that the event parameter of the interaction event is to-be-uploaded data, the method further includes:
locally storing the data to be uploaded in the terminal;
and when the data to be uploaded is successfully uploaded, locally deleting the data to be uploaded from the terminal.
In a second aspect, in order to achieve the above object, an embodiment of the present application discloses a data processing apparatus, including:
the first judgment module is used for judging whether the interaction event inherits a preset buried point event base class or not when a user trigger interaction event is monitored; the preset embedded point event base class represents a specified event to be uploaded;
and the first determining module is used for determining the event parameter of the interactive event as the data to be uploaded if the interactive event inherits the preset buried point event base class.
Optionally, the apparatus further comprises:
and the second determining module is used for determining that the event parameter of the interactive event is the data which is not to be uploaded if the interactive event does not inherit the preset buried point event base class after the interactive event is judged to inherit the preset buried point event base class.
Optionally, the apparatus further comprises:
the sending module is used for sending the interaction event to a server when the interaction event is monitored;
a receiving module, configured to receive a result status sent by the server and used for responding to the interaction event as a first result status;
a third determining module, configured to determine that the first result state is a data state to be uploaded if the first result state inherits a preset buried point result state base class; and the preset buried point result state base class represents a specified result state to be uploaded.
Optionally, the apparatus further comprises:
and the updating module is used for updating the page where the interaction event is located based on the first result state after receiving the result state sent by the server and used for responding to the interaction event as the first result state.
Optionally, the apparatus further comprises:
the second judging module is used for judging whether the specified type event inherits the preset buried point event base class or not when the specified type event except the interaction event is monitored;
a fourth determining module, configured to determine, if the event of the specified type is inherited from the preset buried point event base class, that an event parameter of the event of the specified type is to-be-uploaded data;
and the fifth determining module is used for determining that the event parameter of the specified type event is data which is not to be uploaded if the specified type event does not inherit the preset buried point event base class.
Optionally, the event of the specified type includes a page jump event and/or a popup event.
Optionally, the apparatus further comprises:
the storage module is used for locally storing the data to be uploaded in the terminal after the event parameter of the interaction event is determined to be the data to be uploaded;
and the deleting module is used for locally deleting the data to be uploaded from the terminal when the data to be uploaded is successfully uploaded.
On the other hand, in order to achieve the above object, an embodiment of the present application further discloses a terminal, where the terminal includes a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to implement the data processing method according to the first aspect when executing the program stored in the memory.
On the other hand, in order to achieve the above object, an embodiment of the present application further discloses a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the data processing method according to the first aspect is implemented.
On the other hand, in order to achieve the above object, an embodiment of the present application further discloses a computer program product containing instructions, which when run on a computer, causes the computer to execute the data processing method according to the first aspect.
The embodiment of the application provides a data processing method, which comprises the steps of judging whether an interaction event is inherited to a preset buried point event base class or not when a user trigger interaction event is monitored; the preset embedded point event base class represents a specified event to be uploaded; and if the interactive event inherits the preset buried point event base class, determining the event parameter of the interactive event as the data to be uploaded.
Therefore, developers can set the interactive events needing to upload the event parameters to inherit the preset buried point event base class in advance, and then in the process of operating the terminal by a user, the terminal can only determine the event parameters of the interactive events inheriting the preset buried point event base class as data to be uploaded, so that the data can be uploaded according to the needs of the developers, and the uploaded invalid data can be reduced.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a data processing method according to an embodiment of the present application;
fig. 2 is a flowchart of another data processing method provided in an embodiment of the present application;
fig. 3 is a schematic diagram of data flow in a Bloc mode according to an embodiment of the present disclosure;
fig. 4 is a schematic data flow diagram in an expanded Bloc mode according to an embodiment of the present application;
FIG. 5 is a block schema architecture diagram provided in an embodiment of the present application;
fig. 6 is a block diagram of a data processing apparatus according to an embodiment of the present application;
fig. 7 is a structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the related technology, the application program uploads event parameters of interaction events between the user and all the page controls, and data uploading according to the needs of developers cannot be realized, so that more invalid data are uploaded.
In order to solve the above problem, an embodiment of the present application provides a data processing method, which may be applied to a terminal, and referring to fig. 1, the method may include the following steps:
s101: and when the condition that the user triggers the interaction event is monitored, judging whether the interaction event inherits the preset buried point event base class.
The preset buried point event base class represents a specified event to be uploaded.
S102: and if the interactive event inherits the preset buried point event base class, determining the event parameter of the interactive event as the data to be uploaded.
Therefore, developers can set the interactive events needing to upload the event parameters to inherit the preset buried point event base class in advance, and then in the process of operating the terminal by a user, the terminal can only determine the event parameters of the interactive events inheriting the preset buried point event base class as data to be uploaded, so that the data can be uploaded according to the needs of the developers, and the uploaded invalid data can be reduced.
For step S101, the terminal may be an application installed in the electronic device (which may be referred to as a target application), and the target application may be developed by a developer based on a preset development framework. For example, the pre-designed development framework may be a Flutter cross-platform development framework.
Flutter cross-platform development framework may support a variety of different development modes, e.g., Block mode, Provider mode, reduce mode, etc.
In one implementation, the target application may be generated based on a Bloc mode of a Flutter cross-platform development framework. When the target application program runs in the electronic equipment, the event parameters of the interaction event can be uploaded through a Page (Page) module and a Bloc module.
The interaction event may be an event triggered by a user operation in a user interface of the target application program, for example, the target application program may display a payment interface, the payment interface includes a page control corresponding to a "payment function", and when the user clicks the page control, the payment event may be triggered, and the payment event is an interaction event triggered by the user.
The event parameters of the interaction event may include information such as a time when the user triggers the interaction event, a page control corresponding to the interaction event, a position clicked by the user in the page control, and an identifier of the interaction event.
In the Bloc mode based on the Flutter cross-platform development framework, an Event Base class may be defined in advance, and for example, the Event Base class may be represented by Base Event. In addition, a preset buried point Event Base class can be defined, for example, the preset buried point Event Base class can be represented by a Trace Event, and the preset buried point Event Base class Trace Event can be directly inherited to an Event Base Event.
The Event inherits the Event of the preset embedded point Event base class Trace Event and represents the Event to be uploaded specified by the developer. That is to say, for an interactive Event of an Event parameter to be uploaded, a developer may preset the interactive Event to be inherited to a preset buried point Event base class Trace Event.
It can be understood that an interactive Event which does not need to upload an Event parameter will not be inherited to the preset buried point Event Base class Trace Event, but can still be inherited to the Event Base class Base Event.
The page module may include a monitoring submodule, and during the running process of the target application program, the monitoring submodule may monitor the event. When the monitoring submodule monitors that the user operation triggers an interaction event, the page module can send an event parameter of the interaction event to the Bloc module.
Furthermore, the Bloc module may determine whether the interaction event inherits the preset buried point event base class TraceEvent, so as to perform processing according to the determination result.
In one implementation, the Bloc module may include a Stream Controller sub-module, and the Stream Controller sub-module may monitor and process data received by the Bloc module based on a Stream manner.
In step S102, if the Bloc module determines that the interactive event inherits the preset flush event base class TraceEvent, it indicates that the developer needs to obtain the event parameter of the interactive event, that is, the interactive event is an event of the event parameter to be uploaded, which is specified by the developer, and further, the Bloc module may determine that the event parameter of the interactive event is data to be uploaded.
After determining that the event parameter of the interaction event is data to be uploaded, the event parameter of the interaction event may be uploaded to a server (for example, a data collection server), and the data collection server may be a server for collecting data of a user for a target application program.
In one embodiment, referring to fig. 2, after step S101, the method may further include the steps of:
s103: and if the interactive event does not inherit the preset buried point event base class, determining the event parameter of the interactive event as the data not to be uploaded.
In this embodiment of the application, if the Bloc module determines that the interactive Event does not inherit the Trace Event of the preset buried point Event base class, which indicates that a developer does not need to obtain an Event parameter of the interactive Event, at this time, the Bloc module may determine that the Event parameter of the interactive Event is not to-be-uploaded data.
In one embodiment, after determining that the interactivity Event does not inherit the preset flush Event base class Trace Event, the Bloc module may also discard the Event parameters of the interactivity Event.
In one embodiment, in order to ensure the normal operation of the target application program, the method may further include the steps of:
step one, when the interactive event is monitored, the interactive event is sent to a server.
And step two, receiving a result state sent by the server and used for responding to the interaction event as a first result state.
And step three, if the first result state inherits the preset buried point result state base class, determining that the first result state is the data state to be uploaded.
The preset buried point result state base class represents a specified result state to be uploaded.
In the embodiment of the present application, the server receiving the interactivity event may be a server (may be referred to as an application server) for responding to the interactivity event, and the application server may be the same as or different from the data collection server.
When an interaction event triggered by a user in a target application program is monitored, the Bloc module can also forward the interaction event to an application server, and then the application server can respond to the interaction event and send a result state corresponding to the interaction event to the Bloc module. The result state may represent the result of the execution of the interaction event.
For example, the user triggers a payment event in the user interface of the target application, and the Bloc module may forward the payment event to the application server. After receiving the payment event, if the application server successfully deducts the corresponding payment amount from the account of the user to indicate that the execution of the payment event is successful, the application server sends a first result status to the Bloc module to indicate that the user successfully pays this time, and conversely, if the application server fails to successfully deduct the corresponding payment amount from the account of the user to indicate that the execution of the payment event is failed, the application server sends a first result status to the Bloc module to indicate that the user fails to pay this time.
In one implementation, in the Bloc mode based on the Flutter cross-platform development framework, a result status Base class may also be defined in advance, for example, the result status Base class may be represented by Base State. In addition, a preset buried point result State Base class may be defined, for example, the preset buried point result State Base class may be represented by Trace State (buried point State), and the preset buried point result State Base class Trace State may be directly inherited to the result State Base class State.
Inheriting the result State of the preset buried point result State base class Trace State, and representing the result State to be uploaded specified by the developer. That is to say, for the result State to be uploaded, the developer may preset the result State to inherit to the preset buried point result State base class Trace State.
It will be appreciated that the result State that does not need to be uploaded will not be inherited to the preset buried point result State Base class TraceState, but it may still be inherited to the result State Base class State.
If the Bloc module determines that the first result State is inherited from the preset buried point result State base class Trace State, it indicates that the developer needs to obtain the first result State, that is, the first result State is a result State to be uploaded specified by the developer, and further, the Bloc module can determine that the first result State is a data State to be uploaded.
It can be understood that, if the Bloc module determines that the first result State does not inherit the preset burial point result State base class Trace State, indicating that the developer does not need to obtain the first result State, at this time, the Bloc module may determine that the first result State is a non-to-be-uploaded data State.
Based on the processing, uploading of the event parameters and the specified result state of the specified interaction event can be realized according to the requirements of developers.
In one embodiment, in order to ensure the normal operation of the target application program, the method may further include the steps of: and updating the page where the interaction event is located based on the first result state.
In this embodiment of the application, the Bloc module may further send the first result state to the page module, and further, the page module may update the page where the interaction event is located based on the first result state.
In one implementation, the page module may further include a Stream Builder sub-module, and the Stream Builder sub-module may update the page according to the result status.
For example, the interaction event triggered by the user in the user interface of the target application is a payment event, and if the first result state indicates that the execution of the payment event is successful, the Stream Builder sub-module may update the page, so that the target application displays the page with which the payment is successful; if the first result status indicates that the payment event failed to execute, the StreamBuilder sub-module may update the page to cause the target application to display the page for which payment failed.
Referring to fig. 3, fig. 3 is a schematic diagram of data flow in a Bloc mode according to an embodiment of the present application.
And the monitoring submodule in the page module can monitor the interactive event and send the monitored event parameter of the interactive event to the Bloc module.
The Stream Controller submodule may process the received event parameter in the form of a data Stream. If the interaction event inherits the preset buried point event base class, determining the event parameter of the interaction event as data to be uploaded; otherwise, the event parameter of the interaction event may be determined to be the data not to be uploaded.
In addition, when receiving the event parameter of the interactive event, the Stream Controller submodule may further send the interactive event to the application server, and receive the result status sent by the application server for responding to the interactive event. If the result state is inherited to the preset buried point result state base class, the result state can be determined to be a data state to be uploaded.
After receiving the result state responding to the interaction event, the Stream Controller submodule may also send the result state to the page module, and further, the Stream Builder submodule may update the page according to the result state.
In one embodiment, uploading event parameters of other events besides the interaction event according to the requirement of a developer can be realized, and the method can further comprise the following steps:
the method comprises the following steps: when specific type events except the interaction events are monitored, judging whether the specific type events inherit from a preset buried point event base class or not; if yes, executing the step two, and if not, executing the step three.
And step two, determining the event parameters of the events of the specified type as the data to be uploaded.
And step three, determining the event parameter of the specified type event as the data which is not to be uploaded.
In the embodiment of the application, the event of the specified type can be set by a developer according to requirements.
If the monitored specified type event inherits the preset buried point event base class, the fact that the developer needs to obtain the event parameter of the specified type event is shown, namely, the specified type event is the event of the event parameter to be uploaded, which is specified by the developer, and furthermore, the Bloc module can determine that the event parameter of the specified type event is the data to be uploaded.
On the contrary, if the monitored specified type event does not inherit the preset buried point event base class, it indicates that the developer does not need to obtain the event parameter of the specified type event, and at this time, the Bloc module may determine that the event parameter of the specified type event is the data not to be uploaded.
Based on the processing, the event parameters of the specified type of events can be uploaded according to the requirements of developers.
In one embodiment, the specified type of event may include a page jump event and/or a pop-window event.
In the embodiment of the application, when a page jump event inherited from a preset buried point event base class is monitored, an event parameter of the page jump event can be determined as data to be uploaded.
The page jump event may include a page Pop (Pop) event and a page Push (Push) event, among others. The event parameters of the page jump event may include information such as the identification of the page and the time of the page jump.
The monitoring submodule can also send the page jump event to the Bloc module after monitoring the page jump event, and similarly, the Bloc module can judge whether the page jump event inherits the preset buried point event base class, determine the event parameter of the page jump event as the data to be uploaded if the judgment result is yes, and determine the event parameter of the page jump event as the data not to be uploaded if the judgment result is no.
In an embodiment, when a popup event inherited to a preset buried point event base class is monitored, an event parameter of the popup event may also be determined as data to be uploaded.
The pop events may include a pop Show event and a pop Hide event, among others. The event parameters of the window event may include information such as the identification of the window and the time at which the window event was triggered.
The monitoring submodule can also send the window event to the Bloc module after monitoring the window event, and similarly, the Bloc module can judge whether the window event inherits the preset buried point event base class, determine the event parameter of the window event as the data to be uploaded if the judgment result is yes, and determine the event parameter of the window event as the data not to be uploaded if the judgment result is no.
Based on the processing, uploading of event parameters of the specified page jump event and/or popup event can be realized according to the requirements of developers.
In one embodiment, the method may further comprise the steps of: locally storing data to be uploaded in a terminal; and when the data to be uploaded is successfully uploaded, locally deleting the data to be uploaded from the terminal.
In the embodiment of the application, after the terminal determines the data to be uploaded, the data to be uploaded can be stored locally, and subsequently, the data to be uploaded can be uploaded to the data collection server.
In the actual uploading process, uploading may fail due to network environment influence and the like, and therefore, the terminal may attempt to upload for multiple times. After the data is uploaded successfully, the terminal can delete the data to be uploaded from the local, so that the success rate of data uploading can be improved, and the storage space is saved.
In an embodiment, the terminal may also upload the determined status of the data to be uploaded in the same manner as the above-mentioned data to be uploaded.
In an embodiment, the Bloc mode may be further adjusted, and an rxpart library is introduced into the Bloc mode to extend the Stream Controller submodule to obtain a behavior Subject submodule, where the behavior Subject submodule has a higher capability of monitoring data, and further, the behavior Subject submodule may be extended to obtain a Trace Controller submodule, and the Trace Controller submodule may intercept a result state inherited to a preset buried point result state base class, relative to the behavior Subject submodule.
Correspondingly, on the basis of fig. 3, referring to fig. 4, fig. 4 is a schematic data flow diagram in an extended Bloc mode according to an embodiment of the present application.
In fig. 4, the expanded Bloc module may be referred to as a Trace Bloc module.
The monitoring submodule in the page module can monitor a buried point event (an event inherited from a preset buried point event base class) and send an event parameter of the monitored buried point event to the Trace Bloc module.
The Trace Controller submodule can process the received event parameters based on a Stream mode and determine the event parameters of the buried point event as data to be uploaded.
In addition, the Trace Controller submodule can also send the buried point event to the application server, receive the result state sent by the application server and used for responding to the buried point event, and determine that the result state is the buried point result state if the result state inherits the preset buried point result state base class. The Trace Controller submodule can also determine that the embedded point result state is a to-be-uploaded data state.
The Trace Controller submodule can also send the embedded point result state to the page module, and further, the StreamBuilder submodule can update the page according to the embedded point result state.
In one embodiment, the Bloc module mentioned in this embodiment may correspond to each page in the target application program, or may correspond to all pages in the target application program. The Bloc module corresponding to each page in the target application program may be referred to as a page Bloc module, and the Bloc modules corresponding to all pages in the target application program may be referred to as a global Bloc module.
The page Bloc module may be configured to process an event triggered in a page corresponding to the page Bloc module, and the global Bloc module may be configured to process a system event and a global interaction event in a target application program. For example, the global Bloc module may be used to handle: a theme switching event of the target application program and a network switching event of the target application access.
Referring to fig. 5, fig. 5 is a block mode architecture diagram according to an embodiment of the present disclosure.
The application program is the top layer of the architecture, and the application program may include a global Bloc Provider module, where the global Bloc Provider module is used to process system events and global interaction events in the application program.
Specifically, the Bloc Provider module may include a global Bloc module and a global data flow control module, where the global Bloc module may obtain an event parameter of a system event and a global interaction event in the application program, obtain a corresponding result state, and send the result state to the global data flow control module. The global data flow control module can perform global update on all pages in the application program according to the result state. For example, when the target application is not connected to the network, the global data flow control module may control all pages in the application to show an unconnected state.
Specifically, the global data flow control module may include a plurality of page modules, and each page module corresponds to one page. The page module may include a page Bloc Provider module, and the page Bloc Provider module may process an event triggered in a page corresponding to the page module.
Specifically, the page Bloc Provider module may include a page Bloc module and a page data flow control module, and the page Bloc module may obtain event parameters of events triggered in a corresponding page, obtain a corresponding result state, and send the result state to the page data flow control module. The page data flow control module may update the corresponding page based on the result status.
Based on the same inventive concept, an embodiment of the present application further provides a data processing apparatus, referring to fig. 6, where fig. 6 is a structural diagram of the data processing apparatus provided in the embodiment of the present application, and the apparatus includes:
the first judging module 601 is configured to, when it is monitored that a user triggers an interaction event, judge whether the interaction event inherits a preset buried point event base class; the preset embedded point event base class represents a specified event to be uploaded;
a first determining module 602, configured to determine, if the interaction event is inherited from the preset buried point event base class, that an event parameter of the interaction event is to-be-uploaded data.
In one embodiment, the apparatus further comprises:
and the second determining module is used for determining that the event parameter of the interactive event is the data which is not to be uploaded if the interactive event does not inherit the preset buried point event base class after the interactive event is judged to inherit the preset buried point event base class.
In one embodiment, the apparatus further comprises:
the sending module is used for sending the interaction event to a server when the interaction event is monitored;
a receiving module, configured to receive a result status sent by the server and used for responding to the interaction event as a first result status;
a third determining module, configured to determine that the first result state is a data state to be uploaded if the first result state inherits a preset buried point result state base class; and the preset buried point result state base class represents a specified result state to be uploaded.
In one embodiment, the apparatus further comprises:
and the updating module is used for updating the page where the interaction event is located based on the first result state after receiving the result state sent by the server and used for responding to the interaction event as the first result state.
In one embodiment, the apparatus further comprises:
the second judging module is used for judging whether the specified type event inherits the preset buried point event base class or not when the specified type event except the interaction event is monitored;
a fourth determining module, configured to determine, if the event of the specified type is inherited from the preset buried point event base class, that an event parameter of the event of the specified type is to-be-uploaded data;
and the fifth determining module is used for determining that the event parameter of the specified type event is data which is not to be uploaded if the specified type event does not inherit the preset buried point event base class.
In one embodiment, the specified type of event includes a page jump event and/or a pop-window event.
In one embodiment, the apparatus further comprises:
the storage module is used for locally storing the data to be uploaded in the terminal after the event parameter of the interaction event is determined to be the data to be uploaded;
and the deleting module is used for locally deleting the data to be uploaded from the terminal when the data to be uploaded is successfully uploaded.
Therefore, developers can set the interactive events needing to upload the event parameters to inherit the preset buried point event base class in advance, and then in the process of operating the terminal by a user, the terminal can only determine the event parameters of the interactive events inheriting the preset buried point event base class as data to be uploaded, so that the data can be uploaded according to the needs of the developers, and the uploaded invalid data can be reduced.
The embodiment of the present application further provides a terminal, as shown in fig. 7, including a memory 701 and a processor 702;
a memory 701 for storing a computer program;
the processor 702 is configured to implement the data processing method provided in the embodiment of the present application when executing the program stored in the memory 701.
Specifically, the data processing method includes:
when a user trigger interaction event is monitored, judging whether the interaction event inherits a preset buried point event base class or not; the preset embedded point event base class represents a specified event to be uploaded;
and if the interactive event inherits the preset buried point event base class, determining the event parameter of the interactive event as the data to be uploaded.
It should be noted that other implementation manners of the data processing method are the same as those of the foregoing method embodiment, and are not described herein again.
The terminal may be provided with a communication interface for enabling communication between the terminal and another device.
The processor, the communication interface, and the memory are configured to communicate with each other through a communication bus, where the communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
The embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the data processing method provided in the embodiment of the present application is implemented.
Embodiments of the present application further provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the data processing method provided by the embodiments of the present application.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus, the terminal, the computer-readable storage medium and the computer program product embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (16)

1. A data processing method is applied to a terminal, and the method comprises the following steps:
when a user trigger interaction event is monitored, judging whether the interaction event inherits a preset buried point event base class or not; the preset embedded point event base class represents a specified event to be uploaded;
and if the interactive event inherits the preset buried point event base class, determining the event parameter of the interactive event as the data to be uploaded.
2. The method of claim 1, wherein after determining whether the interaction event inherits a preset buried point event base class, the method further comprises:
and if the interactive event does not inherit the preset buried point event base class, determining the event parameter of the interactive event as the data not to be uploaded.
3. The method of claim 1, further comprising:
when the interaction event is monitored, sending the interaction event to a server;
receiving a result state sent by the server and used for responding to the interaction event as a first result state;
if the first result state inherits a preset buried point result state base class, determining that the first result state is a data state to be uploaded; and the preset buried point result state base class represents a specified result state to be uploaded.
4. The method of claim 3, wherein after receiving the result status sent by the server for responding to the interactivity event as a first result status, the method further comprises:
and updating the page where the interaction event is located based on the first result state.
5. The method of claim 1, further comprising:
when a specified type event except the interaction event is monitored, judging whether the specified type event inherits the preset buried point event base class or not;
if the event of the specified type is inherited to the preset buried point event base class, determining the event parameter of the event of the specified type as data to be uploaded;
and if the specified type event does not inherit the preset buried point event base class, determining that the event parameter of the specified type event is data which is not to be uploaded.
6. The method of claim 5, wherein the specified type of event comprises a page jump event and/or a pop event.
7. The method of claim 1, wherein after the determining that the event parameter of the interaction event is data to be uploaded, the method further comprises:
locally storing the data to be uploaded in the terminal;
and when the data to be uploaded is successfully uploaded, locally deleting the data to be uploaded from the terminal.
8. A data processing apparatus, characterized in that the apparatus comprises:
the first judgment module is used for judging whether the interaction event inherits a preset buried point event base class or not when a user trigger interaction event is monitored; the preset embedded point event base class represents a specified event to be uploaded;
and the first determining module is used for determining the event parameter of the interactive event as the data to be uploaded if the interactive event inherits the preset buried point event base class.
9. The apparatus of claim 8, further comprising:
and the second determining module is used for determining that the event parameter of the interactive event is the data which is not to be uploaded if the interactive event does not inherit the preset buried point event base class after the interactive event is judged to inherit the preset buried point event base class.
10. The apparatus of claim 8, further comprising:
the sending module is used for sending the interaction event to a server when the interaction event is monitored;
a receiving module, configured to receive a result status sent by the server and used for responding to the interaction event as a first result status;
a third determining module, configured to determine that the first result state is a data state to be uploaded if the first result state inherits a preset buried point result state base class; and the preset buried point result state base class represents a specified result state to be uploaded.
11. The apparatus of claim 10, further comprising:
and the updating module is used for updating the page where the interaction event is located based on the first result state after receiving the result state sent by the server and used for responding to the interaction event as the first result state.
12. The apparatus of claim 8, further comprising:
the second judging module is used for judging whether the specified type event inherits the preset buried point event base class or not when the specified type event except the interaction event is monitored;
a fourth determining module, configured to determine, if the event of the specified type is inherited from the preset buried point event base class, that an event parameter of the event of the specified type is to-be-uploaded data;
and the fifth determining module is used for determining that the event parameter of the specified type event is data which is not to be uploaded if the specified type event does not inherit the preset buried point event base class.
13. The apparatus of claim 12, wherein the specified type of event comprises a page jump event and/or a pop event.
14. The apparatus of claim 8, further comprising:
the storage module is used for locally storing the data to be uploaded in the terminal after the event parameter of the interaction event is determined to be the data to be uploaded;
and the deleting module is used for locally deleting the data to be uploaded from the terminal when the data to be uploaded is successfully uploaded.
15. A terminal comprising a memory and a processor;
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, implementing the method steps of any of claims 1-7.
16. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN202010474713.7A 2020-05-29 2020-05-29 Data processing method, device, terminal and computer readable storage medium Active CN111639007B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010474713.7A CN111639007B (en) 2020-05-29 2020-05-29 Data processing method, device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010474713.7A CN111639007B (en) 2020-05-29 2020-05-29 Data processing method, device, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111639007A true CN111639007A (en) 2020-09-08
CN111639007B CN111639007B (en) 2024-05-03

Family

ID=72329374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010474713.7A Active CN111639007B (en) 2020-05-29 2020-05-29 Data processing method, device, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111639007B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107870933A (en) * 2016-09-27 2018-04-03 北京京东尚科信息技术有限公司 Count the method, apparatus and system of Android five application page navigation patterns
CN107894945A (en) * 2017-11-17 2018-04-10 深圳市泉眼网络科技有限公司 Bury an adding method, mobile terminal and computer-readable recording medium
CN108595168A (en) * 2018-03-30 2018-09-28 武汉斗鱼网络科技有限公司 Automatically dotting method, apparatus, readable storage medium storing program for executing and equipment
CN110188308A (en) * 2019-05-31 2019-08-30 武汉斗鱼网络科技有限公司 Client automatically dotting report method, storage medium, equipment and system
CN110515821A (en) * 2019-08-30 2019-11-29 北京东软望海科技有限公司 Based on the event-handling method, electronic equipment and computer storage medium buried a little
CN110633205A (en) * 2019-06-20 2019-12-31 北京无限光场科技有限公司 Method and device for detecting embedded point event, terminal equipment and medium
CN110647438A (en) * 2019-08-13 2020-01-03 平安科技(深圳)有限公司 Event monitoring method and device, computer equipment and storage medium
CN110704270A (en) * 2019-08-20 2020-01-17 北京奇艺世纪科技有限公司 Zero-buried point data acquisition method and device, electronic equipment and storage medium
CN110874307A (en) * 2018-08-29 2020-03-10 北京京东尚科信息技术有限公司 Event buried point collecting and reporting method and device
CN110908880A (en) * 2019-11-01 2020-03-24 北京金山安全软件有限公司 Embedded point code injection method, event reporting method and related equipment thereof

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107870933A (en) * 2016-09-27 2018-04-03 北京京东尚科信息技术有限公司 Count the method, apparatus and system of Android five application page navigation patterns
CN107894945A (en) * 2017-11-17 2018-04-10 深圳市泉眼网络科技有限公司 Bury an adding method, mobile terminal and computer-readable recording medium
CN108595168A (en) * 2018-03-30 2018-09-28 武汉斗鱼网络科技有限公司 Automatically dotting method, apparatus, readable storage medium storing program for executing and equipment
CN110874307A (en) * 2018-08-29 2020-03-10 北京京东尚科信息技术有限公司 Event buried point collecting and reporting method and device
CN110188308A (en) * 2019-05-31 2019-08-30 武汉斗鱼网络科技有限公司 Client automatically dotting report method, storage medium, equipment and system
CN110633205A (en) * 2019-06-20 2019-12-31 北京无限光场科技有限公司 Method and device for detecting embedded point event, terminal equipment and medium
CN110647438A (en) * 2019-08-13 2020-01-03 平安科技(深圳)有限公司 Event monitoring method and device, computer equipment and storage medium
CN110704270A (en) * 2019-08-20 2020-01-17 北京奇艺世纪科技有限公司 Zero-buried point data acquisition method and device, electronic equipment and storage medium
CN110515821A (en) * 2019-08-30 2019-11-29 北京东软望海科技有限公司 Based on the event-handling method, electronic equipment and computer storage medium buried a little
CN110908880A (en) * 2019-11-01 2020-03-24 北京金山安全软件有限公司 Embedded point code injection method, event reporting method and related equipment thereof

Also Published As

Publication number Publication date
CN111639007B (en) 2024-05-03

Similar Documents

Publication Publication Date Title
US8856685B2 (en) Method and system for providing web content on a mobile device
CN107577471B (en) Application control method and mobile terminal
CN112394908A (en) Method and device for automatically generating embedded point page, computer equipment and storage medium
CN113076416A (en) Information heat evaluation method and device and electronic equipment
CN116244138A (en) Method and device for identifying abnormal operation of application, electronic equipment and storage medium
CN109542743B (en) Log checking method and device, electronic equipment and computer readable storage medium
US9075988B2 (en) Inferring security decisions from trusted users
CN112084503A (en) Interception rule base generation method and device and electronic equipment
CN110941752B (en) Information searching method, data processing method and equipment
CN108037914B (en) Method and device for developing android native system by combining js
CN111639007A (en) Data processing method, device, terminal and computer readable storage medium
CN110309647B (en) Processing method and device for application program, electronic equipment and storage medium
CN112068895B (en) Code configuration method, device, video playing equipment and storage medium
CN114356290A (en) Data processing method and device and computer readable storage medium
CN110413800B (en) Method and equipment for providing novel information
CN113282285A (en) Code compiling method and device, electronic equipment and storage medium
CN109063425B (en) Software authority management method and device
CN112083974A (en) Advertisement window closing method and device and electronic equipment
CN113760315A (en) Method and device for testing system
CN111367703A (en) Troubleshooting method and device
CN106371883B (en) Preview installation method and device of application program
CN110659191A (en) Buried point data analysis method and device, computer equipment and storage medium
CN110888643A (en) Page processing method and device
CN112596812B (en) Response method, device, equipment and storage medium of operation request
CN112445498B (en) Program installation method and device, electronic equipment and storage medium

Legal Events

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

Effective date of registration: 20240520

Address after: No.006, 6th floor, building 4, No.33 yard, middle Xierqi Road, Haidian District, Beijing 100085

Patentee after: BEIJING KINGSOFT CLOUD NETWORK TECHNOLOGY Co.,Ltd.

Country or region after: China

Patentee after: Wuxi Jinyun Zhilian Technology Co.,Ltd.

Address before: Room 3f02, 33 Xiaoying West Road, Haidian District, Beijing 100085

Patentee before: BEIJING KINGSOFT CLOUD NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China