WO2024040992A1 - 一种处理消息的方法、装置和电子设备 - Google Patents

一种处理消息的方法、装置和电子设备 Download PDF

Info

Publication number
WO2024040992A1
WO2024040992A1 PCT/CN2023/088670 CN2023088670W WO2024040992A1 WO 2024040992 A1 WO2024040992 A1 WO 2024040992A1 CN 2023088670 W CN2023088670 W CN 2023088670W WO 2024040992 A1 WO2024040992 A1 WO 2024040992A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
application
reassembly
configuration information
push
Prior art date
Application number
PCT/CN2023/088670
Other languages
English (en)
French (fr)
Inventor
李平
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2024040992A1 publication Critical patent/WO2024040992A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/53Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by executing in a restricted environment, e.g. sandbox or secure virtual machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/046Interoperability with other network applications or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present application relates to the field of computer technology, and in particular to a method, device and electronic device for processing messages.
  • Push messages generally includes two categories: notification messages and transparent messages. Among them, the transparent transmission message will directly launch the application and pass the data to the application. The application can make different behaviors according to the transmitted data; the notification message will not launch the application. The system component will present the notification message according to the data content of Push. For example, Display in the system notification area (such as the drop-down notification bar of Android/iOS, the push notification information of the user application in the tile in Windows).
  • the notification message will not launch the application.
  • the purpose of designing the notification message is to control the resource occupation of the terminal device and reduce interference to the user.
  • this design solution requires that the content transmitted in the Push notification message must be in clear text and cannot be modified. This makes it impossible for the terminal device to protect sensitive information in the notification message, and cannot provide personalized notification message presentation.
  • this application provides a method, device and electronic device for processing messages.
  • This application also provides a computer-readable storage medium.
  • this application provides a method for processing messages.
  • the method is applied to a terminal device.
  • the method includes:
  • the first application When the first message is a reorganized message, the first application is launched, and the first application performs message reorganization on the first message, including:
  • the first application reads the message reassembly configuration information, where: the message reassembly configuration information is information configured by the second application for the first application; the operations that can be implemented by the second application at least include message reassembly operations; the message reassembly configuration information is used to Support the first application to implement message reorganization operations;
  • the first application performs a message reorganization operation on the first message based on the message reorganization configuration information, and generates a second message.
  • the first application after receiving the pushed message, the first application is launched to reorganize the message, thereby improving the user experience of message display; further, since the first application is only used to implement the second application
  • the message reassembly operation does not require 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 occupation of the terminal device on the premise of improving the user experience of notification message display.
  • the first application in order to improve data security and avoid leakage of the first message, is a trusted application.
  • the message reassembly configuration information is stored in the trusted credentials of the first application.
  • the application service that launches the first application cannot access the trusted credentials of the first application.
  • the message reorganization configuration information cannot be obtained, ensuring the execution security of the message reorganization operation.
  • the message reassembly configuration information includes message reassembly code and initialization parameters
  • the first application based on the message reorganization configuration information, performs a message reorganization operation on the first message and generates a second message, including:
  • the first application based on the initialization parameters, executes the message reassembly code for the first message to generate the second message.
  • the method before receiving the first message, the method further includes:
  • the second application calls the first application to set the message reassembly configuration information.
  • the method further includes: obtaining from the cloud the resources and interface range that the first application is allowed to access;
  • the first application based on the message reorganization configuration information, performs a message reorganization operation on the first message and generates a second message, including:
  • the first application performs a message reassembly operation on the first message based on the message reassembly configuration information and generates a second message within the limits of the resources and interface ranges that the first application is allowed to access.
  • controllable interfaces such as basic data operations, encryption and decryption, and corresponding application resource query are provided, and the first application cannot start Other applications and access to other controlled resources improve system operation security.
  • obtaining the resources and interface ranges that the first application is allowed to access from the cloud includes: using the push agent to obtain the resources and interface ranges that the first application is allowed to access from the cloud.
  • the method further includes:
  • outputting the second message for display includes:
  • the first application outputs the second message to the push agent
  • the push agent outputs the second message to the notification management for message display.
  • the method further includes:
  • Receiving the first message includes, the push agent receiving the first message
  • calling the first application to reorganize the first message includes: when the push agent determines that the first message is a reorganized message, the push agent pulls up the first application; the first application The first message performs message reorganization.
  • the method before receiving the first message, the method further includes:
  • the second application applies for a push token from the push agent
  • the push agent After the push agent receives the application from the second application, it is set to allow the second application to call the first application, and the push agent returns the push token to the second application;
  • 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 message reassembly configuration information.
  • the first message is end-to-end encrypted information
  • the first application calls the encryption and decryption interface to decrypt the first message.
  • the application service that launches the first application does not participate in the decryption operation, the specific content of the first message cannot be obtained. In the entire process from receiving the pushed first message to displaying the second message, the application service that launches the first application can only obtain the reorganized content of the message, which greatly improves message security.
  • this application also proposes a device for processing messages.
  • the device is applied to terminal equipment.
  • the device includes:
  • a receiving module configured to receive the first message
  • a message reassembly module which is used to pull up the first application module when the first message is a reassembled message
  • the first application module is used for:
  • 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 at least include message reassembly operations; the message reassembly configuration information is used to Support the first application module to implement message reassembly operations;
  • a message reorganization operation is performed on the first message to generate a second message.
  • this application also proposes an electronic device.
  • the electronic device includes a memory for storing computer program instructions and a processor for executing the computer program instructions.
  • a trigger is triggered.
  • the electronic device performs the method steps of the first aspect.
  • this application also proposes a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to execute the method of the first aspect.
  • Figure 1 shows a schematic flow diagram of a push message according to an embodiment of the present application
  • Figure 2 shows a schematic diagram of a message push application scenario according to an embodiment of the present application
  • Figure 3 shows a flow chart of a method for processing messages according to an embodiment of the present application
  • Figure 4 shows a flow chart of a method for processing messages according to an embodiment of the present application
  • Figure 5 shows a schematic diagram of a device for processing messages according to an embodiment of the present application
  • Figure 6 shows a schematic diagram of an electronic device according to an embodiment of the present application.
  • Figure 1 shows a schematic flow diagram of a push message according to an embodiment of the present application.
  • the push server 113 sends the message that needs to be pushed to the terminal device 120 .
  • 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.
  • the application (App) 122 that needs to receive the transparent message is launched.
  • the application 122 receives transparent messages based on its own push function module 123 (Push Software Development Kit (Push SDK)). Then application 122 performs corresponding information processing on the transparent message.
  • Push SDK Push Software Development Kit
  • the terminal device 120 When the push message is a transparent message, the terminal device 120 needs to launch the application 122 for processing the transparent information. The startup and running of the application 122 will inevitably occupy the hardware resources of the terminal device 120 .
  • the push core 121 directly sends the notification message to the push agent (Push Agent) 124, and the push agent 124 sends the notification message to the notification management (NotificationManager) 125 for message display.
  • the push agent 124 directly sends the notification message to the notification management 125 for processing. Displayed, the terminal device 120 can only display the content of the pushed notification message in its entirety and cannot modify the personalized content. This results in notification messages being unable to be displayed in a personalized manner and sensitive information being blocked.
  • the terminal device 120 since the push agent 124 directly sends the notification message to the notification management 125 for message display, the terminal device 120 does not launch the application to process the notification message. Therefore, the terminal device 120 cannot decrypt the notification message, which requires Notification messages must be clear text throughout transmission. During the transmission process of notification messages, notification messages can easily be leaked.
  • the Push server 113 sends the notification During the data transmission process (103) when the message is pushed to the push core 121 of the terminal device 120, and during the data transmission process (104) when the push core 121 sends the notification message to the push agent 124, if the data transmission protocol is cracked, the cracker You can get the clear text notification message content.
  • the business service 111 and the big data operation platform 112 push the plain text notification message to the Push server 113
  • the Push server 113 pushes the plain text notification message to the push core 121 of the terminal device 120; therefore, in the Push server 113 Temporary notification messages are also in clear text. If the Push server 113 is attacked, the plaintext notification message content may be leaked.
  • an embodiment of the present application proposes a method for processing messages, which method is applied to a terminal device.
  • the application is launched to reorganize the notification message (for example, delete sensitive information, and reorganize the text of the message according to the user's personalized needs). word description method, etc.), the reorganized notification message is output and displayed, thereby improving the user experience of notification message display.
  • the terminal device launches an application (second application) for the transparent message to process the transparent message.
  • the terminal device launches the second application, and the second application can The notification message is reorganized, and then the second application outputs and displays the reorganized message.
  • the above solution can improve the user experience of notification message display, it requires launching a second application, which increases the hardware resource usage of the terminal device.
  • a first application is constructed based on the second application, and the first application is used to implement the message reassembly operation of the second application.
  • the terminal device can launch the first application, and the first application reorganizes the notification message, and then the first application outputs and displays the reorganized message. Since the first application is only used to implement the message reassembly 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 those occupied by launching the second application. hardware resources. This effectively controls the hardware resource occupation of the terminal device on the premise of improving the user experience of notification message display.
  • Figure 2 shows a schematic diagram of a message push application scenario according to an embodiment of the present application.
  • Figure 3 shows a flow chart of a method for processing messages according to an embodiment of the present application.
  • the cloud application (App) server 210 calls the push server (PushServer) 220 to send the first message (for example, a transparent message or a notification message) (S301).
  • the push server 220 pushes the first message sent by the application server 210 to the terminal device 230 (S302).
  • the terminal device 230 executes the following process shown in Figure 2 to implement message processing.
  • the push core 231 of the terminal device 230 receives the first message pushed by the push server 220.
  • the terminal device 230 determines whether the first message is a reassembled message.
  • the first message is processed according to other policies (S312).
  • the first application 234 is launched, and the first application 234 performs a message reassembly operation on the first message (S320).
  • the message reassembly operation may include a variety of different operation contents, which is not limited by this application. For example, rearrange the combination of elements in the message, change the message style, add message icons and backgrounds, replace specified elements/variables in the message, etc.
  • the message sent is: "Dear ⁇ name ⁇ , the ⁇ service ⁇ you purchased is about to expire", and the variables ⁇ name ⁇ and ⁇ service ⁇ in the message are replaced during the message reassembly process.
  • the first information can be marked as a reassembly message in various ways.
  • the reassembled message is marked by adding a mark.
  • the application server 210 adds a first mark for marking the reassembled message to the first information if the first message is a reassembled message.
  • the reassembled message is marked by binding the information source.
  • the application server 210 is recorded at the terminal device 230 as the information source for the reassembled message.
  • the first message sent by the application server 210 includes information source information.
  • the terminal device 230 recognizes that the information source of the first message is the application server 210, it can confirm that the information source of the first message is the application server 210. Recognize the first message as the reorganization message.
  • the reorganization message is a notification message that requires a message reorganization operation.
  • 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), then according to the transparent message processing strategy, the push core 231 pulls up the corresponding application to process the first 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 determining whether the first mark is included, or by determining by the information source). If the 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.
  • the push agent 232 executes S320.
  • the reassembly message is a notification message that requires a message reassembly operation or a transparent message that only requires a message reassembly operation.
  • the push core 231 of the terminal device 230 performs a message reassembly operation on whether the first message needs to be performed (for example, judging by whether it contains the first mark, or judging by the information source).
  • the push core 231 appends a second tag to the first message, and sends the first message appended with the second tag to the push agent 232 .
  • the push agent 232 executes S320.
  • the push core 231 confirms the type of the first message (notification message or transparent transmission message). If the first message is a transparent message, the push core 231 pulls up the corresponding application to process the first message according to 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 . After recognizing that the first message does not have the first mark, the push agent 232 sends the first message to the notification management 233 for message display.
  • the push agent 232 pulls up the first application 234 and sends the first message to the first application 234.
  • the first application 234 is a trusted application (Trusted Application, TA), which runs in a trusted execution environment (Trusted) in the terminal system operating system. execution environment, TEE).
  • the push proxy 232 is a client application (Client Applicant, CA) that can call a trusted application (first application 234).
  • the first application 234 reads the pre-saved message reorganization configuration information.
  • the message reassembly configuration information is stored in the trusted certificate 235 of the first application 234 (TA).
  • the push agent 232 can only pull up the first application 234, but cannot access the trusted certificate 235 of the first application 234. The push agent 232 cannot obtain the message reassembly configuration information, thus ensuring the security of the message reassembly operation.
  • the message reassembly configuration information can also be saved in other locations.
  • the first application 234 performs a message reassembly operation on the first message based on the message reassembly configuration information, and generates a second message.
  • the first application 234 outputs the second message for display.
  • the first application 234 outputs the second message to the push agent 232.
  • the push agent 232 outputs the second message to the notification management 233 for message display.
  • the first application 234 can implement different message reassembly operations. For example, based on the first message reorganization configuration information, run the first application 234 to perform a message reorganization operation on the message to delete sensitive words in the message; based on the second message reorganization configuration information, run the first application 234 to perform a message reorganization operation on the message. , to split long sentence messages into short sentence messages.
  • the message reassembly configuration information includes message reassembly codes and initialization parameters.
  • the first application 234 executes the read message reassembly code for the first message based on the read initialization parameters to generate a second message.
  • the message reassembly configuration information may also be other different content structures.
  • the first application 234 has built-in unified initialization parameters, and the message reassembly configuration information includes a message reassembly code.
  • the first application 234 executes the read message reassembly code on the first message based on the built-in initialization parameters to generate the second message.
  • the first application 234 includes message reassembly code, and the message reassembly configuration information includes initialization parameters.
  • 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.
  • the first application 234 may also perform other processing operations.
  • the message sent by the application server 210 to the push server 220 is compressed data.
  • the message sent by the application server 210 to the push server 220 is uncompressed data; after receiving the message, the push server 220 compresses it and then pushes it to the terminal device 230.
  • the first application 234 first decompresses the first message and then performs the message reassembly operation.
  • the message sent by the application server 210 to the push server 220 is encrypted data (end-to-end encrypted information).
  • the message sent by 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.
  • the first application 234 first calls the encryption and decryption interface to decrypt the first message and then performs the message reassembly operation.
  • the push agent 232 cannot obtain the specific content of the first message without participating in the decryption operation. In the entire process from receiving the pushed first message to displaying the second message, the push agent 232 can only obtain the reorganized content of the message, which greatly improves message security.
  • S331 when the first application 234 performs the message reassembly operation and an exception occurs (for example, the message reassembly code executes abnormally); after S331, execute: prevent the second Display of messages (not displaying notification messages), and reporting failure situations to the server so that application developers can troubleshoot problems.
  • an exception for example, the message reassembly code executes abnormally
  • S331 execute: prevent the second Display of messages (not displaying notification messages), and reporting failure situations to the server so that application developers can troubleshoot problems.
  • the second application 236 calls the first application 234 to generate the message reassembly configuration information.
  • the second application 236 calls the first application 234 to configure the message reassembly code and initialization parameters for the first application 234 .
  • Figure 4 shows a flow chart of a method for processing messages according to an embodiment of the present application.
  • the terminal device 230 executes the following process shown in FIG. 4 to obtain the message reassembly code and initialization parameters for the first application 234.
  • the second application 236 applies for a push token (PushToken) from the push agent 232.
  • PushToken a push token
  • the push agent 232 sets the settings to allow the second application 236 to call the first application 234.
  • the authorized second application 236 also serves as a client application (Client Applicant, CA) that can call the trusted application (first application 234).
  • CA Client Applicant
  • push proxy 232 returns the push token to second application 236.
  • the push agent 232 obtains the resource and interface (API) range that the first application 234 is allowed to access from the cloud.
  • API resource and interface
  • the first application 234 runs the message reassembly code, it will Subject to the scope of resources and interfaces this accesses.
  • the first application 234 is restricted from accessing the network to download resources such as icons of the first message, and can only perform encryption and decryption of the first message or localized formatting of the message content text.
  • the first application 234 performs a message reassembly operation on the first message based on the message reassembly configuration information and generates a second message within the limits of the resources and interface ranges that the first application 234 is allowed to access.
  • the first application 234 Based on the limitations of accessed resources and interface scope, during the process of message reassembly operation being executed in the first application 234 (TA), only controllable interfaces such as basic data operations and encryption and decryption (API), and corresponding application resource query are provided. , the first application 234 cannot launch other applications and access other controlled resources, which improves system operation security.
  • TA message reassembly operation
  • API encryption and decryption
  • the second application 236 calls the first application 234 to set the message reassembly configuration information (message reassembly code and initialization parameters) for the first application 234.
  • the first application 234 saves the message reassembly configuration information (message reassembly code and initialization parameters) to its own trusted certificate 235.
  • an embodiment of the present application also provides a device for processing messages, which device is applied to a terminal device.
  • Figure 5 shows a schematic diagram of a device for processing messages according to an embodiment of the present application.
  • the device 500 for processing messages includes:
  • 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.
  • 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 .
  • the first application module 530 (refer to the first application 234) is used for:
  • the message reassembly configuration information is configured by the second application module (refer to the second application 236) for the first application module 530 information; the operations that can be implemented by the second application module include at least message reassembly operations; the message reassembly configuration information is used to support the first application module 530 to implement message reassembly operations;
  • each module is only a division of logical functions.
  • each module can be divided into The functionality of a module is implemented in the same or more software and/or hardware.
  • the device proposed in the embodiment of the present application may be fully or partially integrated into a physical entity, or may be physically separated.
  • these modules can all be implemented in the form of software calling through processing elements; they can also all be implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware.
  • the detection module can be a separate processing element, or can be integrated into a chip of the electronic device.
  • the implementation of other modules is similar.
  • all or part of these modules can be integrated together or implemented independently.
  • each step of the above method or each of the above modules can be completed by instructions in the form of hardware integrated logic circuits or software in the processor element.
  • the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more specific integrated circuits (Application Specific Integrated Circuit, ASIC), or one or more digital signal processors ( Digital Singnal Processor, DSP), or one or more Field Programmable Gate Array (Field Programmable Gate Array, FPGA), etc.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Singnal Processor
  • FPGA Field Programmable Gate Array
  • these modules can be integrated together and implemented in the form of a System-On-a-Chip (SOC).
  • SOC System-On-a-Chip
  • An embodiment of the present application also provides an electronic device (terminal device).
  • the electronic device includes a memory for storing computer program instructions and a processor for executing the program instructions. When the computer program instructions are executed by the processor When, the electronic device is triggered to execute the method process described in the embodiments of this application.
  • the one or more computer programs are stored in the memory.
  • the one or more computer programs include instructions.
  • the device executes the application. Method steps described in the examples.
  • FIG. 6 shows 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.
  • the processor 620 controls the electronic device 600 to execute the embodiment of the present application.
  • the processor of the electronic device may be an on-chip device SOC.
  • the processor may include a central processing unit (Central Processing Unit, CPU), and may further include other type of processor.
  • the processor of the electronic device may be a PWM control chip.
  • the processor involved may include, for example, a CPU, a DSP, a microcontroller or a digital signal processor, and may also include a GPU, embedded neural network processor (Neural-network Process Units, NPU). ) and an image signal processor (Image Signal Processing, ISP), which may also include necessary hardware accelerators or logic processing hardware circuits, such as ASIC, or one or more integrated circuits used to control the execution of the program of the technical solution of this application wait.
  • the processor may have functionality to operate one or more software programs, which may be stored in a storage medium.
  • 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, or a random access memory (random access memory).
  • ROM read-only memory
  • RAM random access memory
  • dynamic storage devices that can store information and instructions
  • EEPROM electrically erasable programmable read-only memory
  • CD-ROM compact disc read-only memory
  • optical disc storage including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.
  • magnetic disk storage media or other magnetic storage devices or can also be used to carry or Any computer-readable medium that stores desired program code in the form of instructions or data structures and that can be accessed by a computer.
  • the processor and the memory can be combined into a processing device, which is more commonly independent of each other.
  • the processor is used to execute the program code stored in the memory to implement the method described in the embodiment of the present application.
  • the memory can also be integrated in the processor, or independent of the processor.
  • equipment, devices, and modules described in the embodiments of this application may be implemented by computer chips or entities, or by products with certain functions.
  • embodiments of the present application may be provided as methods, devices, or computer program products.
  • the invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects.
  • the invention may take the form of a computer program product embodied on one or more computer-usable storage media embodying computer-usable program code therein.
  • 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.
  • the technical solution of the present application is essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
  • an embodiment of the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to execute the method provided by the embodiment of the present application.
  • An embodiment of the present application also provides a computer program product.
  • the computer program product includes a computer program that, when run on a computer, causes the computer to execute the method provided by the embodiment of the present application.
  • These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce a use A device for realizing the functions specified in one process or multiple processes of the flowchart and/or one block or multiple blocks of the block diagram.
  • These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions
  • the device implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.
  • These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device.
  • Instructions provide steps for implementing the functions specified in a process or processes of a flowchart diagram and/or a block or blocks of a block diagram.
  • At least one of a, b and c can mean: 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, also Can be multiple.
  • the terms “comprising”, “comprises” or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, commodity or device that includes a series of elements not only includes those elements, but also includes Other elements are not expressly listed or are inherent to the process, method, article or equipment. Without further limitation, an element defined by the statement “comprises a" does not exclude the presence of additional identical elements in a process, method, article, or device that includes the stated element.
  • the application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer.
  • 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.
  • program modules may be located in both local and remote computer storage media including storage devices.

Abstract

本申请实施例提供一种处理消息的方法、装置和电子设备。方法应用于终端设备,方法包括:接收第一消息;在第一消息为重组消息的情况下,拉起第一应用,由第一应用对第一消息进行消息重组,包括:第一应用读取消息重组配置信息,基于消息重组配置信息,对第一消息执行消息重组操作,生成第二消息。根据本申请实施例的方法,在接收到推送来的消息后,拉起第一应用对消息进行重组,从而提高消息展示的用户体验。

Description

一种处理消息的方法、装置和电子设备 技术领域
本申请涉及计算机技术领域,特别涉及一种处理消息的方法、装置和电子设备。
背景技术
如今的终端设备,包括手机、平板、手表、电视、个人电脑等,均提供了从云端服务器发送消息到终端的推送(Push)能力。Push消息的实现一般包含两类:通知消息和透传消息。其中透传消息将直接拉起应用,并传递数据到应用,应用可根据传递数据做出不同的行为;通知消息则不会拉起应用,由系统部件根据Push的数据内容呈现通知消息,例如,在系统通知区域进行显示(如安卓/iOS的下拉通知栏、Windows中的磁贴中提示用户应用的推送通知信息)。
通知消息不会拉起应用,如此设计通知消息的目的是为了控制终端设备的资源占用,减少对用户的干扰。然而该设计方案要求在Push通知消息传递的内容必须是明文、且无法修改,这就使得终端设备无法对通知消息中敏感信息进行保护,以及,无法提供个性化的通知消息呈现。
发明内容
针对现有技术下推送通知消息存在的问题,本申请提供了一种处理消息的方法、装置和电子设备,本申请还提供一种计算机可读存储介质。
本申请实施例采用下述技术方案:
第一方面,本申请提供一种处理消息的方法,方法应用于终端设备,方法包括:
接收第一消息;
在第一消息为重组消息的情况下,拉起第一应用,由第一应用对第一消息进行消息重组,包括:
第一应用读取消息重组配置信息,其中:消息重组配置信息为,由第二应用针对第一应用所配置的信息;第二应用可实现的操作至少包括消息重组操作;消息重组配置信息用于支持第一应用实现消息重组操作;
第一应用,基于消息重组配置信息,对第一消息执行消息重组操作,生成第二消息。
根据本申请实施例的方法,在接收到推送来的消息后,拉起第一应用对消息进行重组,从而提高消息展示的用户体验;进一步的,由于第一应用仅用于实现第二应用的消息重组操作,其并不需要具备第二应用的完整结构,因此,拉起第一应用所占用的硬件资源会低于拉起第二应用所占用的硬件资源。这就在提高通知消息展示的用户体验的前提下,有效控制了终端设备的硬件资源占用。
在第一方面的一种实现方式中,为了提高数据安全,避免第一消息泄露,第一应用为可信应用。
在第一方面的一种实现方式中,为了提高数据安全,避免消息重组配置信息泄露,消息重组配置信息保存在第一应用的可信凭据中。
由于消息重组配置信息保存在第一应用的可信凭证中,拉起第一应用的应用服务并不能访问第一应用的可信凭证。拉起第一应用的应用服务就无法获取消息重组配置信息,确保了消息重组操作的执行安全。
在第一方面的一种实现方式中,消息重组配置信息包括消息重组代码以及初始化参数;
第一应用,基于消息重组配置信息,对第一消息执行消息重组操作,生成第二消息,包括:
第一应用,基于初始化参数,针对第一消息执行消息重组代码,生成第二消息。
在第一方面的一种实现方式中,接收第一消息之前,方法还包括:
第二应用调用第一应用,设置消息重组配置信息。
在第一方面的一种实现方式中,为了提高安全性,接收第一消息之前,方法还包括,从云端获取第一应用允许访问的资源和接口范围;
第一应用,基于消息重组配置信息,对第一消息执行消息重组操作,生成第二消息,包括:
第一应用在第一应用允许访问的资源和接口范围的限制下,基于消息重组配置信息,对第一消息执行消息重组操作,生成第二消息。
基于访问的资源和接口范围的限制,在消息重组操作在第一应用中执行的过程中,仅提供可控的如基本数据运算和加解密、对应应用资源查询等接口,第一应用无法拉起其他应用和访问其他受控资源,提高了系统运行安全性。
具体的,在第一方面的一种实现方式中,从云端获取第一应用允许访问的资源和接口范围,包括,由推送代理从云端获取第一应用允许访问的资源和接口范围。
在第一方面的一种实现方式中,方法还包括:
输出第二消息进行展示。
在第一方面的一种实现方式中,输出第二消息进行展示,包括:
第一应用输出第二消息到推送代理;
推送代理输出第二消息到通知管理进行消息展示。
在第一方面的一种实现方式中,方法还包括:
在第一应用执行消息重组操作出现异常的情况下,阻止第二消息的展示。
在第一方面的一种实现方式中:
接收第一消息,包括,推送代理接收第一消息;
在第一消息为重组消息的情况下,调用第一应用对第一消息进行消息重组,包括:推送代理判断第一消息为重组消息的情况下,推送代理拉起第一应用;第一应用对第一消息进行消息重组。
在第一方面的一种实现方式中,接收第一消息之前,方法还包括:
第二应用向推送代理申请推送令牌;
推送代理接收到第二应用的申请后,设置允许第二应用调用第一应用,并且,推送代理向第二应用返回推送令牌;
第二应用获取推送令牌后,第二应用调用第一应用,设置针对第一应用的消息重组配置信息;
第一应用保存消息重组配置信息。
在第一方面的一种实现方式中,为了提高数据安全性,第一消息为端对端加密信息;
在第一应用对第一消息执行消息重组操作的过程中,第一应用调用加解密接口对第一消息进行解密。
拉起第一应用的应用服务不参与解密操作,就无法获取第一消息的具体内容。在从接收到推送来的第一消息到展示第二消息的整个过程中,拉起第一应用的应用服务仅能获取消息重组后的内容,大大提高了消息安全性。
第二方面,本申请还提出了一种处理消息的装置,装置应用于终端设备,装置包括:
接收模块,其用于接收第一消息;
消息重组模块,其用于在第一消息为重组消息的情况下,拉起第一应用模块;
第一应用模块,其用于:
读取消息重组配置信息,其中:消息重组配置信息为,由第二应用模块针对第一应用模块所配置的信息;第二应用模块可实现的操作至少包括消息重组操作;消息重组配置信息用于支持第一应用模块实现消息重组操作;
基于消息重组配置信息,对第一消息执行消息重组操作,生成第二消息。
第三方面,本申请还提出了一种电子设备,电子设备包括用于存储计算机程序指令的存储器和用于执行计算机程序指令的处理器,其中,当计算机程序指令被该处理器执行时,触发电子设备执行如第一方面的方法步骤。
第四方面,本申请还提出了一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如第一方面的方法。
附图说明
图1所示为根据本申请一实施例的推送消息流程示意图;
图2所示为根据本申请一实施例的消息推送应用场景示意图;
图3所示为根据本申请一实施例的处理消息的方法流程图;
图4所示为根据本申请一实施例的处理消息的方法流程图;
图5所示为根据本申请一实施例的处理消息的装置示意图;
图6所示为根据本申请一实施例的电子设备示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范 围。
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。
图1所示为根据本申请一实施例的推送消息流程示意图。
如图1所示,当业务服务111、大数据运营平台112需要推送消息到终端设备120时,其将消息首先推送到推送服务器(PushServer)113。
推送服务器113将需要推送的消息发送到终端设备120。
终端设备120的推送核心(Push Core)121接收Push服务器113推送的消息,并为接收到的推送消息分类。
如果推送消息是透传消息,则拉起需要接收该透传消息的应用(App)122。应用122基于自身的推送功能模块123(推送软件开发工具包(Push Software Development Kit,Push SDK))接收透传消息。之后应用122对透传消息做相应的信息处理。
在推送消息是透传消息的情况下,终端设备120需要拉起用于处理透传信息的应用122,应用122的启动以及运行必然会占用终端设备120的硬件资源。
如果推送消息是通知消息,推送核心121将通知消息直接发送到推送代理(Push Agent)124,推送代理124将通知消息发送到通知管理(NotificationManager)125进行消息显示。
在推送消息是通知消息的情况下,虽然终端设备120不需要拉起用于处理消息的应用,避免了硬件资源占用的增加,但是,由于推送代理124是直接将通知消息发送到通知管理125进行消息显示的,终端设备120只能将推送的通知消息的内容完整展示,不能进行个性化的内容修改。这就导致了通知消息无法进行个性化显示以及敏感信息屏蔽。
进一步的,由于推送代理124是直接将通知消息发送到通知管理125进行消息显示,终端设备120不拉起应用对通知消息进行处理,因此,终端设备120无法对通知消息进行解密操作,这就要求通知消息在整个传输过程中必须是明文。在通知消息的传输过程中,通知消息很容易被泄露。
例如,在业务服务111将通知消息推送到Push服务器113的数据传输过程中(101)、大数据运营平台112将通知消息推送到Push服务器113的数据传输过程中(102)、Push服务器113将通知消息推送到终端设备120的推送核心121的数据传输过程中(103)、以及推送核心121将通知消息发送到推送代理124的数据传输过程中(104),如果数据传输协议被破解,则破解者就可以获取明文的通知消息内容。
又例如,由于业务服务111、大数据运营平台112将明文的通知消息推送到Push服务器113,并且,Push服务器113将明文的通知消息推送到终端设备120的推送核心121;因此,Push服务器113中暂存的通知消息也是明文。如果Push服务器113被攻击,则可能泄露明文的通知消息内容。
针对上述情况,本申请一实施例提出了一种处理消息的方法,该方法应用于终端设备。在本申请一实施例处理消息的方法中,在接收到推送来的通知消息后,拉起应用对通知消息进行重组(例如,删除敏感信息,根据用户个性化需求重新组织消息的文 字描述方式等),将重组后的通知消息输出并进行展示,从而提高通知消息展示的用户体验。
进一步的,在推送的消息为透传消息的情况下,终端设备拉起针对透传消息的应用(第二应用)对透传消息进行处理。那么,基于透传消息的实现方案,在第二应用具备实现消息重组操作的功能的情况下,在终端设备接收到需要重组的通知消息时,终端设备可以拉起第二应用,由第二应用对通知消息进行重组,之后第二应用将重组后的消息输出并进行展示。上述方案虽然可以提高通知消息展示的用户体验,但是,由于需要拉起第二应用,增加了终端设备的硬件资源占用。
针对上述终端设备的硬件资源占用增加的问题,在本申请一实施例处理消息的方法中,基于第二应用构建第一应用,第一应用用于实现第二应用的消息重组操作。这样,在终端设备接收到需要重组的通知消息时,终端设备可以拉起第一应用,由第一应用对通知消息进行重组,之后第一应用将重组后的消息输出并进行展示。由于第一应用仅用于实现第二应用的消息重组操作,其并不需要具备第二应用的完整结构,因此,拉起第一应用所占用的硬件资源会低于拉起第二应用所占用的硬件资源。这就在提高通知消息展示的用户体验的前提下,有效控制了终端设备的硬件资源占用。
图2所示为根据本申请一实施例的消息推送应用场景示意图。图3所示为根据本申请一实施例的处理消息的方法流程图。
如图2以及图3所示,在消息推送应用场景中,云端的应用(App)服务器210调用推送服务器(PushServer)220以下发第一消息(例如,透传消息或通知消息)(S301)。推送服务器220将应用服务器210下发的第一消息推送到终端设备230(S302)。
终端设备230执行图2所示的下述流程以实现消息的处理。
S310,终端设备230的推送核心231接收推送服务器220推送的第一消息。
S311,终端设备230判断第一消息是否为重组消息。
如果第一消息不是重组消息,则按照其他策略对第一消息进行处理(S312)。
如果第一消息是重组消息,则拉起第一应用234,由第一应用234对第一消息执行消息重组操作(S320)。
具体的,消息重组操作可以包含多种不同的操作内容,本申请对此不做限制。例如,重新排布消息中各元素的组合方式,改变消息样式,增加消息图标、背景,替换消息中的指定元素/变量等。例如,下发消息为:“尊敬的{name},您购买的{service}即将到期….”,消息重组过程中替换消息中的变量{name}以及{service}。
具体的,在实际应用场景中,可以通过多种方式标记第一信息为重组消息。
例如,在一种实现方式中,通过添加标记的方式标记重组消息。应用服务器210在下发第一消息的过程中,如果第一消息为重组消息,则在第一信息中加入用于标记重组消息的第一标记。
又例如,在另一种实现方式中,通过绑定信息源的方式标记重组消息。在终端设备230处记录应用服务器210为重组消息的信息源。应用服务器210下发的第一消息包含信息源信息。终端设备230识别到第一消息的信息源为应用服务器210,则可确 认第一消息为重组消息。
在S311的一种实现方式中,重组消息为需要执行消息重组操作的通知消息。
在S311中,终端设备230的推送核心231确认第一消息的类型(通知消息或透传消息)。如果第一消息为透传消息(即可以确认第一消息不为重组消息),则按照透传消息的处理策略,推送核心231拉起对应的应用来处理第一消息。如果第一消息为通知消息,则推送核心231将第一消息发送到推送代理232。推送代理232判断针对第一消息是否需要执行消息重组操作(例如,通过是否包含第一标记判断,或者,通过信息源判断)。如果针对第一消息不需要执行消息重组操作(即可以确认第一消息不为重组消息),推送代理232将第一消息发送到通知管理233进行消息显示。
如果针对第一消息需要执行消息重组操作(第一消息为重组消息),推送代理232执行S320。
在S311的另一种实现方式中,重组消息为需要执行消息重组操作的通知消息或仅需要执行消息重组操作的透传消息。
在S311中,终端设备230的推送核心231针对第一消息是否需要执行消息重组操作(例如,通过是否包含第一标记判断,或者,通过信息源判断)。
如果针对第一消息需要执行消息重组操作,推送核心231为第一消息附加第二标记,将附加有第二标记的第一消息发送到推送代理232。推送代理232识别到第一消息具备第一标记后,推送代理232执行S320。
如果针对第一消息不需要执行消息重组操作(即可以确认第一消息不为重组消息),推送核心231确认第一消息的类型(通知消息或透传消息)。如果第一消息为透传消息,则按照透传消息的处理策略,推送核心231拉起对应的应用来处理第一消息。如果第一消息为通知消息,则推送核心231将第一消息发送到推送代理232。推送代理232识别到第一消息不具备第一标记后,将第一消息发送到通知管理233进行消息显示。
S320,推送代理232拉起第一应用234,将第一消息发送到第一应用234。
具体的,为了提高数据安全,避免第一消息泄露,在一实施例中,第一应用234为可信应用(Trusted Application,TA),其运行在终端系统操作系统中的可信执行环境(Trusted execution environment,TEE)中。推送代理232为可调用可信应用(第一应用234)的客户端应用(Client Applicant,CA)。
S330,第一应用234读取预先保存的消息重组配置信息。
具体的,为了提高数据安全,避免消息重组配置信息泄露,在一实施例中,消息重组配置信息保存在第一应用234(TA)的可信凭证235中。
由于消息重组配置信息保存在第一应用234的可信凭证235中,推送代理232仅能拉起第一应用234,但不能访问第一应用234的可信凭证235。推送代理232就无法获取消息重组配置信息,确保了消息重组操作的执行安全。
进一步的,在另一实施例中,消息重组配置信息也可以保存在其他位置。
S331,第一应用234基于消息重组配置信息,对第一消息执行消息重组操作,生成第二消息。
在S331之后,第一应用234输出第二消息进行展示。
S340,第一应用234输出第二消息到推送代理232。
S350,推送代理232输出第二消息到通知管理233进行消息展示。
具体的,在S330以及S331中,对应不同的消息重组配置信息,第一应用234可以实现不同的消息重组操作。例如,基于第一消息重组配置信息,运行第一应用234,对消息执行消息重组操作,以删除消息中的敏感词;基于第二消息重组配置信息,运行第一应用,对消息执行消息重组操作,以将长句消息拆分为短句消息。
具体的,在一实施例中,消息重组配置信息包括消息重组代码以及初始化参数。在S331中,第一应用234基于读取到的初始化参数,针对第一消息执行读取到的消息重组代码,生成第二消息。
进一步的,在其他实施例中,消息重组配置信息也可以是其他不同的内容结构。
例如,在另一实施例中,第一应用234内置统一的初始化参数,消息重组配置信息包括消息重组代码。在S331中,第一应用234基于内置的初始化参数,针对第一消息执行读取到的消息重组代码,生成第二消息。
又例如,在另一实施例中,第一应用234包含消息重组代码,消息重组配置信息包括初始化参数。在S331中,第一应用234基于读取到的初始化参数,针对第一消息执行自身的消息重组代码,生成第二消息。
进一步的,在S331中,第一应用234除了可以对第一消息执行消息重组操作,还可以执行其他处理操作。
例如,在一实施例中,为了降低数据传输量,在S301中,应用服务器210下发到推送服务器220的消息为压缩后的数据。或者,在S301中,应用服务器210下发到推送服务器220的消息为未压缩的数据;推送服务器220接收到消息后,将其压缩后再推送到终端设备230。
在S331中,第一应用234首先对第一消息解压缩后再进行消息重组操作。
又例如,在一实施例中,为了提高数据安全性,在S301中,应用服务器210下发到推送服务器220的消息为加密后的数据(端对端加密信息)。或者,在S301中,应用服务器210下发到推送服务器220的消息为未加密的数据;推送服务器220接收到消息后,将其加密(端对端加密信息)后再推送到终端设备230。
在S331中,第一应用234首先调用加解密接口对第一消息解密后再进行消息重组操作。
这样,推送代理232不参与解密操作,就无法获取第一消息的具体内容。在从接收到推送来的第一消息到展示第二消息的整个过程中,推送代理232仅能获取消息重组后的内容,大大提高了消息安全性。
进一步的,为避免消息泄露,在一实施例中,在S331中,在第一应用234执行消息重组操作出现异常(例如,消息重组代码执行异常)的情况下;在S331之后执行:阻止第二消息的展示(不展示通知消息),以及,将失败情况上报至服务器以便应用开发者排查问题。
进一步的,为了使得第一应用234基于消息重组配置信息可以实现第二应用236的消息重组操作,在一实施例中,由第二应用236调用第一应用234生成消息重组配置信息。例如,第二应用236调用第一应用234配置针对第一应用234的消息重组代码以及初始化参数。
图4所示为根据本申请一实施例的处理消息的方法流程图。
在S310之前,终端设备230执行图4所示的下述流程以获取针对第一应用234的消息重组代码以及初始化参数。
S400,第二应用236向推送代理232申请推送令牌(PushToken)。
S410,推送代理232接收到第二应用236的申请后,设置允许第二应用236调用第一应用234。具体的,授权第二应用236也作为可调用可信应用(第一应用234)的客户端应用(Client Applicant,CA)。
并且,推送代理232向第二应用236返回推送令牌。
进一步的,为了提高安全性,在一实施例中,在S410中,推送代理232从云端获取第一应用234允许访问的资源和接口(API)范围,第一应用234运行消息重组代码时,将受此访问的资源和接口范围的限制。例如,限制第一应用234不可访问网络下载第一消息的图标等资源,仅能针对第一消息做加解密或消息内容文本的本地化格式化。
在S331中,第一应用234在第一应用234允许访问的资源和接口范围的限制下,基于消息重组配置信息,对第一消息执行消息重组操作,生成第二消息。
基于访问的资源和接口范围的限制,在消息重组操作在第一应用234(TA)中执行的过程中,仅提供可控的如基本数据运算和加解密(API)、对应应用资源查询等接口,第一应用234无法拉起其他应用和访问其他受控资源,提高了系统运行安全性。
S420,第二应用236获取推送令牌后,第二应用236调用第一应用234,设置针对第一应用234的消息重组配置信息(消息重组代码以及初始化参数)。
S430,第一应用234保存消息重组配置信息(消息重组代码以及初始化参数)到自身的可信凭证235。
基于本申请实施例的方法,本申请一实施例还提出了一种处理消息的装置,该装置应用于终端设备。
图5所示为根据本申请一实施例的处理消息的装置示意图。如图5所示,处理消息的装置500包括:
接收模块510,其用于接收第一消息;具体的,在一实施例中,参照推送代理232,接收模块510构造在推送代理232中。
消息重组模块520,其用于在第一消息为重组消息的情况下,拉起第一应用模块;具体的,在一实施例中,参照推送代理232,消息重组模块520构造在推送代理232中。
第一应用模块530(参照第一应用234),其用于:
读取消息重组配置信息(在一实施例中,其保存在可信凭证235),其中:消息重组配置信息为,由第二应用模块(参照第二应用236)针对第一应用模块530所配置的信息;第二应用模块可实现的操作至少包括消息重组操作;消息重组配置信息用于支持第一应用模块530实现消息重组操作;
基于消息重组配置信息,对第一消息执行所述消息重组操作,生成第二消息。
在本申请实施例的描述中,为了描述的方便,描述装置时以功能分为各种模块分别描述,各个模块的划分仅仅是一种逻辑功能的划分,在实施本申请实施例时可以把各模块的功能在同一个或多个软件和/或硬件中实现。
具体的,本申请实施例所提出的装置在实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块以软件通过处理元件调用的形式实现,部分模块通过硬件的形式实现。例如,检测模块可以为单独设立的处理元件,也可以集成在电子设备的某一个芯片中实现。其它模块的实现与之类似。此外这些模块全部或部分可以集成在一起,也可以独立实现。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。
例如,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit,ASIC),或,一个或多个数字信号处理器(Digital Singnal Processor,DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,FPGA)等。再如,这些模块可以集成在一起,以片上装置(System-On-a-Chip,SOC)的形式实现。
本申请一实施例还提出了一种电子设备(终端设备),电子设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发电子设备执行如本申请实施例所述的方法流程。
具体的,在本申请一实施例中,上述一个或多个计算机程序被存储在上述存储器中,上述一个或多个计算机程序包括指令,当上述指令被上述设备执行时,使得上述设备执行本申请实施例所述的方法步骤。
图6所示为根据本申请一实施例的电子设备示意图。电子设备600包括用于存储计算机程序指令的存储器610、用于执行程序指令的处理器620,其中,当计算机程序指令被该处理器620执行时,处理器620控制电子设备600执行本申请实施例中所示的手写笔状态切换方法。
具体的,在本申请一实施例中,电子设备的处理器可以是片上装置SOC,该处理器中可以包括中央处理器(Central Processing Unit,CPU),还可以进一步包括其他 类型的处理器。具体的,在本申请一实施例中,电子设备的处理器可以是PWM控制芯片。
具体的,在本申请一实施例中,涉及的处理器可以例如包括CPU、DSP、微控制器或数字信号处理器,还可包括GPU、嵌入式神经网络处理器(Neural-network Process Units,NPU)和图像信号处理器(Image Signal Processing,ISP),该处理器还可包括必要的硬件加速器或逻辑处理硬件电路,如ASIC,或一个或多个用于控制本申请技术方案程序执行的集成电路等。此外,处理器可以具有操作一个或多个软件程序的功能,软件程序可以存储在存储介质中。
具体的,在本申请一实施例中,电子设备的存储器可以是只读存储器(read-only memory,ROM)、可存储静态信息和指令的其它类型的静态存储设备、随机存取存储器(random access memory,RAM)或可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何计算机可读介质。
具体的,在本申请一实施例中,处理器可以和存储器可以合成一个处理装置,更常见的是彼此独立的部件,处理器用于执行存储器中存储的程序代码来实现本申请实施例所述方法。具体实现时,该存储器也可以集成在处理器中,或者,独立于处理器。
进一步的,本申请实施例阐明的设备、装置、模块,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。
本领域内的技术人员应明白,本申请实施例可提供为方法、装置、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质上实施的计算机程序产品的形式。
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。
具体的,本申请一实施例中还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行本申请实施例提供的方法。
本申请一实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序,当其在计算机上运行时,使得计算机执行本申请实施例提供的方法。
本申请中的实施例描述是参照根据本申请实施例的方法、设备(装置)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方 框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
还需要说明的是,本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a和b,a和c,b和c或a和b和c,其中a,b,c可以是单个,也可以是多个。
本申请实施例中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本申请中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本领域普通技术人员可以意识到,本申请实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置、 装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请公开的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。

Claims (16)

  1. 一种处理消息的方法,其特征在于,所述方法应用于终端设备,所述方法包括:
    接收第一消息;
    在所述第一消息为重组消息的情况下,拉起第一应用,由所述第一应用对所述第一消息进行消息重组,包括:
    所述第一应用读取消息重组配置信息,其中:所述消息重组配置信息为,由第二应用针对所述第一应用所配置的信息;所述第二应用可实现的操作至少包括消息重组操作;所述消息重组配置信息用于支持所述第一应用实现所述消息重组操作;
    所述第一应用,基于所述消息重组配置信息,对所述第一消息执行所述消息重组操作,生成第二消息。
  2. 根据权利要求1所述的方法,其特征在于,所述第一应用为可信应用。
  3. 根据权利要求2所述的方法,其特征在于,所述消息重组配置信息保存在所述第一应用的可信凭据中。
  4. 根据权利要求1所述的方法,其特征在于,所述消息重组配置信息包括消息重组代码以及初始化参数;
    所述所述第一应用,基于所述消息重组配置信息,对所述第一消息执行所述消息重组操作,生成第二消息,包括:
    所述第一应用,基于所述初始化参数,针对所述第一消息执行所述消息重组代码,生成所述第二消息。
  5. 根据权利要求1所述的方法,其特征在于,所述接收第一消息之前,所述方法还包括:
    所述第二应用调用所述第一应用,设置所述消息重组配置信息。
  6. 根据权利要求1所述的方法,其特征在于,所述接收第一消息之前,所述方法还包括,从云端获取所述第一应用允许访问的资源和接口范围;
    所述所述第一应用,基于所述消息重组配置信息,对所述第一消息执行所述消息重组操作,生成第二消息,包括:
    所述第一应用在所述第一应用允许访问的资源和接口范围的限制下,基于所述消息重组配置信息,对所述第一消息执行所述消息重组操作,生成所述第二消息。
  7. 根据权利要求6所述的方法,其特征在于,所述从云端获取所述第一应用允许访问的资源和接口范围,包括,由推送代理从云端获取所述第一应用允许访问的资源和接口范围。
  8. 根据权利要求1-6中任一项所述的方法,其特征在于,所述方法还包括:
    输出所述第二消息进行展示。
  9. 根据权利要求8所述的方法,其特征在于,所述输出所述第二消息进行展示,包括:
    所述第一应用输出所述第二消息到推送代理;
    所述推送代理输出所述第二消息到通知管理进行消息展示。
  10. 根据权利要求8所述的方法,其特征在于,所述方法还包括:
    在所述第一应用执行所述消息重组操作出现异常的情况下,阻止所述第二消息的 展示。
  11. 根据权利要求1所述的方法,其特征在于:
    所述接收第一消息,包括,推送代理接收所述第一消息;
    所述在所述第一消息为重组消息的情况下,调用第一应用对所述第一消息进行消息重组,包括:所述推送代理判断所述第一消息为重组消息的情况下,所述推送代理拉起所述第一应用;所述第一应用对所述第一消息进行消息重组。
  12. 根据权利要求11所述的方法,其特征在于,所述接收第一消息之前,所述方法还包括:
    所述第二应用向所述推送代理申请推送令牌;
    所述推送代理接收到所述第二应用的申请后,设置允许所述第二应用调用所述第一应用,并且,所述推送代理向所述第二应用返回所述推送令牌;
    所述第二应用获取所述推送令牌后,所述第二应用调用所述第一应用,设置针对所述第一应用的所述消息重组配置信息;
    所述第一应用保存所述消息重组配置信息。
  13. 根据权利要求1所述的方法,其特征在于,所述第一消息为端对端加密信息;
    在所述第一应用对所述第一消息执行所述消息重组操作的过程中,所述第一应用调用加解密接口对所述第一消息进行解密。
  14. 一种处理消息的装置,其特征在于,所述装置应用于终端设备,所述装置包括:
    接收模块,其用于接收第一消息;
    消息重组模块,其用于在所述第一消息为重组消息的情况下,拉起第一应用模块;
    第一应用模块,其用于:
    读取消息重组配置信息,其中:所述消息重组配置信息为,由第二应用模块针对所述第一应用模块所配置的信息;所述第二应用模块可实现的操作至少包括消息重组操作;所述消息重组配置信息用于支持所述第一应用模块实现所述消息重组操作;
    基于所述消息重组配置信息,对所述第一消息执行所述消息重组操作,生成第二消息。
  15. 一种电子设备,其特征在于,所述电子设备包括用于存储计算机程序指令的存储器和用于执行计算机程序指令的处理器,其中,当所述计算机程序指令被该处理器执行时,触发所述电子设备执行如权利要求1-13中任一项所述的方法步骤。
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如权利要求1-13中任一项所述的方法。
PCT/CN2023/088670 2022-08-22 2023-04-17 一种处理消息的方法、装置和电子设备 WO2024040992A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202211008092 2022-08-22
CN202211008092.9 2022-08-22
CN202310129070.6A CN117609986A (zh) 2022-08-22 2023-02-07 一种处理消息的方法和电子设备
CN202310129070.6 2023-02-07

Publications (1)

Publication Number Publication Date
WO2024040992A1 true WO2024040992A1 (zh) 2024-02-29

Family

ID=89952137

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/088670 WO2024040992A1 (zh) 2022-08-22 2023-04-17 一种处理消息的方法、装置和电子设备

Country Status (2)

Country Link
CN (1) CN117609986A (zh)
WO (1) WO2024040992A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170359285A1 (en) * 2016-06-12 2017-12-14 Apple Inc. Conversion of detected url in text message
WO2018082465A1 (zh) * 2016-11-02 2018-05-11 北京金山安全软件有限公司 一种通知栏消息的显示方法、装置、移动终端及服务器
CN110392155A (zh) * 2018-04-16 2019-10-29 阿里巴巴集团控股有限公司 通知消息的显示、处理方法、装置及设备
CN113360238A (zh) * 2021-06-29 2021-09-07 维沃移动通信有限公司 消息处理方法、装置、电子设备和存储介质
CN114584613A (zh) * 2020-11-28 2022-06-03 华为技术有限公司 一种推送消息的方法、消息推送系统及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170359285A1 (en) * 2016-06-12 2017-12-14 Apple Inc. Conversion of detected url in text message
WO2018082465A1 (zh) * 2016-11-02 2018-05-11 北京金山安全软件有限公司 一种通知栏消息的显示方法、装置、移动终端及服务器
CN110392155A (zh) * 2018-04-16 2019-10-29 阿里巴巴集团控股有限公司 通知消息的显示、处理方法、装置及设备
CN114584613A (zh) * 2020-11-28 2022-06-03 华为技术有限公司 一种推送消息的方法、消息推送系统及电子设备
CN113360238A (zh) * 2021-06-29 2021-09-07 维沃移动通信有限公司 消息处理方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN117609986A (zh) 2024-02-27

Similar Documents

Publication Publication Date Title
TWI672648B (zh) 業務處理方法、裝置、資料共享系統及儲存介質
CN111382168B (zh) 在联盟链网络中创建节点组、基于节点组的交易方法
KR20200027500A (ko) 디바이스 익명성을 제공하는 키 증명문 생성
CN110324363B (zh) 互联网电商关联数据的上链方法及其装置
WO2020238248A1 (zh) 一种数据存储方法、装置及设备
TW201914354A (zh) 智能設備的綁定方法、裝置和系統、通訊系統
JP7412594B2 (ja) データ処理方法、データ処理装置、コンピュータ機器、及びコンピュータプログラム
CN109154968B (zh) 用于组织内的安全且高效的通信的系统和方法
US8886933B1 (en) Streamlined provisioning and configuration of computing devices
CN112559928B (zh) 基于混合开发的页面处理方法、装置、电子设备及存储介质
CN112653670A (zh) 业务逻辑漏洞检测方法、装置、存储介质以及终端
KR20140068935A (ko) 프로세스별 네트워킹 기능 관리 기법
WO2022161182A1 (zh) 基于数据流的可信计算的方法及装置
CN105094791A (zh) 状态栏通知的存储方法及装置
CN107329916A (zh) 一种usb设备控制方法、装置及计算设备
CN108564363B (zh) 一种交易处理方法、服务器、客户端及系统
CN107704241B (zh) 一种页面状态切换的显示方法和装置
CN113127844A (zh) 一种变量访问方法、装置、系统、设备和介质
WO2024040992A1 (zh) 一种处理消息的方法、装置和电子设备
CN108985109B (zh) 一种数据存储方法及装置
CN111506895A (zh) 一种应用登录图的构建方法及装置
CN110717128A (zh) 一种应用内网页的处理方法、装置、终端及存储介质
WO2019134278A1 (zh) 聊天加密方法、聊天解密方法、装置、电子终端及可读存储介质
KR20200048676A (ko) 블록체인 기반 데이터 관리 방법, 장치 및 그 시스템
CN110351389B (zh) 用户社区关联数据的上链方法及其装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23856087

Country of ref document: EP

Kind code of ref document: A1