Log information uploading and processing method and device and storage medium

By establishing a data sharing channel on the terminal device and transmitting log information to the server device, the problem of not installing or not turning on the remote log service is solved, and the security and accuracy of the server device obtaining terminal device log information is achieved. sex.

CN119088775APending Publication Date: 2024-12-06BEIJING CHENGSHI WANGLIN INFORMATION TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411081820.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

In the prior art, when obtaining terminal device log information based on remote log service, the problem is that the log information cannot be obtained due to the failure to install or not turning on the remote log service.

Method used

The close-range communication framework module of the target application calls the close-range communication component of the terminal device, establishes a data sharing channel with the second terminal device running the same application around, transmits log information to the second terminal device, and then the second terminal device is then transferred from the second terminal device. The log information is transmitted to the server device through the direct transmission channel.

Benefits of technology

When the terminal device is not installed or the remote log service is not enabled, the server device can still obtain target log information safely and accurately, improving the security and acquisition efficiency of log information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088775A_ABST
    Figure CN119088775A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a log information uploading and processing method and device and a storage medium. In the method, a security sharing mechanism of internal data of the application program can be added in the development stage of the application program so as to improve the security of log information; on the basis of a direct transmission channel between terminal equipment and server equipment, a data sharing channel is additionally arranged; on the basis, under the condition that the target application program cannot directly transmit the target log information to the server-side equipment, the near field communication component can be called through the near field communication framework module to establish a data sharing channel with the surrounding terminal equipment running the same application program, and the target log information is sent to the terminal equipment; and directly transmitting the target log information to the server-side equipment through the direct transmission channel. In this way, when the remote log service is not installed on the terminal device or the remote log service is installed but not started, the server device can still safely and accurately obtain the target log information of the terminal device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a method, device and storage medium for uploading and processing log information. Background Art

[0002] In the prior art, with the development of the Internet, various applications are constantly being introduced. Applications often involve some management, maintenance, or update and upgrade issues, and need to rely on the corresponding server to analyze these issues. Specifically, the server corresponding to the application usually needs to obtain the log information generated by the application running on the terminal device based on the remote log service, so as to analyze the possible problems of the application running on the terminal device based on these log information, so as to perform subsequent management, maintenance, or update and upgrade based on the analysis results.

[0003] However, the log information acquisition scheme based on the remote log service may fail to acquire log information due to the fact that the remote log service is not installed on the terminal device or the remote log service is installed but not enabled. Therefore, a solution is urgently needed. Summary of the invention

[0004] Multiple aspects of the present application provide a log information uploading and processing method, device and storage medium, so as to enable a server-side device to obtain target log information of a terminal device more safely and accurately.

[0005] An embodiment of the present application provides a log information uploading method, which is applicable to a first terminal device, on which a target application is running, and the target application includes a short-distance communication framework module; the method includes: reading initial log information from a system file, the initial log information being used to record the running information of the target application on the first terminal device; transcoding the initial log information into target log information according to an internal data structure supported by the target application, and storing the target log information in a target storage space corresponding to the target application; in a case where the target application cannot directly transmit the target log information to a server device, calling the short-distance communication component of the terminal device through the short-distance communication framework module inside the target application to establish a data sharing channel with a second terminal device running the same application in the vicinity; sending the target log information to the second terminal device through the data sharing channel, so that the target application on the second terminal device can directly transmit the target log information to the server device through the direct transmission channel between the target application and the server device.

[0006] Further optionally, an application sandbox is running on the first terminal device, and the target application is running in the application sandbox. The application sandbox has storage space and has access rights to the system file, so that the target application can read the initial log information from the system file; according to the internal data structure supported by the target application, the initial log information is transcoded into target log information, and the target log information is stored in the target storage space corresponding to the target application, including: encrypting the initial log information, and according to the internal data structure supported by the target application, transcoding the encrypted initial log information into the target log information; according to the program identifier of the target application, determining the target storage space allocated to the target application from the storage space of the application sandbox, and storing the target log information in the target storage space.

[0007] Further optionally, the situation where the target application is unable to directly transmit the target log information to the server device includes: there is no direct transmission channel between the target application and the server device, or the direct transmission channel between the target application and the server device is closed, or when there is a direct transmission channel between the target application and the server device and the direct transmission channel is opened, the target application fails to directly transmit the target log information through the direct transmission channel.

[0008] Further optionally, through the short-range communication framework module inside the target application, the short-range communication component of the terminal device is called to establish a data sharing channel with a second terminal device running the same application nearby, including: sending a startup instruction to the short-range communication framework module inside the target application to start the short-range communication framework module; using the short-range communication framework module, sending communication parameters to the short-range communication component, so as to use the short-range communication component to search for alternative terminal devices running the same application nearby; when there are multiple alternative terminal devices, selecting the second terminal device from the multiple alternative terminal devices; using the short-range communication component, establishing a data sharing channel with the second terminal device based on the communication parameters; the communication parameters include: identification information of the first terminal device and / or identification information of the target application.

[0009] Further optionally, the business association information corresponding to any alternative terminal device includes: business level information and / or business log information of the alternative terminal device; in the case that there are multiple alternative terminal devices, selecting the second terminal device from the multiple alternative terminal devices includes: based on the business level information corresponding to the multiple alternative terminal devices, selecting an alternative terminal device whose business level meets a preset level condition from the multiple alternative terminal devices as the second terminal device; and / or, based on the business log information corresponding to the multiple alternative terminal devices, calculating the business association between the multiple alternative terminal devices and the first terminal device; selecting an alternative terminal device whose business association meets a preset association condition from the multiple alternative terminal devices as the second terminal device.

[0010] Further optionally, based on the service association information corresponding to the multiple candidate terminal devices, a second terminal device whose service association information meets preset conditions is selected from the multiple candidate terminal devices, including: based on the service association information corresponding to the multiple candidate terminal devices, selecting a target terminal device whose service association information meets preset conditions from the multiple candidate terminal devices; if there are multiple target terminal devices, determining the network quality information of the multiple target terminal devices based on at least one of the delay information, bandwidth information, packet loss rate information and jitter information of each of the multiple target terminal devices; and selecting, from the multiple target terminal devices, a target terminal device whose network quality information meets the preset quality conditions as the second terminal device.

[0011] Further optionally, utilizing the short-range communication component to establish a data sharing channel with the second terminal device based on the communication parameters includes: sending a connection establishment request to the short-range communication component on the second terminal device through the short-range communication component, the connection establishment request including identification information of the first terminal device and / or identification information of the target application, so that the target application on the second terminal device can authenticate the first terminal device and / or the target application on the first terminal device; receiving a connection establishment response sent by the short-range communication component on the second terminal device through the short-range communication component, so as to establish a data sharing channel with the second terminal device; the connection establishment response is sent when the first terminal device and / or the target application on the first terminal device passes the identity authentication.

[0012] An embodiment of the present application also provides a log information processing method, which is applied to a server device, and the method includes: receiving target log information sent by a target application running on a second terminal device through a direct channel between the target application running on the second terminal device and the server device; the target log information is sent by a target application running on a first terminal device to the second terminal device through a data sharing channel between the target application and the second terminal device when the target log information cannot be directly transmitted to the server device; analyzing whether there is an operating abnormality in the target application on the first terminal device based on the target log information; wherein the target log information is obtained by transcoding the initial log information by the target application on the first terminal device according to the internal data structure supported by the target application, and the initial log information is used to record the operating information of the target application on the first terminal device on the first terminal device.

[0013] An embodiment of the present application also provides an electronic device, comprising: a memory and a processor; wherein the memory is used to: store one or more computer instructions; the processor is used to execute the one or more computer instructions to: execute the steps in the log information uploading method or the log information processing method.

[0014] An embodiment of the present application also provides a computer-readable storage medium, which, when the computer program is executed by a processor, enables the processor to implement the steps in the log information uploading method or the log information processing method.

[0015] In this embodiment, a secure sharing mechanism for the internal data of the application can be added during the application development phase to improve the security of the log information; a data sharing channel is added based on the direct transmission channel between the terminal device and the server device; based on this, when the target application cannot directly transmit the target log information to the server device, the short-range communication framework module can be used to call the short-range communication component to establish a data sharing channel with the terminal devices running the same application around and send the target log information to them, so that they can directly transmit the target log information to the server device through the direct transmission channel. In this way, when the remote log service is not installed on the terminal device or the remote log service is installed but not enabled, the server device can still obtain the target log information of the terminal device relatively safely and accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0017] Figure 1A flow chart of a log information uploading method provided by an exemplary embodiment of the present application;

[0018] Figure 2 A flow chart of a log information processing method provided by an exemplary embodiment of the present application;

[0019] Figure 3 A schematic diagram of the structure of an electronic device provided as an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0021] With the development of the Internet, various applications are constantly being introduced. Applications often involve some management, maintenance, or update and upgrade issues, and need to rely on the corresponding server to analyze these issues. Specifically, the server corresponding to the application usually needs to obtain the log information generated by the application running on the terminal device based on the remote log service, so as to analyze the possible problems of the application running on the terminal device based on these log information, so as to perform subsequent management, maintenance, or update and upgrade based on the analysis results.

[0022] However, the log information acquisition solution based on the remote log service may fail to acquire log information due to reasons such as the remote log service is not installed on the terminal device or the remote log service is installed but not enabled.

[0023] In view of the technical problems existing in the above-mentioned prior art, a solution is provided in some embodiments of the present application. The technical solutions provided in each embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0024] Figure 1 A flow chart of a log information uploading method provided for an exemplary embodiment of the present application. This embodiment can be executed by a first terminal device, which can be a smart phone, a tablet computer, or a computer, etc., and this embodiment does not limit it. "First" is used here to limit the terminal device, and is only used to distinguish it from the second terminal devices around the terminal device.

[0025] The following will take the first terminal device as an example for an exemplary description. A target application can be run on the first terminal device, and the target application refers to an application for uploading log information to the server device, and the target application includes at least a short-range communication framework. The short-range communication framework can be any of the following: Bluetooth communication framework, ZigBee communication framework, and ultra-wideband (Ultra WideBand, UWB) communication framework, wherein the ZigBee communication framework is a low-power wireless communication technology based on the IEEE 802.15.4 standard, which is suitable for short-range, low-rate, and low-power application scenarios. The ultra-wideband communication framework is a technology that uses a very wide spectrum bandwidth for wireless communication, which can achieve high-precision positioning and high-speed data transmission. Preferably, the short-range communication framework can be a Multipeer Connectivity framework, which is used to support direct communication between multiple devices through Wi-Fi (wireless local area network) and personal Bluetooth networks, so that devices can communicate point-to-point without a network connection.

[0026] like Figure 1 As shown, the method comprises the following steps:

[0027] Step 11: read initial log information from the system file, where the initial log information is used to record the running information of the target application on the first terminal device.

[0028] Step 12: According to the internal data structure supported by the target application, the initial log information is transcoded into target log information, and the target log information is stored in the target storage space corresponding to the target application.

[0029] Step 13: When the target application cannot directly transmit the target log information to the server device, the short-range communication framework module within the target application is used to call the short-range communication component of the terminal device to establish a data sharing channel with a second terminal device running the same application nearby.

[0030] Step 14: Send the target log information to the second terminal device through the data sharing channel, so that the target application on the second terminal device can directly transmit the target log information to the server device through the direct transmission channel between the second terminal device and the server device.

[0031] In this embodiment, initial log information can be read from the system file, and the initial log information is used to record the operation information of the target application on the first terminal device. The operation information includes but is not limited to at least one of the following: application usage time information, usage frequency information, user behavior analysis information, and performance information. The user behavior analysis information is used to describe at least one of page browsing information, function usage information, and user interaction records. The interaction records can be used to record the user's click, slide, or input operations on the internal controls of the target application. The target application may have a function of scanning the corresponding system files, and the target application can read the initial log information from the system file based on this function.

[0032] After reading the initial log information, the initial log information can be transcoded into target log information according to the internal data structure supported by the target application, wherein the internal data structure supported by the target application can be a list or a dictionary or other specific data structure preset for the target application, etc., which is not limited in this embodiment. Based on this, the initial log information can be transcoded into a format adapted to the internal data structure to obtain the target log information.

[0033] Afterwards, the target log information can be stored in the target storage space corresponding to the target application. The target storage space corresponding to the target application can be any storage space pre-allocated to the target application by the operating system, and this embodiment does not limit this. In this way, a secure sharing mechanism for internal data of the application can be added during the application development stage to improve the security of the log information.

[0034] Based on this, when it is necessary to upload the target log information, the target log information can be obtained from the target storage space corresponding to the target application. In the case where the target application cannot directly transmit the target log information to the server device, the short-range communication framework module inside the target application can be used to call the short-range communication component of the terminal device to establish a data sharing channel with the second terminal device running the same application around it. In other words, the target application supports two types of data transmission channels, namely the direct transmission channel and the data sharing channel. The data sharing channel is opened on demand, that is, it is opened when the direct transmission channel is not available. Among them, the direct transmission channel can be a channel based on the HTTP (Hypertext Transfer Protocol) protocol, or it can be a channel based on other protocols, which is not limited in this embodiment.

[0035] The short-distance communication component may be a Bluetooth component or a Wi-Fi component, etc., which is not limited in this embodiment. That is, in this embodiment, by adding a short-distance communication framework module to the first terminal device, a data sharing channel can be established more efficiently based on the short-distance communication function.

[0036] The second terminal devices running the same application around the first terminal device refer to the terminal devices within the preset range of the first terminal. The preset range can be set to any range according to actual design requirements, and this embodiment does not impose any restrictions.

[0037] After establishing the data sharing channel, the target log information can be sent to the second terminal device through the data sharing channel. The target application on the second terminal device can transmit the target log information directly to the server device through the direct transmission channel between the target application and the server device, so that the server device can analyze whether there is any abnormal operation of the target application on the first terminal device based on the target log information.

[0038] In this embodiment, a secure sharing mechanism for the internal data of the application can be added during the application development phase to improve the security of the log information; a data sharing channel is added based on the direct transmission channel between the terminal device and the server device; based on this, when the target application cannot directly transmit the target log information to the server device, the short-range communication framework module can be used to call the short-range communication component to establish a data sharing channel with the terminal devices running the same application around and send the target log information to them, so that they can directly transmit the target log information to the server device through the direct transmission channel. In this way, when the remote log service is not installed on the terminal device or the remote log service is installed but not enabled, the server device can still obtain the target log information of the terminal device relatively safely and accurately.

[0039] In some optional embodiments, an application sandbox may be running on the first terminal device, and the target application is running in the application sandbox. The application sandbox has storage space and access rights to system files. Based on this, the target application can read initial log information from the system file. Among them, when the application sandbox is started, it can apply for memory space from the operating system of the first terminal device, and then the operating system can allocate at least part of the memory space to the application running in the application sandbox, so that the application sandbox has storage space.

[0040] The application sandbox is an isolation mechanism for security protection purposes that limits the code access rights of the target application. The target application running in the sandbox can access specific resources and is isolated from other applications and system resources, thereby improving the security of the target application's operation and the security of the data it stores.

[0041] Based on this, step 12 in the aforementioned embodiment, "transcoding the initial log information into target log information according to the internal data structure supported by the target application, and storing the target log information in the target storage space corresponding to the target application" can be implemented based on the following steps:

[0042] Step 121: encrypt the initial log information, and transcode the encrypted initial log information into target log information according to the internal data structure supported by the target application.

[0043] Step 122: According to the program identifier of the target application, determine the target storage space allocated to the target application from the storage space of the application sandbox, and store the target log information in the target storage space.

[0044] In this embodiment, the initial log information can be encrypted using any encryption algorithm, such as DES (Data Encryption Standard) or AES (Advanced Encryption Standard) algorithm, etc. After encryption, the encrypted initial log information is transcoded into target log information according to the internal data structure supported by the target application. In other words, the encrypted initial log information can be transcoded into a format adapted to the internal data structure to obtain the target log information. Afterwards, the target storage space allocated to the target application can be determined from the storage space of the application sandbox according to the program identifier of the target application, and the target log information can be stored in the target storage space. The program identifier of the target application is used to identify the identity attributes of the target application.

[0045] In this way, the target log information can be stored in the target storage space corresponding to the target application program more safely based on the application sandbox.

[0046] In some optional embodiments, the situation mentioned in the aforementioned embodiments where the target application cannot directly transmit the target log information to the server device may at least include: there is no direct transmission channel between the target application and the server device, or the direct transmission channel between the target application and the server device is closed, or, when there is a direct transmission channel between the target application and the server device and the direct transmission channel is opened, the target application fails to directly transmit the target log information through the direct transmission channel.

[0047] In some optional embodiments, step 13 in the aforementioned embodiment, "using the short-distance communication framework module inside the target application to call the short-distance communication component of the terminal device to establish a data sharing channel with a second terminal device running the same application in the vicinity", can be implemented based on the following steps:

[0048] Step 131: Send a start instruction to the short distance communication framework module in the target application to start the short distance communication framework module.

[0049] Step 132: Use the short-range communication framework module to send communication parameters to the short-range communication component, so as to use the short-range communication component to search for alternative terminal devices running the same application program in the vicinity.

[0050] Step 133: When there are multiple candidate terminal devices, select a second terminal device from the multiple candidate terminal devices.

[0051] Among them, the business association information corresponding to any candidate terminal device may include at least one of the business level information and business log information of the candidate terminal device. Among them, in some actual business scenarios, different users have different identities, for example, some are employees, some are leaders, and their respective job levels are different. For example, different users may need to relay to handle a certain business line. For example, after user A handles a certain business, user B can further process it based on the processing result of user A, then user A. Correspondingly, the terminal devices used by each of them also have corresponding business levels. That is to say, the business levels of different terminal devices can be set according to the identity attributes of different users, or according to the different positions of different users on the business line. The specific setting method can be customized according to the needs of the actual business scenario, such as L1 level, L2 level and L3 level. The higher the business level, the greater the authority of the candidate terminal device and the higher the device security. For example, the business level of the candidate terminal device L1 is higher than the business level of the candidate terminal device L2, that is, the candidate terminal device L2 is the "downstream device" of the candidate terminal device L1, and the business processing results of the candidate terminal device L2 may need to be reviewed by the upstream device. Based on this, the service level information can be used to record the service level of the candidate terminal device in the actual service scenario. In the actual service scenario, when the candidate terminal device is in the process of user processing services, the service log information can be used to record the log data of the service operation behavior of the user in the process of using the terminal device to process services. The service log information can include activities and events related to the service, such as the configuration information of the user configuring the service options and the user's modification information of the service details, etc.

[0052] The embodiment of the present application does not limit the specific implementation of the above step 133. In some optional embodiments, it can be implemented based on the following implementation methods:

[0053] Implementation method 1: According to the service level information corresponding to multiple candidate terminal devices, a candidate terminal device whose service level meets the preset level condition is selected from multiple candidate terminal devices as the second terminal device. Among them, the level condition can be set to any condition according to the actual business scenario requirements, such as the highest service level, or the service level is higher than a preset level, which is not limited in this embodiment.

[0054] Implementation method 2: Calculate the business association between multiple candidate terminal devices and the first terminal device according to the business log information corresponding to multiple candidate terminal devices; select the candidate terminal device whose business association meets the preset association condition from the multiple candidate terminal devices as the second terminal device. Among them, in the actual business scenario, the business operations performed by each terminal device may overlap, that is, there may be business associations between different terminal devices. For example, the business operations of user A and user B each involve configuring configuration items K1-configuration items K5, which also means that there is a business association between user A and user B, and the association is used to describe the closeness of this business association relationship. The embodiment of the present application does not limit the specific implementation method of calculating the business association between any candidate terminal device and the first terminal device. In some optional embodiments, the business log information of the first terminal device can be obtained locally, and the business log information of the first terminal device and the business log information of any candidate terminal device can be extracted respectively. After obtaining the first feature and the second feature, the similarity between the two can be calculated, and the value of the similarity is used as the business association between the candidate terminal device and the first terminal device. In other optional embodiments, the business log information of the first terminal device and the business log information of any candidate terminal device can be converted into log sequences, such as business operation sequences; then, the similarity between the log sequence of the first terminal device and the log sequence of any candidate terminal device can be calculated using a grey correlation analysis algorithm. Among them, the grey correlation analysis algorithm is a method for evaluating the similarity between sequences, and is particularly suitable for situations where sample data is insufficient. This method can be used to analyze the correlation and influence between sequences, and can be effectively analyzed even when the amount of data is small.

[0055] Optionally, when selecting a second terminal device whose service association information meets the preset conditions from multiple candidate terminal devices according to the service association information corresponding to the multiple candidate terminal devices, a target terminal device whose service association information meets the preset conditions can be selected from the multiple candidate terminal devices according to the service association information corresponding to the multiple candidate terminal devices; if there are multiple target terminal devices, the network quality information of the multiple target terminal devices is determined according to at least one of the delay information, bandwidth information, packet loss rate information and jitter information of the multiple target terminal devices; and the target terminal device whose network quality information meets the preset quality conditions is selected from the multiple target terminal devices as the second terminal device. In this embodiment, the specific implementation method of determining the network quality information of the target terminal device according to at least one of the delay information, bandwidth information, packet loss rate information and jitter information of any target terminal device is not limited. In some optional implementation methods, the delay information, bandwidth information, packet loss rate information and jitter information of the target terminal device can be weightedly calculated according to the weights corresponding to at least one of the delay information, bandwidth information, packet loss rate information and jitter information to obtain the network quality information. In this embodiment, the quality condition can be set to any condition according to the needs of the actual business scenario, and this embodiment does not limit it.

[0056] In this way, after the second terminal device is selected relatively accurately from a plurality of candidate terminal devices, the following steps may be continued to establish a data sharing channel.

[0057] Step 134: Use the short-range communication component to establish a data sharing channel with the second terminal device based on the communication parameters.

[0058] The communication parameters refer to the parameters required to establish a data sharing channel with the second terminal device, including but not limited to at least one of the following: identification information of the first terminal device and identification information of the target application. The identification information of the first terminal device is used to identify the identity attribute of the first terminal device, and the identification information of the target application may include at least one of the following: program name, ID (Identity document, unique code), port number and IP (Internet Protocol) address.

[0059] Specifically, a connection request may be sent to a short-distance communication component on a second terminal device through a short-distance communication component, and the connection request may include identification information of a target application. The target application on the second terminal device may authenticate the first terminal device according to the connection request. A connection response is received from a short-distance communication component on the second terminal device through a short-distance communication component to establish a data sharing channel with the second terminal device; the connection response is sent when the first terminal device passes the identity authentication.

[0060] Specifically, a connection request may be sent to a short-distance communication component on a second terminal device through a short-distance communication component, and the connection request may include identification information of the first terminal device. The target application on the second terminal device may perform identity authentication on the target application on the first terminal device according to the connection request. A connection response is received through a short-distance communication component from a short-distance communication component on the second terminal device to establish a data sharing channel with the second terminal device; the connection response is sent when the target application on the first terminal device passes the identity authentication.

[0061] Specifically, a connection request may also be sent to a short-distance communication component on a second terminal device through a short-distance communication component, and the connection request includes identification information of the first terminal device and identification information of the target application, so that the target application on the second terminal device can authenticate the first terminal device and the target application on the first terminal device. A connection response is received through a short-distance communication component from a short-distance communication component on the second terminal device to establish a data sharing channel with the second terminal device; the connection response is sent when the first terminal device and the target application on the first terminal device pass the identity authentication.

[0062] Based on the above steps 131 to 134, the short-range communication component of the terminal device can be called through the short-range communication framework module within the target application to more efficiently establish a data sharing channel with a second terminal device running the same application in the vicinity.

[0063] In accordance with the above embodiments, in some embodiments of the present application, a log information processing method is also provided, which is applied to a server device. Figure 2 As shown, the method includes:

[0064] Step 21, receiving target log information sent by the target application running on the second terminal device through the direct channel between the target application and the server device; the target log information is sent to the second terminal device by the target application running on the first terminal device through the data sharing channel between the target application and the second terminal device when the target log information cannot be directly transmitted to the server device.

[0065] Step 22: Analyze whether the target application on the first terminal device has any abnormal operation based on the target log information; wherein the target log information is obtained by the target application on the first terminal device transcoding the initial log information according to its supported internal data structure, and the initial log information is used to record the operation information of the target application on the first terminal device on the first terminal device.

[0066] When analyzing whether the target application on the first terminal device has an abnormal operation according to the target log information, the target log information can be directly analyzed, or the target log information can be decrypted using a preset decryption algorithm to obtain the initial log information, and the target application on the first terminal device is analyzed according to the initial log information to determine whether the target application has an abnormal operation, which is not limited in this embodiment. The decryption algorithm corresponds to the encryption algorithm used by the first terminal device when encrypting the initial log information.

[0067] The above steps have been described in detail in the above embodiments and will not be described in detail in this embodiment.

[0068] In this embodiment, a secure sharing mechanism for the internal data of the application can be added during the application development phase to improve the security of the log information; a data sharing channel is added based on the direct transmission channel between the terminal device and the server device; based on this, when the target application cannot directly transmit the target log information to the server device, the short-range communication framework module can be used to call the short-range communication component to establish a data sharing channel with the terminal devices running the same application around and send the target log information to them, so that they can directly transmit the target log information to the server device through the direct transmission channel. In this way, when the remote log service is not installed on the terminal device or the remote log service is installed but not enabled, the server device can still obtain the target log information of the terminal device relatively safely and accurately.

[0069] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 11 to 14 can be device A; for another example, the execution subject of steps 11 and 12 can be device A, and the execution subject of steps 13 and 14 can be device B; and so on.

[0070] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations appearing in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel, and the sequence numbers of the operations, such as 11, 12, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel.

[0071] It should be noted that the descriptions such as “first” and “second” in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit “first” and “second” to different types.

[0072] Figure 3is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application, such as Figure 3 As shown, the electronic device includes: a memory 301 and a processor 302 .

[0073] The memory 301 is used to store computer programs and can be configured to store various other data to support operations on the terminal device. Examples of such data include instructions for any application or method operating on the terminal device, contact data, phone book data, messages, pictures, videos, etc.

[0074] Among them, the memory 301 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0075] In some optional embodiments, the processor 302 is coupled to the memory 301 and is used to execute a computer program in the memory 301, so as to: read initial log information from a system file, wherein the initial log information is used to record the running information of the target application on the first terminal device; transcode the initial log information into target log information according to the internal data structure supported by the target application, and store the target log information in the target storage space corresponding to the target application; when the target application cannot directly transmit the target log information to the server device, call the short-range communication component of the terminal device through the short-range communication framework module inside the target application to establish a data sharing channel with a second terminal device running the same application nearby; send the target log information to the second terminal device through the data sharing channel, so that the target application on the second terminal device can directly transmit the target log information to the server device through the direct transmission channel between the target application and the server device.

[0076] Further optionally, an application sandbox is running on the first terminal device, and the target application is running in the application sandbox. The application sandbox has storage space and has access rights to the system file so that the target application can read the initial log information from the system file; when the processor 302 transcodes the initial log information into target log information according to the internal data structure supported by the target application, and stores the target log information in the target storage space corresponding to the target application, it is specifically used to: encrypt the initial log information, and transcode the encrypted initial log information into the target log information according to the internal data structure supported by the target application; determine the target storage space allocated to the target application from the storage space of the application sandbox according to the program identifier of the target application, and store the target log information in the target storage space.

[0077] Further optionally, the situation where the target application is unable to directly transmit the target log information to the server device includes: there is no direct transmission channel between the target application and the server device, or the direct transmission channel between the target application and the server device is closed, or when there is a direct transmission channel between the target application and the server device and the direct transmission channel is opened, the target application fails to directly transmit the target log information through the direct transmission channel.

[0078] Further optionally, when the processor 302 calls the short-range communication component of the terminal device through the short-range communication framework module inside the target application to establish a data sharing channel with a second terminal device running the same application nearby, it is specifically used to: send a startup instruction to the short-range communication framework module inside the target application to start the short-range communication framework module; use the short-range communication framework module to send communication parameters to the short-range communication component, so as to use the short-range communication component to search for alternative terminal devices running the same application nearby; when there are multiple alternative terminal devices, select the second terminal device from the multiple alternative terminal devices; use the short-range communication component to establish a data sharing channel with the second terminal device based on the communication parameters; the communication parameters include: identification information of the first terminal device and / or identification information of the target application.

[0079] Further optionally, the business association information corresponding to any alternative terminal device includes: business level information and / or business log information of the alternative terminal device; when the processor 302 selects the second terminal device from multiple alternative terminal devices when there are multiple alternative terminal devices, it is specifically used to: select, from the multiple alternative terminal devices, a business level that meets a preset level condition as the second terminal device based on the business level information corresponding to the multiple alternative terminal devices; and / or, calculate the business association between the multiple alternative terminal devices and the first terminal device based on the business log information corresponding to the multiple alternative terminal devices; select, from the multiple alternative terminal devices, a business association that meets a preset association condition as the second terminal device.

[0080] Further optionally, when the processor 302 selects a second terminal device whose service association information meets preset conditions from the multiple candidate terminal devices based on the service association information corresponding to the multiple candidate terminal devices, the processor 302 is specifically used to: select a target terminal device whose service association information meets preset conditions from the multiple candidate terminal devices based on the service association information corresponding to the multiple candidate terminal devices; if there are multiple target terminal devices, determine the network quality information of the multiple target terminal devices based on at least one of the delay information, bandwidth information, packet loss rate information and jitter information of each of the multiple target terminal devices; and select a target terminal device whose network quality information meets the preset quality conditions from the multiple target terminal devices as the second terminal device.

[0081] Further optionally, when the processor 302 uses the short-range communication component to establish a data sharing channel with the second terminal device based on the communication parameters, it is specifically used to: send a connection establishment request to the short-range communication component on the second terminal device through the short-range communication component, and the connection establishment request includes the identification information of the first terminal device and / or the identification information of the target application, so that the target application on the second terminal device can authenticate the first terminal device and / or the target application on the first terminal device; receive a connection establishment response sent by the short-range communication component on the second terminal device through the short-range communication component to establish a data sharing channel with the second terminal device; the connection establishment response is sent when the first terminal device and / or the target application on the first terminal device passes the identity authentication.

[0082] In some other optional embodiments, the processor 302 is coupled to the memory 301 and is used to execute the computer program in the memory 301, so as to: receive target log information sent by a target application running on the second terminal device through a direct channel between the target application running on the second terminal device and the server device; the target log information is sent by the target application running on the first terminal device to the second terminal device through a data sharing channel between the target application and the second terminal device when the target log information cannot be directly transmitted to the server device; analyze whether there is any abnormal operation of the target application on the first terminal device according to the target log information; wherein, the target log information is obtained by the target application on the first terminal device transcoding the initial log information according to the internal data structure supported by the target application, and the initial log information is used to record the operation information of the target application on the first terminal device on the first terminal device.

[0083] Further, if Figure 3 As shown, the electronic device also includes: a display 303, a communication component 304, a power supply component 305 and other components. Figure 3 Only some components are shown schematically, and it does not mean that the electronic device only includes Figure 3 Components shown.

[0084] Above Figure 3 The memory in can be implemented by any type of volatile or non-volatile storage device or a combination of them, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0085] Above Figure 3 The display 303 in the embodiment includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0086] Above Figure 3The communication component 304 in is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component can be implemented based on near field communication (NFC) technology, radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0087] The power supply component 305 provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.

[0088] In this embodiment, a secure sharing mechanism for the internal data of the application can be added during the application development phase to improve the security of the log information; a data sharing channel is added based on the direct transmission channel between the terminal device and the server device; based on this, when the target application cannot directly transmit the target log information to the server device, the short-range communication framework module can be used to call the short-range communication component to establish a data sharing channel with the terminal devices running the same application around and send the target log information to them, so that they can directly transmit the target log information to the server device through the direct transmission channel. In this way, when the remote log service is not installed on the terminal device or the remote log service is installed but not enabled, the server device can still obtain the target log information of the terminal device relatively safely and accurately.

[0089] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement each step that can be executed by an electronic device in the above method embodiment.

[0090] Accordingly, an embodiment of the present application further provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, each step that can be executed by an electronic device in the above method embodiment is executed.

[0091] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0092] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0093] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0094] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0095] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0096] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0097] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0098] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0099] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for uploading log information, characterized in that: Applicable to a first terminal device, a target application is running on the first terminal device, and the target application includes a short-range communication framework module; the method includes: Reading initial log information from a system file, wherein the initial log information is used to record running information of the target application on the first terminal device; According to the internal data structure supported by the target application, the initial log information is transcoded into target log information, and the target log information is stored in the target storage space corresponding to the target application; In the case where the target application cannot directly transmit the target log information to the server device, the short-distance communication framework module inside the target application is used to call the short-distance communication component of the terminal device to establish a data sharing channel with a second terminal device running the same application in the vicinity; The target log information is sent to the second terminal device through the data sharing channel, so that the target application on the second terminal device can directly transmit the target log information to the server device through the direct transmission channel between the target application and the server device.

2. The method according to claim 1, characterized in that An application sandbox is running on the first terminal device, the target application is running in the application sandbox, the application sandbox has storage space and access rights to the system file, so that the target application can read the initial log information from the system file; According to the internal data structure supported by the target application, the initial log information is transcoded into target log information, and the target log information is stored in a target storage space corresponding to the target application, including: Encrypting the initial log information, and transcoding the encrypted initial log information into the target log information according to an internal data structure supported by the target application; According to the program identifier of the target application, a target storage space allocated to the target application is determined from the storage space of the application sandbox, and the target log information is stored in the target storage space.

3. The method according to claim 1, characterized in that: The situation where the target application cannot directly transmit the target log information to the server device includes: there is no direct transmission channel between the target application and the server device, or the direct transmission channel between the target application and the server device is closed, or when there is a direct transmission channel between the target application and the server device and the direct transmission channel is opened, the target application fails to directly transmit the target log information through the direct transmission channel.

4. The method according to claim 1, characterized in that: By using the short-distance communication framework module inside the target application, calling the short-distance communication component of the terminal device to establish a data sharing channel with a second terminal device running the same application in the vicinity, including: Sending a start instruction to the short distance communication framework module inside the target application to start the short distance communication framework module; Using the short-range communication framework module, sending communication parameters to the short-range communication component, so as to use the short-range communication component to search for alternative terminal devices running the same application program in the vicinity; In the case where there are multiple candidate terminal devices, selecting the second terminal device from the multiple candidate terminal devices; Using the short-range communication component, a data sharing channel is established with the second terminal device based on the communication parameters; the communication parameters include: identification information of the first terminal device and / or identification information of the target application.

5. The method according to claim 4, characterized in that The service association information corresponding to any candidate terminal device includes: service level information and / or service log information of the candidate terminal device; In the case where there are multiple candidate terminal devices, selecting the second terminal device from the multiple candidate terminal devices includes: According to the service level information corresponding to the multiple candidate terminal devices, selecting a candidate terminal device whose service level meets the preset level condition from the multiple candidate terminal devices as the second terminal device; and / or, According to the business log information corresponding to the multiple candidate terminal devices, the business association between the multiple candidate terminal devices and the first terminal device is calculated; and the candidate terminal device whose business association meets the preset association condition is selected from the multiple candidate terminal devices as the second terminal device.

6. The method according to claim 5, characterized in that Selecting, according to the service association information corresponding to the multiple candidate terminal devices, a second terminal device whose service association information meets a preset condition from the multiple candidate terminal devices, comprises: According to the service association information corresponding to the multiple candidate terminal devices, select a target terminal device whose service association information meets a preset condition from the multiple candidate terminal devices; If there are multiple target terminal devices, determining the network quality information of the multiple target terminal devices according to at least one of the delay information, bandwidth information, packet loss rate information and jitter information of the multiple target terminal devices; From the multiple target terminal devices, a target terminal device whose network quality information meets a preset quality condition is selected as the second terminal device.

7. The method according to claim 4, characterized in that Using the short-range communication component to establish a data sharing channel with the second terminal device based on the communication parameters includes: Sending a connection request to the short-distance communication component on the second terminal device through the short-distance communication component, wherein the connection request includes identification information of the first terminal device and / or identification information of the target application, so that the target application on the second terminal device can authenticate the first terminal device and / or the target application on the first terminal device; The short-range communication component receives a connection establishment response sent by the short-range communication component on the second terminal device to establish a data sharing channel with the second terminal device; the connection establishment response is sent when the first terminal device and / or the target application on the first terminal device passes identity authentication.

8. A log information processing method, characterized in that: Applied to a server device, the method comprises: receiving target log information sent by a target application running on the second terminal device through a direct channel between the target application and the server device; the target log information is sent by the target application running on the first terminal device to the second terminal device through a data sharing channel between the target application and the second terminal device when the target log information cannot be directly transmitted to the server device; Analyze whether the target application on the first terminal device has any abnormal operation according to the target log information; wherein, the target log information is obtained by transcoding the initial log information by the target application on the first terminal device according to the internal data structure supported by it, and the initial log information is used to record the operation information of the target application on the first terminal device on the first terminal device.

9. An electronic device, characterized in that: include: A memory and a processor; wherein the memory is used to: store one or more computer instructions; and the processor is used to execute the one or more computer instructions to: execute the steps in the method described in any one of claims 1-7 or claim 8.

10. A computer-readable storage medium, characterized in that: When the computer program is executed by a processor, the processor is enabled to implement the steps in the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Vehicle abnormality reporting method and device, shared vehicle and storage medium

    CN111385762A

  • Log acquisition method and device and computer storage medium

    CN111611213A

  • Equipment offline processing method and device

    CN111866707A

  • Abnormity monitoring method, device and system

    CN112631862A

  • Log data processing method and device, equipment and storage medium

    CN115510035A