Message processing method and device and electronic equipment
Patent Information
- Application Number
- CN202380061856.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-08-22
- Filing Date
- 2023-04-17
- Publication Date
- 2025-06-13
AI Technical Summary
In the existing technology, push notification messages cannot be displayed in a personalized manner and sensitive information cannot be protected, and the resource usage is high, and the use of hardware resources cannot be effectively controlled.
In the terminal device, the first application is launched for message reassembly, a second message is generated, and the message reassembly configuration information is saved in the trusted credentials to limit the accessed resources and interface range to ensure the security and resource control of the message reassembly operation. .
It improves the user experience and data security of notification messages, while effectively controlling the hardware resource occupation of terminal devices, ensuring the security and resource management of message display.
Smart Images

Figure CN120153371A_ABST
Abstract
Description
Method, device and electronic device for processing message Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, and electronic device for processing messages. Background Art
[0002] Today's terminal devices, including mobile phones, tablets, watches, TVs, and personal computers, all provide the ability to push messages from cloud servers to terminals. Push message implementations generally fall into two categories: notification messages and transparent messages. Transparent messages directly launch the application and pass data to it, allowing the application to perform different actions based on the passed data. Notification messages, on the other hand, do not launch the application. Instead, system components present the notification message based on the Push data, for example, displaying it in the system notification area (such as the Android / iOS pull-down notification bar or the Windows tile that displays push notification information to the user).
[0003] Notification messages don't launch apps. This design goal is to limit device resource usage and minimize user disruption. However, this design requires that the content of push notification messages must be plain text and unmodifiable. This makes it impossible for devices to protect sensitive information in notification messages and provide personalized notification presentation.
[0004] Summary of the Invention
[0005] In response to the problems existing in the prior art of push notification messages, the present application provides a method, device and electronic device for processing messages. The present application also provides a computer-readable storage medium.
[0006] The embodiments of this application adopt the following technical solutions:
[0007] In a first aspect, the present application provides a method for processing a message, the method being applied to a terminal device, the method comprising:
[0008] receiving a first message;
[0009] In the case where the first message is a reassembled message, launching the first application, and having the first application reassemble the first message, includes:
[0010] The first application reads the message reassembly configuration information, wherein the message reassembly configuration information is information configured by the second application for the first application; the operations that the second application can implement include at least a message reassembly operation; and the message reassembly configuration information is used to support the first application in implementing the message reassembly operation;
[0011] The first application performs a message reassembly operation on the first message based on the message reassembly configuration information to generate a second message.
[0012] According to the method of the embodiment of the present application, after receiving a pushed message, the first application is launched to reorganize the message, thereby improving the user experience of message display. Furthermore, because the first application is only used to implement the message reorganization operation of the second application, it does not need to have the complete structure of the second application. Therefore, the hardware resources occupied by launching the first application will be lower than the hardware resources occupied by launching the second application. This effectively controls the hardware resource usage of the terminal device while improving the user experience of notification message display.
[0013] In an implementation of the first aspect, in order to improve data security and prevent leakage of the first message, the first application is a trusted application.
[0014] In an implementation of the first aspect, in order to improve data security and prevent leakage of message reassembly configuration information, the message reassembly configuration information is stored in a trusted credential of the first application.
[0015] Since the message reassembly configuration information is stored in the trusted credential of the first application, the application service that launches the first application cannot access the trusted credential of the first application. The application service that launches the first application cannot obtain the message reassembly configuration information, ensuring the execution security of the message reassembly operation.
[0016] In an implementation of the first aspect, the message reassembly configuration information includes a message reassembly code and initialization parameters;
[0017] The first application performs a message reassembly operation on the first message based on the message reassembly configuration information to generate a second message, including:
[0018] The first application executes a message reassembly code on the first message based on the initialization parameters to generate a second message.
[0019] In an implementation of the first aspect, before receiving the first message, the method further includes:
[0020] The second application calls the first application and sets message reassembly configuration information.
[0021] In an implementation of the first aspect, to improve security, before receiving the first message, the method further includes obtaining, from the cloud, a range of resources and interfaces that the first application is allowed to access;
[0022] The first application performs a message reassembly operation on the first message based on the message reassembly configuration information to generate a second message, including:
[0023] The first application performs a message reassembly operation on the first message based on the message reassembly configuration information, under the restriction of the resource and interface range that the first application is allowed to access, to generate a second message.
[0024] Based on the limitations of the access resources and interface scope, during the execution of the message reassembly operation in the first application, only controllable interfaces such as basic data calculation and encryption and decryption, and corresponding application resource queries are provided. The first application cannot launch other applications or access other controlled resources, thereby improving the security of system operation.
[0025] Specifically, in an implementation of the first aspect, obtaining the resources and interface ranges that the first application is allowed to access from the cloud includes, by a push proxy, obtaining the resources and interface ranges that the first application is allowed to access from the cloud.
[0026] In an implementation of the first aspect, the method further includes:
[0027] Output the second message for display.
[0028] In an implementation of the first aspect, outputting the second message for display includes:
[0029] The first application outputs a second message to the push proxy;
[0030] The push agent outputs the second message to the notification manager for message display.
[0031] In an implementation of the first aspect, the method further includes:
[0032] When an exception occurs when the first application performs a message reassembly operation, the second message is prevented from being displayed.
[0033] In an implementation of the first aspect:
[0034] Receiving a first message, including, a push agent receiving the first message;
[0035] In the case that the first message is a reassembled message, calling the first application to reassemble the first message includes: when the push agent determines that the first message is a reassembled message, the push agent pulls up the first application; and the first application reassembles the first message.
[0036] In an implementation of the first aspect, before receiving the first message, the method further includes:
[0037] The second application applies for a push token from the push proxy;
[0038] After receiving the application from the second application, the push proxy sets a permission for the second application to call the first application, and returns a push token to the second application;
[0039] After the second application obtains the push token, the second application calls the first application and sets message reassembly configuration information for the first application;
[0040] The first application saves the message reassembly configuration information.
[0041] In an implementation of the first aspect, to improve data security, the first message is end-to-end encrypted information;
[0042] During the process of the first application performing the message reassembly operation on the first message, the first application calls the encryption and decryption interface to decrypt the first message.
[0043] The application service that launched the first application does not participate in the decryption operation and cannot obtain the specific content of the first message. In the entire process from receiving the pushed first message to displaying the second message, the application service that launched the first application can only obtain the reassembled content of the message, greatly improving the security of the message.
[0044] In a second aspect, the present application further proposes a device for processing messages, which is applied to a terminal device and includes:
[0045] A receiving module, configured to receive a first message;
[0046] a message reassembly module, configured to launch the first application module when the first message is a reassembled message;
[0047] The first application module is used to:
[0048] Reading message reassembly configuration information, wherein: the message reassembly configuration information is information configured by the second application module for the first application module; the operations that can be implemented by the second application module include at least a message reassembly operation; the message reassembly configuration information is used to support the first application module in implementing the message reassembly operation;
[0049] Based on the message reassembly configuration information, a message reassembly operation is performed on the first message to generate a second message.
[0050] In a third aspect, the present application further proposes an electronic device, which includes a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method steps of the first aspect.
[0051] In a fourth aspect, the present application further proposes a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] FIG1 is a schematic diagram of a push message process according to an embodiment of the present application;
[0053] FIG2 is a schematic diagram of a message push application scenario according to an embodiment of the present application;
[0054] FIG3 is a flow chart of a method for processing messages according to an embodiment of the present application;
[0055] FIG4 is a flow chart of a method for processing messages according to an embodiment of the present application;
[0056] FIG5 is a schematic diagram of a device for processing messages according to an embodiment of the present application;
[0057] FIG6 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0058] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0059] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.
[0060] FIG1 is a schematic diagram showing a push message process according to an embodiment of the present application.
[0061] As shown in FIG1 , when the business service 111 or the big data operation platform 112 needs to push a message to the terminal device 120 , it first pushes the message to the push server (PushServer) 113 .
[0062] The push server 113 sends the message to be pushed to the terminal device 120 .
[0063] The push core (Push Core) 121 of the terminal device 120 receives messages pushed by the Push server 113 and classifies the received push messages.
[0064] If the push message is a transparent message, the application (App) 122 that needs to receive the transparent message is launched. Application 122 receives the transparent message based on its own push function module 123 (Push Software Development Kit (Push SDK)). Application 122 then performs corresponding information processing on the transparent message.
[0065] In the case where the push message is a transparent message, the terminal device 120 needs to launch an application 122 for processing the transparent message. The startup and operation of the application 122 will inevitably occupy the hardware resources of the terminal device 120 .
[0066] If the push message is a notification message, the push core 121 directly sends the notification message to the push agent 124 , and the push agent 124 sends the notification message to the notification manager 125 for message display.
[0067] When the push message is a notification message, although the terminal device 120 does not need to launch an application to process the message, thus avoiding an increase in hardware resource usage, the push proxy 124 directly sends the notification message to the notification manager 125 for display. Therefore, the terminal device 120 can only display the entire content of the pushed notification message and cannot perform personalized content modification. This results in the inability to display personalized notification messages and block sensitive information.
[0068] Furthermore, because the push proxy 124 directly sends the notification message to the notification manager 125 for display, the terminal device 120 does not launch an application to process the notification message. Therefore, the terminal device 120 cannot decrypt the notification message. This requires that the notification message must be in plain text throughout the entire transmission process. During the transmission process of the notification message, the notification message is easily leaked.
[0069] For example, during the data transmission process (101) in which the business service 111 pushes the notification message to the Push server 113, during the data transmission process (102) in which the big data operation platform 112 pushes the notification message to the Push server 113, during the data transmission process (103) in which the Push server 113 pushes the notification message to the push core 121 of the terminal device 120, and during the data transmission process (104) in which the push core 121 sends the notification message to the push agent 124, if the data transmission protocol is cracked, the cracker can obtain the plaintext content of the notification message.
[0070] For another example, since business service 111 and big data operation platform 112 push plaintext notification messages to Push server 113, and Push server 113 pushes the plaintext notification messages to push core 121 of terminal device 120, the notification messages temporarily stored in Push server 113 are also plaintext. If Push server 113 is attacked, the plaintext notification message content may be leaked.
[0071] In response to the above situation, an embodiment of the present application proposes a method for processing messages, which is applied to a terminal device. In the method for processing messages in an embodiment of the present application, after receiving a pushed notification message, the application is launched to reorganize the notification message (for example, deleting sensitive information, reorganizing the text description of the message according to the user's personalized needs, etc.), and the reorganized notification message is output and displayed, thereby improving the user experience of the notification message display.
[0072] Furthermore, in the case where the pushed message is a transparent message, the terminal device launches an application for transparent messages (a second application) to process the transparent message. Then, based on the implementation scheme of transparent messages, if the second application has the function of implementing message reorganization operations, when the terminal device receives a notification message that needs to be reorganized, the terminal device can launch the second application, and the second application will reorganize the notification message. After that, the second application will output and display the reorganized message. Although the above scheme can improve the user experience of displaying notification messages, the need to launch the second application increases the hardware resource usage of the terminal device.
[0073] In response to the problem of increased hardware resource usage of the above-mentioned terminal devices, in a method for processing messages in one embodiment of the present application, a first application is constructed based on a second application, and the first application is used to implement the message reorganization operation of the second application. In this way, when the terminal device receives a notification message that needs to be reorganized, the terminal device can pull up the first application, and the first application will reorganize the notification message, and then the first application will output and display the reorganized message. Since the first application is only used to implement the message reorganization operation of the second application, it does not need to have the complete structure of the second application. Therefore, the hardware resources occupied by pulling up the first application will be lower than the hardware resources occupied by pulling up the second application. This effectively controls the hardware resource usage of the terminal device while improving the user experience of the notification message display.
[0074] Figure 2 is a schematic diagram of a message push application scenario according to an embodiment of the present application. Figure 3 is a flow chart of a method for processing messages according to an embodiment of the present application.
[0075] As shown in Figures 2 and 3, in a message push application scenario, a cloud-based application (App) server 210 calls a push server (PushServer) 220 to send a first message (e.g., a transparent message or a notification message) (S301). Push server 220 pushes the first message sent by application server 210 to terminal device 230 (S302).
[0076] The terminal device 230 executes the following process shown in FIG. 2 to implement message processing.
[0077] S310 , the push core 231 of the terminal device 230 receives the first message pushed by the push server 220 .
[0078] S311, the terminal device 230 determines whether the first message is a reassembled message.
[0079] If the first message is not a reassembled message, the first message is processed according to other strategies (S312).
[0080] If the first message is a reassembled message, the first application 234 is launched, and the first application 234 performs a message reassembly operation on the first message ( S320 ).
[0081] Specifically, message reorganization operations can include a variety of different operations, which are not limited by this application. For example, they can rearrange the combination of elements in the message, change the message style, add message icons or backgrounds, replace specific elements / variables in the message, etc. For example, if the message sent is: "Dear {name}, your purchased {service} is about to expire...", the variables {name} and {service} in the message are replaced during the message reorganization process.
[0082] Specifically, in actual application scenarios, the first information can be marked as a reorganized message in a variety of ways.
[0083] For example, in one implementation, the reassembled message is marked by adding a tag. When the application server 210 sends the first message, if the first message is a reassembled message, the application server 210 adds a first tag for marking the reassembled message to the first message.
[0084] For example, in another implementation, the reassembled message is marked by binding the information source. Application server 210 is recorded as the information source of the reassembled message at terminal device 230. The first message sent by application server 210 includes information source information. Terminal device 230 recognizes that the information source of the first message is application server 210 and can therefore confirm that the first message is a reassembled message.
[0085] In an implementation of S311, the reassembly message is a notification message that a message reassembly operation needs to be performed.
[0086] In S311, the push core 231 of the terminal device 230 confirms the type of the first message (notification message or transparent message). If the first message is a transparent message (that is, it can be confirmed that the first message is not a reassembled message), the push core 231 pulls up the corresponding application to process the first message in accordance with the processing strategy of the transparent message. If the first message is a notification message, the push core 231 sends the first message to the push agent 232. The push agent 232 determines whether a message reassembly operation needs to be performed on the first message (for example, by judging whether a first tag is included, or by judging by the information source). If a message reassembly operation does not need to be performed on the first message (that is, it can be confirmed that the first message is not a reassembled message), the push agent 232 sends the first message to the notification management 233 for message display.
[0087] If a message reassembly operation needs to be performed on the first message (the first message is a reassembled message), the push proxy 232 executes S320 .
[0088] In another implementation of S311, the reassembly message is a notification message requiring a message reassembly operation or a transparent message requiring only a message reassembly operation.
[0089] In S311 , the push core 231 of the terminal device 230 determines whether a message reassembly operation needs to be performed on the first message (for example, by determining whether the first tag is included, or by determining the information source).
[0090] If a message reassembly operation is required for the first message, the push core 231 adds a second tag to the first message and sends the first message with the second tag to the push proxy 232. After the push proxy 232 recognizes that the first message has the first tag, it executes S320.
[0091] If the first message does not require a message reassembly operation (i.e., it can be confirmed that the first message is not a reassembled message), the push core 231 determines the type of the first message (notification message or transparent message). If the first message is a transparent message, the push core 231 launches the corresponding application to process the first message according to the transparent message processing policy. If the first message is a notification message, the push core 231 sends the first message to the push proxy 232. After the push proxy 232 recognizes that the first message does not have the first flag, it sends the first message to the notification manager 233 for message display.
[0092] S320 , the push agent 232 launches the first application 234 and sends the first message to the first application 234 .
[0093] Specifically, to improve data security and prevent leakage of the first message, in one embodiment, the first application 234 is a trusted application (TA) that runs in a trusted execution environment (TEE) within the terminal system operating system. The push agent 232 is a client application (CA) that can call the trusted application (first application 234).
[0094] S330 , the first application 234 reads pre-saved message reassembly configuration information.
[0095] Specifically, in order to improve data security and prevent leakage of message reassembly configuration information, in one embodiment, the message reassembly configuration information is stored in the trusted credential 235 of the first application 234 (TA).
[0096] Since the message reassembly configuration information is stored in the trusted credential 235 of the first application 234, the push proxy 232 can only launch the first application 234 but cannot access the trusted credential 235 of the first application 234. The push proxy 232 cannot obtain the message reassembly configuration information, ensuring the security of the message reassembly operation.
[0097] Furthermore, in another embodiment, the message reassembly configuration information may also be stored in other locations.
[0098] S331 : The first application 234 performs a message reassembly operation on the first message based on the message reassembly configuration information to generate a second message.
[0099] After S331 , the first application 234 outputs the second message for display.
[0100] S340 , the first application 234 outputs the second message to the push proxy 232 .
[0101] S350: The push agent 232 outputs the second message to the notification management 233 for message display.
[0102] Specifically, in S330 and S331, the first application 234 can implement different message reorganization operations corresponding to different message reorganization configuration information. For example, based on the first message reorganization configuration information, the first application 234 is run to perform a message reorganization operation on the message to delete sensitive words in the message; based on the second message reorganization configuration information, the first application is run to perform a message reorganization operation on the message to split a long message into short messages.
[0103] Specifically, in one embodiment, the message reassembly configuration information includes a message reassembly code and initialization parameters. In S331, the first application 234 executes the read message reassembly code on the first message based on the read initialization parameters to generate a second message.
[0104] Furthermore, in other embodiments, the message reassembly configuration information may also have other different content structures.
[0105] For example, in another embodiment, the first application 234 has built-in unified initialization parameters, and the message reassembly configuration information includes a message reassembly code. In S331, the first application 234 executes the read message reassembly code on the first message based on the built-in initialization parameters to generate a second message.
[0106] For example, in another embodiment, the first application 234 includes message reassembly code, and the message reassembly configuration information includes initialization parameters. In S331, the first application 234 executes its own message reassembly code on the first message based on the read initialization parameters to generate a second message.
[0107] Furthermore, in S331 , in addition to performing a message reassembly operation on the first message, the first application 234 may also perform other processing operations.
[0108] For example, in one embodiment, to reduce data transmission volume, the message sent from application server 210 to push server 220 in S301 is compressed data. Alternatively, in S301, the message sent from application server 210 to push server 220 is uncompressed data; upon receiving the message, push server 220 compresses it before pushing it to terminal device 230.
[0109] In S331 , the first application 234 first decompresses the first message and then performs a message reassembly operation.
[0110] For another example, in one embodiment, to improve data security, in S301, the message sent from the application server 210 to the push server 220 is encrypted data (end-to-end encrypted information). Alternatively, in S301, the message sent from the application server 210 to the push server 220 is unencrypted data; after receiving the message, the push server 220 encrypts it (end-to-end encrypted information) and then pushes it to the terminal device 230.
[0111] In S331 , the first application 234 first calls the encryption and decryption interface to decrypt the first message and then performs a message reassembly operation.
[0112] In this way, the push proxy 232 does not participate in the decryption operation and cannot obtain the specific content of the first message. In the entire process from receiving the pushed first message to displaying the second message, the push proxy 232 can only obtain the reorganized content of the message, which greatly improves the security of the message.
[0113] Furthermore, to avoid message leakage, in one embodiment, in S331, when an exception occurs when the first application 234 performs a message reassembly operation (for example, an exception occurs when the message reassembly code is executed); after S331, the following steps are executed: preventing the display of the second message (not displaying the notification message), and reporting the failure to the server so that the application developer can troubleshoot the problem.
[0114] Furthermore, in order to enable the first application 234 to implement the message reassembly operation of the second application 236 based on the message reassembly configuration information, in one embodiment, the second application 236 calls the first application 234 to generate the message reassembly configuration information. For example, the second application 236 calls the first application 234 to configure the message reassembly code and initialization parameters for the first application 234.
[0115] FIG4 is a flow chart showing a method for processing messages according to an embodiment of the present application.
[0116] Before S310 , the terminal device 230 executes the following process shown in FIG. 4 to obtain a message reassembly code and initialization parameters for the first application 234 .
[0117] S400 , the second application 236 applies for a push token (PushToken) from the push proxy 232 .
[0118] S410: After receiving the application from the second application 236, the push proxy 232 sets a setting to allow the second application 236 to call the first application 234. Specifically, the second application 236 is authorized to also serve as a client application (CA) that can call the trusted application (first application 234).
[0119] Furthermore, the push proxy 232 returns a push token to the second application 236 .
[0120] Furthermore, to enhance security, in one embodiment, in S410, the push proxy 232 obtains from the cloud the resources and APIs that the first application 234 is permitted to access. When the first application 234 executes the message reassembly code, it is restricted by these resources and APIs. For example, the first application 234 is restricted from accessing resources such as the icon for the first message and can only perform encryption and decryption on the first message or localized formatting of the message content.
[0121] In S331 , the first application 234 performs a message reassembly operation on the first message based on the message reassembly configuration information, within the constraints of the resource and interface range that the first application 234 is allowed to access, to generate a second message.
[0122] Based on the limitations of the accessed resources and interface scope, during the execution of the message reassembly operation in the first application 234 (TA), only controllable interfaces such as basic data operations and encryption and decryption (API), corresponding application resource queries, etc. are provided. The first application 234 cannot launch other applications or access other controlled resources, thereby improving the security of system operation.
[0123] S420 , after the second application 236 obtains the push token, the second application 236 calls the first application 234 and sets message reassembly configuration information (message reassembly code and initialization parameters) for the first application 234 .
[0124] S430 , the first application 234 saves the message reassembly configuration information (message reassembly code and initialization parameters) to its own trusted credential 235 .
[0125] Based on the method of an embodiment of the present application, an embodiment of the present application further proposes a device for processing messages, which is applied to a terminal device.
[0126] FIG5 is a schematic diagram of a message processing apparatus according to an embodiment of the present application. As shown in FIG5 , the message processing apparatus 500 includes:
[0127] The receiving module 510 is configured to receive the first message. Specifically, in one embodiment, referring to the push agent 232 , the receiving module 510 is constructed in the push agent 232 .
[0128] The message reassembly module 520 is used to pull up the first application module when the first message is a reassembled message. Specifically, in one embodiment, referring to the push agent 232 , the message reassembly module 520 is constructed in the push agent 232 .
[0129] The first application module 530 (refer to the first application 234 ) is used to:
[0130] Reading message reassembly configuration information (in one embodiment, stored in trusted credential 235), wherein the message reassembly configuration information is information configured by the second application module (referring to second application 236) for the first application module 530; the operations implemented by the second application module include at least a message reassembly operation; and the message reassembly configuration information is used to support the first application module 530 in implementing the message reassembly operation;
[0131] Based on the message reassembly configuration information, the message reassembly operation is performed on the first message to generate a second message.
[0132] In the description of the embodiments of the present application, for the convenience of description, the device is described as being divided into various modules according to their functions. The division of each module is merely a division of logical functions. When implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0133] Specifically, the device proposed in the embodiment of the present application can be fully or partially integrated into a physical entity during actual implementation, or it can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; or they can all be implemented in the form of hardware; or some modules can be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the detection module can be a separately established processing element, or it can be integrated in a chip of an electronic device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. During the implementation process, each step of the above method or each of the above modules can be completed by the hardware integrated logic circuit in the processor element or the instructions in the form of software.
[0134] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0135] An embodiment of the present application also proposes an electronic device (terminal device), which includes a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method process described in the embodiment of the present application.
[0136] Specifically, in one embodiment of the present application, the above-mentioned one or more computer programs are stored in the above-mentioned memory, and the above-mentioned one or more computer programs include instructions. When the above-mentioned instructions are executed by the above-mentioned device, the above-mentioned device executes the method steps described in the embodiment of the present application.
[0137] Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present application. The electronic device 600 includes a memory 610 for storing computer program instructions and a processor 620 for executing the program instructions. When the computer program instructions are executed by the processor 620, the processor 620 controls the electronic device 600 to execute the stylus state switching method shown in the embodiment of the present application.
[0138] Specifically, in one embodiment of the present application, the processor of the electronic device may be a SOC, which may include a central processing unit (CPU) and may further include other types of processors. Specifically, in one embodiment of the present application, the processor of the electronic device may be a PWM control chip.
[0139] Specifically, in one embodiment of the present application, the processor involved may include, for example, a CPU, a DSP, a microcontroller, or a digital signal processor, and may also include a GPU, an embedded neural network processor (NPU), and an image signal processor (ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASICs, or one or more integrated circuits for controlling the execution of the program of the technical solution of the present application. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium.
[0140] Specifically, in one embodiment of the present application, the memory of the electronic device may be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any computer-readable medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer.
[0141] Specifically, in one embodiment of the present application, the processor and the memory may be combined into a processing device, or more commonly, they may be independent components, with the processor being configured to execute program code stored in the memory to implement the method described in the embodiment of the present application. In a specific implementation, the memory may also be integrated into the processor or independent of the processor.
[0142] Furthermore, the devices, apparatuses, and modules described in the embodiments of the present application may be implemented by computer chips or entities, or by products having certain functions.
[0143] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, apparatus, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0144] In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of this application.
[0145] Specifically, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, the computer executes the method provided in the embodiment of the present application.
[0146] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program product is run on a computer, it enables the computer to execute the method provided in the embodiment of the present application.
[0147] The embodiment description in this application is described with reference to the flow chart and / or block diagram according to the method, equipment (device) and computer program product of embodiment of the present application.It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of general-purpose computer, special-purpose computer, embedded processing machine or other programmable data processing equipment to produce a machine, so that the instruction executed by the processor of computer or other programmable data processing equipment produces the device for realizing the function specified in one flow chart flow chart or multiple flow charts and / or one block or multiple blocks of block diagram.
[0148] These computer program instructions may also be stored in a computer-readable memory that can direct 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 a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0149] 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, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0150] It should also be noted that, in the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c can be single or multiple.
[0151] In the embodiments of the present application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, commodity, or apparatus comprising the element.
[0152] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0153] The various embodiments in this application are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the partial description of the method embodiments.
[0154] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments of the present application can be implemented using a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0155] Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the above-described devices, apparatuses and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0156] The above description is merely a specific embodiment of the present application. Any person skilled in the art may easily conceive of variations or substitutions within the technical scope disclosed in this application, and such variations or substitutions shall be within the scope of protection of this application. The scope of protection of this application shall be subject to the scope of protection of the claims.
Claims
1. A method for processing a message, characterized in that: The method is applied to a terminal device, and the method includes: receiving a first message; In a case where the first message is a reassembled message, launching a first application, and having the first application reassemble the first message, includes: The first application reads message reassembly configuration information, wherein: the message reassembly configuration information is information configured by the second application for the first application; the operations that the second application can implement include at least a message reassembly operation; and the message reassembly configuration information is used to support the first application in implementing the message reassembly operation; The first application performs the message reassembly operation on the first message based on the message reassembly configuration information to generate a second message.
2. The method according to claim 1, characterized in that The first application is a trusted application.
3. The method according to claim 2, characterized in that The message reassembly configuration information is stored in the trusted credentials of the first application.
4. The method according to claim 1, wherein The message reassembly configuration information includes a message reassembly code and initialization parameters; The first application, based on the message reassembly configuration information, performs the message reassembly operation on the first message to generate a second message, including: The first application executes the message reassembly code on the first message based on the initialization parameters to generate the second message.
5. The method according to claim 1, wherein Before receiving the first message, the method further includes: The second application calls the first application and sets the message reassembly configuration information.
6. The method according to claim 1, characterized in that Before receiving the first message, the method further includes obtaining, from the cloud, a range of resources and interfaces that the first application is allowed to access; The first application, based on the message reassembly configuration information, performs the message reassembly operation on the first message to generate a second message, including: The first application performs the message reassembly operation on the first message based on the message reassembly configuration information, subject to the restrictions of the resource and interface range that the first application is allowed to access, to generate the second message.
7. The method according to claim 6, characterized in that The obtaining, from the cloud, the range of resources and interfaces that the first application is allowed to access, includes, by a push proxy, obtaining, from the cloud, the range of resources and interfaces that the first application is allowed to access.
8. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Output the second message for display.
9. The method according to claim 8, characterized in that The outputting the second message for display includes: The first application outputs the second message to a push agent; The push agent outputs the second message to the notification management for message display.
10. The method according to claim 8, characterized in that The method further comprises: When the first application executes the message reassembly operation abnormally, the second message is prevented from being transmitted. exhibit.
11. The method according to claim 1, wherein: The receiving the first message includes the push agent receiving the first message; When the first message is a reassembled message, calling the first application to reassemble the first message includes: when the push agent determines that the first message is a reassembled message, the push agent pulls up the first application; and the first application reassembles the first message.
12. The method according to claim 11, characterized in that Before receiving the first message, the method further includes: The second application applies for a push token from the push proxy; After receiving the application from the second application, the push proxy sets a setting to allow the second application to call the first application, and the push proxy returns the push token to the second application; After the second application obtains the push token, the second application calls the first application and sets the message reassembly configuration information for the first application; The first application saves the message reassembly configuration information.
13. The method according to claim 1, wherein The first message is end-to-end encrypted information; During the process of the first application performing the message reassembly operation on the first message, the first application calls an encryption and decryption interface to decrypt the first message.
14. A device for processing a message, characterized in that: The device is applied to a terminal device, and includes: A receiving module, configured to receive a first message; a message reassembly module, configured to launch a first application module when the first message is a reassembled message; The first application module is used to: Reading message reassembly configuration information, wherein: the message reassembly configuration information is information configured by the second application module for the first application module; the operations that the second application module can implement include at least a message reassembly operation; and the message reassembly configuration information is used to support the first application module in implementing the message reassembly operation; Based on the message reassembly configuration information, the message reassembly operation is performed on the first message to generate a second message.
15. An electronic device, characterized in that: The electronic device comprises a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to perform the method steps according to any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 13.