Client observation method and system, computer equipment and computer readable storage medium
By updating the mapping relationship of the data transmission protocol in client observations, the problem of low switching efficiency of observation scenes is solved, and more efficient switching of observation scenes is achieved.
Patent Information
- Application Number
- CN202411827151.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-03-28
AI Technical Summary
In client observation, the switching efficiency of the observation scenario is low, because each switch requires the developer to redevelop the data transmission protocol between the client and the server.
By obtaining the target observation scenario and attributes, update the observation attributes associated with the attribute fields in the data transmission protocol between the server and the client, obtain the mapping relationship between the attribute fields and the target observation attributes, and send it to the client. The client reports the target observation attribute value according to the mapping relationship and data transmission protocol.
It improves the switching efficiency of observation scenarios, avoids the redevelopment of the data transmission protocol every time the switching, and simplifies the development process.
Smart Images

Figure CN119718830A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a client observation method, system, computer device, computer-readable storage medium and computer program product. Background Art
[0002] Client observation refers to the process of monitoring and analyzing the operating status, performance, and user behavior of the application corresponding to the client.
[0003] In client observation, different observation scenarios correspond to different observation attributes. Each switch of observation scenarios requires developers to redevelop the data transmission protocol between various links of client observation, resulting in low switching efficiency of observation scenarios. Summary of the invention
[0004] Based on this, it is necessary to provide a client observation method, system, computer device and computer-readable storage medium that can improve the efficiency of switching observation scenes in order to address the technical problem of low efficiency of switching observation scenes mentioned above.
[0005] In a first aspect, the present application provides a client observation method, comprising:
[0006] Obtain the target observation scene of the client and the target observation attribute corresponding to the target observation scene;
[0007] Based on the target observed attribute, the observed attribute associated with the attribute field in the data transmission protocol between the server and the client is updated to obtain a mapping relationship between the attribute field and the target observed attribute;
[0008] The mapping relationship is sent to the client; the client is used to report the collected target observation attribute value under the target observation attribute to the server according to the mapping relationship and the data transmission protocol.
[0009] In one embodiment,
[0010] After sending the mapping relationship to the client, the method further includes:
[0011] Receiving a first message reported by the client; the first message carries the target observed attribute value;
[0012] The first message is parsed according to the mapping relationship to obtain the target observed attribute value.
[0013] In one embodiment, after obtaining the target observed attribute value, the method further includes:
[0014] Generate a second message according to the data transmission protocol, the mapping relationship and the target observed attribute value;
[0015] The second message is sent to a database; the database is used to parse the second message according to the mapping relationship, obtain the target observation attribute and the target observation attribute value, and save them.
[0016] In one embodiment, after sending the second message to the database, the method further includes:
[0017] When data processing is required for the target observed attribute value, a third message carrying the target observed attribute value is obtained from the database; the database is used to generate the third message according to the data transmission protocol, the mapping relationship and the target observed attribute value;
[0018] Parse the third message according to the mapping relationship to obtain the target observed attribute value;
[0019] Perform corresponding data processing on the target observed attribute value.
[0020] In one of the embodiments, the target observation attributes include business attributes of the target observation scenario and performance attributes of a terminal on which the client is installed;
[0021] The method further comprises:
[0022] When an abnormality is detected in the client, the cause of the abnormality in the client is identified according to the target observed attribute value of the service attribute and the target observed attribute value of the performance attribute.
[0023] In a second aspect, the present application also provides a client observation method, which is applied to a client, comprising:
[0024] When it is necessary to report the target observation attribute value under the target observation attribute corresponding to the target observation scene to the server, determine the mapping relationship between the attribute field in the data transmission protocol between the server and the client and the target observation attribute; the server is used to obtain the target observation scene and the target observation attribute, and based on the target observation attribute, update the observation attribute associated with the attribute field to obtain the mapping relationship, and send the mapping relationship to the client;
[0025] According to the mapping relationship and the data transmission protocol, the collected target observation attribute value is reported to the server.
[0026] In one embodiment, reporting the collected target observed attribute value to the server according to the mapping relationship and the data transmission protocol includes:
[0027] Generate a first message according to the data transmission protocol, the mapping relationship and the target observed attribute value;
[0028] Report the first message to the server.
[0029] In a third aspect, the present application also provides a client observation system, including a server and a client;
[0030] The server is used to obtain the target observation scene of the client and the target observation attribute corresponding to the target observation scene, and based on the target observation attribute, update the observation attribute associated with the attribute field in the data transmission protocol between the server and the client, obtain the mapping relationship between the attribute field and the target observation attribute, and send the mapping relationship to the client;
[0031] The client is used to determine the mapping relationship when it is necessary to report the target observed attribute value to the server, and report the collected target observed attribute value to the server according to the mapping relationship and the data transmission protocol.
[0032] In a fourth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0033] Obtain the target observation scene of the client and the target observation attribute corresponding to the target observation scene;
[0034] Based on the target observed attribute, the observed attribute associated with the attribute field in the data transmission protocol between the server and the client is updated to obtain a mapping relationship between the attribute field and the target observed attribute;
[0035] The mapping relationship is sent to the client; the client is used to report the collected target observation attribute value under the target observation attribute to the server according to the mapping relationship and the data transmission protocol.
[0036] In one embodiment, when the processor executes the computer program, the following steps are implemented:
[0037] Receiving a first message reported by the client; the first message carries the target observed attribute value;
[0038] The first message is parsed according to the mapping relationship to obtain the target observed attribute value.
[0039] In one embodiment, when the processor executes the computer program, the following steps are implemented:
[0040] Generate a second message according to the data transmission protocol, the mapping relationship and the target observed attribute value;
[0041] The second message is sent to a database; the database is used to parse the second message according to the mapping relationship, obtain the target observation attribute and the target observation attribute value, and save them.
[0042] In one embodiment, when the processor executes the computer program, the following steps are implemented:
[0043] When data processing is required for the target observed attribute value, a third message carrying the target observed attribute value is obtained from the database; the database is used to generate the third message according to the data transmission protocol, the mapping relationship and the target observed attribute value;
[0044] Parse the third message according to the mapping relationship to obtain the target observed attribute value;
[0045] Perform corresponding data processing on the target observed attribute value.
[0046] In one embodiment, when the processor executes the computer program, the following steps are implemented:
[0047] When an abnormality is detected in the client, the cause of the abnormality in the client is identified according to the target observed attribute value of the service attribute and the target observed attribute value of the performance attribute.
[0048] In one embodiment, when the processor executes the computer program, the following steps are implemented:
[0049] When it is necessary to report the target observation attribute value under the target observation attribute corresponding to the target observation scene to the server, determine the mapping relationship between the attribute field in the data transmission protocol between the server and the client and the target observation attribute; the server is used to obtain the target observation scene and the target observation attribute, and based on the target observation attribute, update the observation attribute associated with the attribute field to obtain the mapping relationship, and send the mapping relationship to the client;
[0050] According to the mapping relationship and the data transmission protocol, the collected target observation attribute value is reported to the server.
[0051] In one embodiment, when the processor executes the computer program, the following steps are implemented:
[0052] Generate a first message according to the data transmission protocol, the mapping relationship and the target observed attribute value;
[0053] Report the first message to the server.
[0054] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0055] Obtain the target observation scene of the client and the target observation attribute corresponding to the target observation scene;
[0056] Based on the target observed attribute, the observed attribute associated with the attribute field in the data transmission protocol between the server and the client is updated to obtain a mapping relationship between the attribute field and the target observed attribute;
[0057] The mapping relationship is sent to the client; the client is used to report the collected target observation attribute value under the target observation attribute to the server according to the mapping relationship and the data transmission protocol.
[0058] In one embodiment, when the computer program is executed by a processor, the following steps are implemented:
[0059] Receiving a first message reported by the client; the first message carries the target observed attribute value;
[0060] The first message is parsed according to the mapping relationship to obtain the target observed attribute value.
[0061] In one embodiment, when the computer program is executed by a processor, the following steps are implemented:
[0062] Generate a second message according to the data transmission protocol, the mapping relationship and the target observed attribute value;
[0063] The second message is sent to a database; the database is used to parse the second message according to the mapping relationship, obtain the target observation attribute and the target observation attribute value, and save them.
[0064] In one embodiment, when the computer program is executed by a processor, the following steps are implemented:
[0065] When data processing is required for the target observed attribute value, a third message carrying the target observed attribute value is obtained from the database; the database is used to generate the third message according to the data transmission protocol, the mapping relationship and the target observed attribute value;
[0066] Parse the third message according to the mapping relationship to obtain the target observed attribute value;
[0067] Perform corresponding data processing on the target observed attribute value.
[0068] In one embodiment, when the computer program is executed by a processor, the following steps are implemented:
[0069] When an abnormality is detected in the client, the cause of the abnormality in the client is identified according to the target observed attribute value of the service attribute and the target observed attribute value of the performance attribute.
[0070] In one embodiment, when the computer program is executed by a processor, the following steps are implemented:
[0071] When it is necessary to report the target observation attribute value under the target observation attribute corresponding to the target observation scene to the server, determine the mapping relationship between the attribute field in the data transmission protocol between the server and the client and the target observation attribute; the server is used to obtain the target observation scene and the target observation attribute, and based on the target observation attribute, update the observation attribute associated with the attribute field to obtain the mapping relationship, and send the mapping relationship to the client;
[0072] According to the mapping relationship and the data transmission protocol, the collected target observation attribute value is reported to the server.
[0073] In one embodiment, when the computer program is executed by a processor, the following steps are implemented:
[0074] Generate a first message according to the data transmission protocol, the mapping relationship and the target observed attribute value;
[0075] Report the first message to the server.
[0076] The above-mentioned client observation method, system, computer device and computer-readable storage medium, first, the server obtains the target observation scene of the client and the target observation attribute corresponding to the target observation scene; then, based on the target observation attribute, the server updates the observation attribute associated with the attribute field in the data transmission protocol between the client and the server to obtain the mapping relationship between the attribute field and the target observation attribute; then, the server sends the mapping relationship to the client; the client is used to report the target observation attribute value under the collected target observation attribute to the server according to the mapping relationship and the data transmission protocol. In this way, by updating the observation attribute associated with the attribute field in the data transmission protocol, the mapping relationship between the attribute field and the target observation attribute can be obtained, and by sending the mapping relationship to the client, when the client reports the target observation attribute value, it can clearly know which target observation attribute values need to be reported based on the mapping relationship and report them, avoiding the redevelopment of the data transmission protocol between the various links of the client observation when switching the observation scene, and improving the switching efficiency of the observation scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0078] Figure 1 An application environment diagram of a client observation method in an embodiment;
[0079] Figure 2 A schematic diagram of a process of a client observation method in one embodiment;
[0080] Figure 3 A schematic diagram of a flow chart of steps for obtaining a target observed attribute value in one embodiment;
[0081] Figure 4 A schematic diagram of a process for saving target observed attribute values in one embodiment;
[0082] Figure 5 A schematic flow chart of the steps of performing data processing on target observed attribute values in one embodiment;
[0083] Figure 6 is a flow chart of a client observation method in another embodiment;
[0084] Figure 7A flowchart of the steps of reporting the collected target observed attribute values to the server according to the mapping relationship and the data transmission protocol in one embodiment;
[0085] Figure 8 A schematic diagram of various links observed by a client in one embodiment;
[0086] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0087] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0088] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0089] The client observation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. The application environment is a client observation system, which includes a server 102 and multiple clients 104. The server 102 communicates with the client 104 through a network. Among them, the server 102 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services; the client 104 is an application corresponding to the server 102 and providing local services to users. The client 104 is installed on a terminal, and the terminal can be but not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc.
[0090] Specifically, the server 102 is used to obtain the target observation scene of the client 104 and the target observation attributes corresponding to the target observation scene. Based on the target observation attributes, the server 102 updates the observation attributes associated with the attribute fields in the data transmission protocol between the server 102 and the client 104, obtains the mapping relationship between the attribute fields and the target observation attributes, and sends the mapping relationship to the client 104.
[0091] The client 104 is used to determine the mapping relationship when it is necessary to report the target observed attribute value to the server 102, and report the collected target observed attribute value to the server 102 according to the mapping relationship and the data transmission protocol.
[0092] In a specific application, the client observation system also includes a database for storing the acquired observation attribute values.
[0093] In an exemplary embodiment, Figure 2 As shown, a client observation method is provided, which is applied to Figure 1 The server in the example is used to illustrate, including the following steps S202 to S208:
[0094] Step S202, obtaining the target observation scene of the client and the target observation attributes corresponding to the target observation scene.
[0095] Among them, client observation refers to the process of monitoring and analyzing the running status, performance and user behavior of the application corresponding to the client. In client observation, different observation scenarios correspond to different observation attributes; observation attributes refer to the information that needs to be observed for the client; for example, observation scenario A needs to observe observation attributes such as user name, user gender, purchase object, payment channel, and payment duration, and observation scenario B needs to observe observation attributes such as the memory occupied by the client, the CPU (Central Processing Unit) occupied by the client, the power of the terminal equipped with the client, and the type of terminal equipped with the client.
[0096] Among them, the target observation scene is the observation scene to be switched to, for example, the current observation scene for the client is observation scene A, and it needs to be switched to observation scene B, then observation scene B is the target observation scene.
[0097] The target observation attribute refers to the observation attribute that needs to be observed for the client in the target observation scenario. In a specific application, there is at least one target observation attribute.
[0098] Specifically, the server obtains the observation scene to be switched to by the client, obtains the target observation scene, and obtains the observation attributes that need to be observed for the client in the target observation scene, obtains the target observation attributes.
[0099] In a specific application, the server may receive an observation scene switching instruction input by a developer, and obtain a corresponding target observation scene based on the observation scene switching instruction.
[0100] In an actual application, the server presets a mapping relationship between observation scenes and observation attributes. Based on the target observation scene, the server queries the mapping relationship between the observation scene and the observation attribute to determine the target observation attribute corresponding to the target observation scene.
[0101] In another practical application, the server receives the observation attributes input by the developer and determines the observation attributes input by the developer as the target observation attributes corresponding to the target observation scene. For example, the server is equipped with a client observation platform, and there is a configuration page in the client observation platform. The developer can configure the observation scene and observation attributes through the configuration page. The server receives the observation scene to be switched to input by the developer in the configuration page, obtains the target observation scene, and receives the observation attributes input by the developer in the configuration page, and obtains the target observation attributes under the target observation scene.
[0102] In actual applications, the observation scenarios and the observation attributes corresponding to the observation scenarios can be flexibly set according to the business needs of the client developer.
[0103] Step S204: based on the target observed attribute, the observed attribute associated with the attribute field in the data transmission protocol between the server and the client is updated to obtain a mapping relationship between the attribute field and the target observed attribute.
[0104] Among them, the data transmission protocol refers to a set of rules and standards used to guide how servers and clients communicate and exchange data; the data transmission protocol defines how data is formatted, sent, received, and parsed, thereby ensuring that information can be understood and processed between servers and clients.
[0105] In a specific application, the data transmission protocol includes multiple attribute fields, each of which is a customizable field of an associated observation attribute; the data transmission protocol is equivalent to a message template that defines a data transmission message between a server and a client.
[0106] In specific applications, the mapping relationship represents which target observation attribute each attribute field in the data transmission protocol corresponds to in the target observation scenario.
[0107] Specifically, for each target observation attribute, the server determines the target attribute field corresponding to the target observation attribute in each attribute field of the data transmission protocol, and then the server configures the target observation attribute to the target attribute field, thereby realizing the update of the observation attribute associated with the target attribute field; based on the above process, the server configures each target observation attribute to the corresponding target attribute field to obtain the mapping relationship between the attribute field and the target observation attribute.
[0108] In a specific application, before updating, the observation attribute associated with the attribute field can be empty or can be a historical observation attribute corresponding to a historical observation scenario.
[0109] In a specific application, if there is no identical observation attribute in the historical observation attributes corresponding to the historical observation scene that is identical to the target observation attribute corresponding to the target observation scene, the server selects one of the attribute fields as the target attribute field of the target observation attribute. If there is an identical observation attribute in the historical observation attributes corresponding to the historical observation scene that is identical to the target observation attribute corresponding to the target observation scene, the server associates any one of the different observation attributes (historical observation attributes other than the identical observation attributes in the historical observation attributes) in each attribute field as the target attribute field of the target observation attribute.
[0110] In actual applications, before configuring the target observation attribute to the corresponding target attribute field, the server may first reset (clear) the observation attributes associated with the attribute fields associated with different historical observation attributes in each attribute field.
[0111] In actual applications, developers can view and update the observation properties associated with each attribute field in the configuration page of the client observation platform; for example, developers can fill in or configure the observation properties associated with each attribute field in the configuration page, thereby realizing the update of the observation properties associated with the attribute field.
[0112] For example, assuming that the historical observation scenario is observation scenario A, and the corresponding historical observation attributes are payment channel and payment duration, the corresponding historical mapping relationship is shown in Table 1:
[0113] Table 1 Mapping relationship under observation scenario A
[0114]
[0115] Assuming that the server currently needs to switch to observation scene B, and the corresponding target observation attributes are memory usage and CPU usage, the server obtains the mapping relationship shown in Table 2:
[0116] Table 2 Mapping relationship under observation scenario B
[0117]
[0118] Step S206: sending the mapping relationship to the client.
[0119] Among them, the client is used to report the target observation attribute values under the collected target observation attributes to the server according to the mapping relationship and the data transmission protocol.
[0120] Specifically, the server sends the mapping relationship to the client; then, when the client needs to report the corresponding target observation attribute value to the server, the client first determines the mapping relationship, and based on the mapping relationship, determines which observation attribute values need to be reported, that is, the target observation attribute values corresponding to the target observation scene, and then reports the collected target observation attribute values to the server based on the mapping relationship and the data transmission protocol.
[0121] For example, when the client reports the target observation attribute value under observation scenario B, based on the mapping relationship shown in Table 2, the memory occupancy rate is written into the attribute field 1 of the data transmission protocol, and the CPU occupancy rate is written into the attribute field 2 of the data transmission protocol, and reported to the server.
[0122] In the above-mentioned client observation method, first, the server obtains the target observation scene of the client and the target observation attribute corresponding to the target observation scene; then, based on the target observation attribute, the server updates the observation attribute associated with the attribute field in the data transmission protocol between the client and the server to obtain the mapping relationship between the attribute field and the target observation attribute; then, the server sends the mapping relationship to the client; the client is used to report the target observation attribute value under the collected target observation attribute to the server according to the mapping relationship and the data transmission protocol. In this way, by updating the observation attribute associated with the attribute field in the data transmission protocol, the mapping relationship between the attribute field and the target observation attribute can be obtained. By sending the mapping relationship to the client, when the client reports the target observation attribute value, it can clearly know which target observation attribute values need to be reported based on the mapping relationship and report them, avoiding the redevelopment of the data transmission protocol between the various links of the client observation when switching the observation scene, and improving the switching efficiency of the observation scene.
[0123] In an exemplary embodiment, Figure 3 As shown, after sending the mapping relationship to the client in the above step S206, the following steps are specifically included to obtain the target observed attribute value:
[0124] Step S302: receiving a first message reported by the client.
[0125] Step S304: parse the first message according to the mapping relationship to obtain the target observed attribute value.
[0126] The first message carries the target observation attribute value.
[0127] Specifically, the server receives the first message reported by the client, parses the first message according to the mapping relationship, and reads each target observation attribute value from the corresponding field of the first message; for example, based on the mapping relationship, the server reads the field value of each attribute field from the first message to obtain the target observation attribute value corresponding to the target observation attribute associated with each attribute field.
[0128] For example, based on the mapping relationship shown in Table 2, the server reads the memory occupancy rate from attribute field 1 of the first message, and reads the CPU occupancy rate from attribute field 2 of the first message.
[0129] In this embodiment, the server can parse the corresponding target observed attribute value from the first message through the mapping relationship, thereby obtaining the target observed attribute value.
[0130] In an exemplary embodiment, Figure 4 As shown, after obtaining the target observed attribute value in the above step S304, the following steps are specifically included to save the target observed attribute value:
[0131] Step S402: Generate a second message according to the data transmission protocol, the mapping relationship and the target observed attribute value.
[0132] Step S404: Send the second message to the database.
[0133] The database is used to parse the second message according to the mapping relationship, obtain the target observation attribute and the target observation attribute value and save them. Figure 1 The client observation system shown also includes a database, which can be located in the server or independent of the server.
[0134] In a specific application, the data transmission protocol between the various parts of the client observation system is the same, that is, the data transmission protocol between the server and the database is the same as the data transmission protocol between the server and the client.
[0135] Specifically, the server writes each target observation attribute value into the corresponding field of the data transmission protocol according to the mapping relationship to obtain a second message; for example, the server writes each target observation attribute as the field value of the corresponding attribute field into the attribute field of the data transmission protocol.
[0136] The server then sends the second message to the database.
[0137] After receiving the second message, the database obtains the mapping relationship, parses the second message according to the mapping relationship, reads each target observation attribute value from the corresponding field of the second message, and saves each target observation attribute and its corresponding target observation attribute value; for example, based on the mapping relationship, the database reads the field value of each attribute field from the second message, and obtains the target observation attribute value corresponding to the target observation attribute associated with each attribute field.
[0138] For example, based on the mapping relationship shown in Table 2, the server writes the memory occupancy rate into attribute field 1 of the data transmission protocol and writes the CPU occupancy rate into attribute field 2 of the data transmission protocol, obtains the second message, and sends the second message to the database.
[0139] Based on the mapping relationship shown in Table 2, the database reads the memory occupancy rate from attribute field 1 of the second message and saves it, and reads the CPU occupancy rate from attribute field 2 of the second message and saves it.
[0140] In this embodiment, based on the mapping relationship, on the one hand, the server can generate a second message that can be processed by the database, and then transmit the target observation attribute value to the database; on the other hand, the database can parse the second message to obtain the target observation attribute value that needs to be saved.
[0141] In an exemplary embodiment, Figure 5 As shown, in the above step S304, after sending the second message to the database, the following steps are specifically included for performing data processing on the target observed attribute value:
[0142] Step S502: when data processing is required for the target observed attribute value, a third message carrying the target observed attribute value is obtained from the database.
[0143] Step S504: parse the third message according to the mapping relationship to obtain the target observed attribute value.
[0144] Step S506, performing corresponding data processing on the target observed attribute value.
[0145] The database is used to generate the third message according to the data transmission protocol, the mapping relationship and the target observed attribute value. In a specific application, the server can directly read the third message from the database, or receive the third message sent by the database.
[0146] Among them, data processing includes but is not limited to analyzing and displaying the target observation attribute values.
[0147] Specifically, the server sends a request to obtain the target observation attribute value to the database. The database responds to the request, obtains the mapping relationship, and writes each target observation attribute value into the corresponding field of the data transmission protocol according to the mapping relationship to obtain a third message; for example, the database writes each target observation attribute into the attribute field of the data transmission protocol as the field value of the corresponding attribute field.
[0148] Then, the server obtains the third message from the database, parses the third message according to the mapping relationship, reads out each target observation attribute value from the corresponding field of the third message, and analyzes and displays it; for example, based on the mapping relationship, the server reads out the field value of each attribute field from the third message, and obtains the target observation attribute value corresponding to the target observation attribute associated with each attribute field.
[0149] For example, based on the mapping relationship shown in Table 2, the database writes the memory occupancy rate into the attribute field 1 of the data transmission protocol, and writes the CPU occupancy rate into the attribute field 2 of the data transmission protocol.
[0150] After the server obtains the third message, based on the mapping relationship shown in Table 2, it reads the memory occupancy rate from attribute field 1 of the third message and reads the CPU occupancy rate from attribute field 2 of the third message.
[0151] In this embodiment, based on the mapping relationship, on the one hand, the database can generate a third message that can be processed by the server, and then transmit the target observation attribute value to the server; on the other hand, the server can parse the third message to obtain the target observation attribute value that requires data processing.
[0152] In the above step S506, after the corresponding data processing is performed on the target observation attribute value, the following contents are specifically included: the server receives the data processing result display instruction; the data processing result display instruction carries the targeted attribute field; the server determines the attribute field targeted by the data processing result display instruction; the server determines the target observation attribute corresponding to the attribute field based on the current mapping relationship, and obtains the data processing result corresponding to the target observation attribute and displays it.
[0153] In an exemplary embodiment, in the above step S506, after the corresponding data processing is performed on the target observation attribute value, the following contents are specifically included: the server receives the data processing result display instruction; the data processing result display instruction carries the targeted target observation attribute; the server obtains the data processing result corresponding to the target observation attribute and displays it.
[0154] In an exemplary embodiment, the target observation attributes include business attributes of the target observation scenario and performance attributes of a terminal on which the client is installed.
[0155] Among them, business attributes are used to characterize the user behavior of the user in the client, including but not limited to user name, user gender, purchase object, payment channel, payment time, payment amount, etc.
[0156] Among them, performance attributes are used to characterize the performance of the terminal, including but not limited to the terminal's memory, the terminal's CPU, the client's memory usage on the terminal, the client's CPU usage on the terminal, the terminal current, whether the terminal or client crashes, the terminal type, the network type, the region, etc.
[0157] The client observation method provided in the present application also includes the following contents: when an abnormality is detected in the client, the cause of the abnormality of the client is identified according to the target observation attribute value of the business attribute and the target observation attribute value of the performance attribute.
[0158] Among them, anomalies refer to abnormal events, including but not limited to payment failure, long page refresh time, long payment time, client crash, etc.
[0159] Specifically, the server monitors the client in real time, and in the event of an abnormal event at the client, identifies the cause of the abnormal event based on the target observed attribute value of the client under the business attribute and the target observed attribute value under the performance attribute.
[0160] For example, the server detects that the client frequently fails to pay. Based on the target observed attribute value under the business attribute and the target observed attribute value under the performance attribute, it is determined that the reason for the high payment failure rate is that the network in the terminal area is not good.
[0161] In this embodiment, the server can identify the cause of the client abnormality based on the analysis of the target observed attribute value, which facilitates subsequent business decisions for the client.
[0162] Based on the same inventive concept, the embodiment of the present application also provides a method for implementing the above-mentioned client observation method applied to the client. The implementation scheme for solving the problem provided by the client observation method applied to the client is similar to the implementation scheme recorded in the above-mentioned client observation method applied to the server, so the specific limitations in one or more embodiments of the client observation method applied to the client provided below can refer to the limitations of the client observation method applied to the server above, and will not be repeated here.
[0163] In an exemplary embodiment, Figure 6 As shown, another client observation method is provided, which is applied to Figure 1 The client in the example is used to illustrate, including the following steps S602 to S604:
[0164] Step S602, when it is necessary to report the target observation attribute value under the target observation attribute corresponding to the target observation scene to the server, determine the mapping relationship between the attribute field in the data transmission protocol between the server and the client and the target observation attribute.
[0165] The server is used to obtain the target observation scene and the target observation attributes, update the observation attributes associated with the attribute fields based on the target observation attributes, obtain the mapping relationship, and send the mapping relationship to the client.
[0166] Specifically, when the client needs to report the target observed attribute value, it first determines the mapping relationship obtained from the server, and determines the observed attribute associated with each attribute field in the mapping relationship as the target observed attribute whose target observed attribute value needs to be reported.
[0167] In a specific application, the client reports the observed attribute value to the server in response to the observed attribute value reporting instruction issued by the server.
[0168] In another specific application, the client reports the observed attribute value to the server at a preset time interval.
[0169] Step S604: Report the collected target observed attribute values to the server according to the mapping relationship and the data transmission protocol.
[0170] Specifically, the client reports the collected attribute values of each target observation to the server according to the mapping relationship and data transmission protocol.
[0171] For example, based on the mapping relationship shown in Table 2, the client determines that the target observation attributes are memory usage and CPU usage, and then based on the mapping relationship shown in Table 2, writes the memory usage into attribute field 1 of the data transmission protocol and writes the CPU usage into attribute field 2 of the data transmission protocol, and reports them to the server.
[0172] In this embodiment, when the client reports the target observation attribute value, it uses the mapping relationship to clarify which target observation attribute values need to be reported and report them, avoiding the redevelopment of the data transmission protocol between the various links observed by the client when switching the observation scene, thereby improving the switching efficiency of the observation scene.
[0173] In an exemplary embodiment, Figure 7 As shown, the above step S604, according to the mapping relationship and the data transmission protocol, reports the collected target observation attribute value to the server, specifically including the following steps:
[0174] Step S702: Generate a first message according to the data transmission protocol, the mapping relationship and the target observed attribute value.
[0175] Step S704: reporting the first message to the server.
[0176] Specifically, the client obtains the collected target observation attribute values under the target observation attribute, and writes each target observation attribute value into the corresponding field of the data transmission protocol according to the mapping relationship, and obtains the first message carrying each target observation attribute value; for example, the client writes each target observation attribute value into the attribute field of the data transmission protocol as the field value of the corresponding attribute field.
[0177] Then, the client sends the first message to the server, and the server parses the first message according to the mapping relationship, and reads each target observation attribute value from the corresponding field of the first message; for example, based on the mapping relationship, the server reads the field value of each attribute field from the first message, and obtains the target observation attribute value corresponding to the target observation attribute associated with each attribute field.
[0178] For example, based on the mapping relationship shown in Table 2, the client writes the memory occupancy rate into the attribute field 1 of the data transmission protocol and writes the CPU occupancy rate into the attribute field 2 of the data transmission protocol to obtain the first message.
[0179] Then, based on the mapping relationship shown in Table 2, the server reads the memory occupancy rate from attribute field 1 of the first message, and reads the CPU occupancy rate from attribute field 2 of the first message.
[0180] In this embodiment, based on the mapping relationship, the client can generate a first message that can be processed by the server, and then transmit the target observed attribute value to the server.
[0181] In an exemplary embodiment, the client observation method provided by the present application specifically further includes the following contents: the client collects observation attribute values under a plurality of preset observation attributes.
[0182] In the above step S702, before generating the first message according to the data transmission protocol, the mapping relationship and the target observed attribute value, the following content is specifically included: the client obtains the target observed attribute value under the target observed attribute from multiple observed attribute values.
[0183] In order to more clearly illustrate the client observation method provided by the embodiment of the present application, the client observation method is specifically described below with a specific embodiment, but it should be understood that the embodiment of the present application is not limited to this. In one of the exemplary embodiments, the present application also provides a method for customizing the addition of observation attributes in the client observation scenario, which specifically includes the following contents:
[0184] In client observation, different observation scenarios correspond to different observation attributes. Figure 8The figure shows a schematic diagram of each link observed by the client. The protocols in each link are strictly consistent. Therefore, each time the observed attribute changes, the protocol in each link needs to be modified, otherwise it will cause data transmission failure, which will lead to a long time cycle and slow response.
[0185] This embodiment proposes a method for customizing and adding observation attributes in a client observation scenario. In this method, the protocol of each link includes multiple custom fields, and the observation attribute associated with each custom field can be custom configured by the developer.
[0186] When developers need to change observation properties (such as adding, deleting, replacing, etc.), they only need to configure the observation properties associated with the custom fields in the configuration menu in the client observation system, such as filling in or modifying them; then when each link generates a transmission message, it can inject the attribute value of the observation property associated with the custom field into the custom field in the protocol according to the association relationship in the configuration menu, without the need to modify the protocol itself or perform secondary development; when the next link parses the transmission message, it will also parse the attribute value of the observation property associated with the custom field from the custom field in the protocol according to the association relationship in the configuration menu.
[0187] In this embodiment, when it is necessary to switch the observation scenario, dynamic configuration is used to communicate between the client and the server. It is no longer necessary to modify the development from the client to the server. Only the configuration needs to be modified, which improves the development efficiency and avoids the disadvantage of having to modify the structured protocol every time the observation attributes are changed. It greatly improves the work efficiency in this scenario and saves time and labor costs.
[0188] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0189] Based on the same inventive concept, the embodiment of the present application also provides a client observation system for implementing the client observation method involved above. The implementation solution provided by the system to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more client observation system embodiments provided below can refer to the limitations on the client observation method above, and will not be repeated here.
[0190] In an exemplary embodiment, Figure 1 As shown, a client observation system is provided, including: a server 102 and a client 104, wherein:
[0191] Server 102 is used to obtain the client's 104 target observation scene and the target observation attributes corresponding to the target observation scene. Based on the target observation attributes, the observation attributes associated with the attribute fields in the data transmission protocol between the server 102 and the client 104 are updated to obtain the mapping relationship between the attribute fields and the target observation attributes, and the mapping relationship is sent to the client 104.
[0192] The client 104 is used to determine the mapping relationship when it is necessary to report the target observed attribute value to the server 102, and report the collected target observed attribute value to the server 102 according to the mapping relationship and the data transmission protocol.
[0193] In an exemplary embodiment, the server 102 is further used to receive a first message reported by the client 104; the first message carries a target observed attribute value; and the first message is parsed according to the mapping relationship to obtain the target observed attribute value.
[0194] In an exemplary embodiment, the client 104 is further configured to generate a first message according to the data transmission protocol, the mapping relationship and the target observed attribute value; and report the first message to the server 102 .
[0195] In an exemplary embodiment, the client observation system also includes a database.
[0196] The server 102 is further configured to generate a second message according to the data transmission protocol, the mapping relationship and the target observed attribute value; and send the second message to the database;
[0197] The database is used to parse the second message according to the mapping relationship, obtain the target observation attribute and the target observation attribute value, and save them.
[0198] In an exemplary embodiment, the server 102 is also used to obtain a third message carrying the target observation attribute value from the database when data processing of the target observation attribute value is required; parse the third message according to the mapping relationship to obtain the target observation attribute value; and perform corresponding data processing on the target observation attribute value.
[0199] The database is used to generate a third message according to the data transmission protocol, the mapping relationship and the target observation attribute value.
[0200] In an exemplary embodiment, the target observation attributes include business attributes of the target observation scenario and performance attributes of the terminal where the client 104 is installed.
[0201] The server 102 is also used to identify the cause of the abnormality of the client 104 according to the target observed attribute values of the business attributes and the target observed attribute values of the performance attributes when detecting that the client 104 is abnormal.
[0202] Each module in the above client observation system can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0203] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a bus, and the communication interface is connected to the bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores operations, computer programs and databases. The internal memory provides an environment for the operation of operations and computer programs in the non-volatile storage medium. The database of the computer device is used to store the observed attribute values of the client. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a client observation method is implemented.
[0204] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0205] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0206] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0207] In an exemplary embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0208] Obtain the client's target observation scene and the target observation attributes corresponding to the target observation scene;
[0209] Based on the target observation attribute, the observation attribute associated with the attribute field in the data transmission protocol between the server and the client is updated to obtain a mapping relationship between the attribute field and the target observation attribute;
[0210] The mapping relationship is sent to the client; the client is used to report the target observation attribute value under the collected target observation attribute to the server according to the mapping relationship and the data transmission protocol.
[0211] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0212] Receive a first message reported by the client; the first message carries a target observation attribute value;
[0213] The first message is parsed according to the mapping relationship to obtain the target observed attribute value.
[0214] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0215] Generate a second message according to the data transmission protocol, the mapping relationship and the target observed attribute value;
[0216] The second message is sent to the database; the database is used to parse the second message according to the mapping relationship, obtain the target observation attribute and the target observation attribute value, and save them.
[0217] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0218] When data processing is required for the target observed attribute value, a third message carrying the target observed attribute value is obtained from the database; the database is used to generate the third message according to the data transmission protocol, the mapping relationship and the target observed attribute value;
[0219] Parse the third message according to the mapping relationship to obtain the target observation attribute value;
[0220] Perform corresponding data processing on the target observed attribute values.
[0221] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0222] When an abnormality is detected on the client, the cause of the abnormality on the client is identified based on the target observed attribute values of the business attributes and the target observed attribute values of the performance attributes.
[0223] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0224] When it is necessary to report the target observation attribute value under the target observation attribute corresponding to the target observation scene to the server, determine the mapping relationship between the attribute field in the data transmission protocol between the server and the client and the target observation attribute; the server is used to obtain the target observation scene and the target observation attribute, update the observation attribute associated with the attribute field based on the target observation attribute, obtain the mapping relationship, and send the mapping relationship to the client;
[0225] According to the mapping relationship and data transmission protocol, the collected target observation attribute values are reported to the server.
[0226] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0227] Generate a first message according to the data transmission protocol, the mapping relationship and the target observation attribute value;
[0228] Report the first message to the server.
[0229] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0230] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0231] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A client observation method, characterized in that: Applied to a server, the method comprises: Obtain the target observation scene of the client and the target observation attribute corresponding to the target observation scene; Based on the target observed attribute, the observed attribute associated with the attribute field in the data transmission protocol between the server and the client is updated to obtain a mapping relationship between the attribute field and the target observed attribute; The mapping relationship is sent to the client; the client is used to report the collected target observation attribute value under the target observation attribute to the server according to the mapping relationship and the data transmission protocol.
2. The method according to claim 1, characterized in that After sending the mapping relationship to the client, the method further includes: Receiving a first message reported by the client; the first message carries the target observed attribute value; The first message is parsed according to the mapping relationship to obtain the target observed attribute value.
3. The method according to claim 2, characterized in that After obtaining the target observed attribute value, the method further includes: Generate a second message according to the data transmission protocol, the mapping relationship and the target observed attribute value; The second message is sent to a database; the database is used to parse the second message according to the mapping relationship, obtain the target observation attribute and the target observation attribute value, and save them.
4. The method according to claim 3, characterized in that After sending the second message to the database, the method further includes: When data processing is required for the target observed attribute value, a third message carrying the target observed attribute value is obtained from the database; the database is used to generate the third message according to the data transmission protocol, the mapping relationship and the target observed attribute value; Parse the third message according to the mapping relationship to obtain the target observed attribute value; Perform corresponding data processing on the target observed attribute value.
5. The method according to any one of claims 2 to 4, characterized in that: The target observation attributes include the service attributes of the target observation scenario and the performance attributes of the terminal on which the client is installed; The method further comprises: When an abnormality is detected in the client, the cause of the abnormality in the client is identified according to the target observed attribute value of the service attribute and the target observed attribute value of the performance attribute.
6. A client observation method, characterized in that: Applied to a client, the method comprises: When it is necessary to report the target observation attribute value under the target observation attribute corresponding to the target observation scene to the server, determine the mapping relationship between the attribute field in the data transmission protocol between the server and the client and the target observation attribute; the server is used to obtain the target observation scene and the target observation attribute, and based on the target observation attribute, update the observation attribute associated with the attribute field to obtain the mapping relationship, and send the mapping relationship to the client; According to the mapping relationship and the data transmission protocol, the collected target observation attribute value is reported to the server.
7. The method according to claim 6, characterized in that The step of reporting the collected target observed attribute value to the server according to the mapping relationship and the data transmission protocol includes: Generate a first message according to the data transmission protocol, the mapping relationship and the target observed attribute value; Report the first message to the server.
8. A client observation system, characterized in that: The system includes a server and a client; The server is used to obtain the target observation scene of the client and the target observation attribute corresponding to the target observation scene, and based on the target observation attribute, update the observation attribute associated with the attribute field in the data transmission protocol between the server and the client, obtain the mapping relationship between the attribute field and the target observation attribute, and send the mapping relationship to the client; The client is used to determine the mapping relationship when it is necessary to report the target observed attribute value to the server, and report the collected target observed attribute value to the server according to the mapping relationship and the data transmission protocol.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.