WO2023151498A1 - 一种消息执行处理方法、装置、电子设备和存储介质 - Google Patents

一种消息执行处理方法、装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2023151498A1
WO2023151498A1 PCT/CN2023/074150 CN2023074150W WO2023151498A1 WO 2023151498 A1 WO2023151498 A1 WO 2023151498A1 CN 2023074150 W CN2023074150 W CN 2023074150W WO 2023151498 A1 WO2023151498 A1 WO 2023151498A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
executed
target
execution
preset
Prior art date
Application number
PCT/CN2023/074150
Other languages
English (en)
French (fr)
Inventor
张航志
Original Assignee
深圳Tcl新技术有限公司
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 深圳Tcl新技术有限公司 filed Critical 深圳Tcl新技术有限公司
Publication of WO2023151498A1 publication Critical patent/WO2023151498A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Definitions

  • the present application relates to the technical field of communication, and in particular to a message execution processing method, device, electronic equipment and storage medium.
  • the embodiment of the present application proposes a message execution processing method, device, electronic device and storage medium, which can solve the problem of message lag, thereby improving the efficiency of message execution processing.
  • the embodiment of the present application provides a message execution processing method, including:
  • the embodiment of the present application also provides a message execution processing device, including:
  • An acquisition unit configured to acquire at least one message to be executed in the message queue
  • a detection unit configured to detect the at least one message to be executed based on a preset type flag, and obtain a detection result
  • An identifying unit configured to identify, among the at least one message to be executed, a target message to be executed with the preset type flag based on the detection result
  • An updating unit configured to update the execution location information of the target message to be executed in the message queue, and obtain the updated message to be executed.
  • the detection unit may include:
  • the parsing subunit is configured to parse the message to be executed to obtain a message structure of the message to be executed, and the message structure includes a plurality of structural parameters;
  • a matching subunit configured to match the preset type flag and the structural parameters to obtain a matching result
  • a generating subunit configured to generate the detection result according to the matching result.
  • the updating unit may include:
  • An information determination subunit configured to determine the target update bit of the target to-be-executed message based on the execution location information setting information
  • a message determining subunit configured to determine an associated to-be-executed message associated with the target update location information
  • An information adjustment subunit configured to adjust the execution location information of the associated message to be executed
  • the information update subunit is configured to update the execution location information of the target to-be-executed message to the target update location information, and obtain the updated to-be-executed message.
  • the detection unit may include:
  • the at least one message to be executed is detected to obtain a detection result.
  • the identification unit may include:
  • a target to-be-executed drawing message with the preset drawing type flag is identified in the at least one to-be-executed message.
  • the updating unit may include:
  • the message execution processing device proposed in the embodiment of the present application may further include:
  • the calling unit is used to call the message to be executed after the main thread executes the update.
  • the message execution processing device may further include:
  • a message identifying unit configured to identify the generated message to obtain the type of the generated message
  • An identification unit configured to, when the type of the generated message is a preset target type, perform identification processing for the generated message to obtain a marked message
  • An adding unit configured to add the marked message to the message queue.
  • the identification unit may include:
  • a message identification subunit configured to identify the generated message when the type of the generated message is a preset target type, and obtain a message structure of the generated message
  • the field adding subunit is used to add a preset type identification field to the message structure of the generated message to obtain an initial identification message
  • the activating subunit is configured to activate and set the preset type identification field of the initial identification message to obtain the marked message.
  • the embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the present application
  • the message execution processing method provided by any one of the embodiments.
  • an embodiment of the present application further provides a storage medium, the storage medium stores a computer program, and when the computer program is executed by a processor, the message execution processing method provided in any one of the embodiments of the present application is implemented.
  • the embodiment of the present application can acquire at least one message to be executed in the message queue; based on the preset type flag, detect at least one message to be executed to obtain the detection result; Set the target message to be executed marked with the type; update the execution location information of the target message to be executed in the message queue, and obtain the updated message to be executed, which improves the efficiency of message execution.
  • FIG. 1 is a schematic diagram of a scenario of a message execution processing method provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a message execution processing method provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of a message queue of a message execution processing method provided by an embodiment of the present application
  • Fig. 4 is another schematic flowchart of the message execution processing method provided by the embodiment of the present application.
  • Fig. 5 is another schematic flowchart of the message execution processing method provided by the embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a message execution processing device provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the embodiment of the present application proposes a message execution processing method.
  • the message execution processing method may be executed by a message execution processing device, and the message execution processing device may be integrated in an electronic device.
  • the electronic device may include at least one of a terminal, a server, and the like. That is, the message execution processing method can be executed by the terminal or by the server.
  • the terminal may include a personal computer, a tablet computer, a smart TV, a smart phone, a smart home, a wearable electronic device, a VR/AR device, a vehicle-mounted computer, and the like.
  • the server can be an intercommunication server or background server among multiple heterogeneous systems, it can also be an independent physical server, it can also be a server cluster or a distributed system composed of multiple physical servers, and it can also provide cloud services, Cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms.
  • the message execution processing apparatus may be integrated on an electronic device such as a terminal or a server, so as to implement the message execution processing method proposed in the embodiment of the present application.
  • the electronic device can acquire at least one message to be executed in the message queue; based on the preset type flag, detect at least one message to be executed to obtain a detection result; The target message to be executed marked with the preset type; the execution location information of the target message to be executed in the message queue is updated, and the updated message to be executed is obtained.
  • the embodiment of the present application will describe the message execution processing method proposed in the embodiment of the present application from the perspective of integrating the message execution processing apparatus in the electronic device.
  • a message execution processing method As shown in Figure 2, a message execution processing method is provided, and the specific process includes:
  • the operating system when a user clicks a certain control of an application in an electronic device, the operating system will receive a message. For another example, when the user turns on the electronic device, the operating system will also receive the message. For another example, when the user moves the mouse connected to the electronic device, the operating system will also receive a message, and so on.
  • the electronic device may generate various types of messages. For example, an electronic device may generate draw messages, input-output messages, store messages, and so on.
  • the electronic device among the messages generated by the electronic device, there are often some messages that are easily perceived by the user and have a high degree of urgency for execution. For example, drawing messages, etc.
  • the drawing message may refer to an interface design (User Interface Design, UI) memory that causes the electronic device to display In the news of change.
  • the electronic device is a smart TV, and when the user controls the smart TV through a remote control to change the interface of the smart TV, the operating system will receive a drawing message.
  • the electronic device is a smart phone, when the user clicks on an application program in the smart phone, resulting in a change of the UE interface of the smart phone, the operating system will receive a drawing message.
  • the operating system may include computer programs for managing computer hardware and software resources.
  • an operating system needs to handle basic tasks such as managing and configuring memory, prioritizing the supply and demand of system resources, controlling input and output devices, operating networks, and managing file systems.
  • the operating system also provides an interface for the user to interact with the system.
  • the operating system may include Linux system, iOS system, Android and so on.
  • the message mechanism of the operating system generally includes a message queue, a message processor, a message, a message loop (Looper) and a thread.
  • the Looper will be started when the thread starts, and the main responsibility of the Looper is to circularly retrieve the messages in the Message Queue (Message Queue) and execute the messages.
  • the thread When the message queue has no messages to execute, the thread will sleep.
  • the thread When there is a message that needs to be executed, the thread is awakened and the Looper starts to retrieve the message and execute the message.
  • Each message can send a message to the message queue through the message handler (Handler) during the execution process or the running process of other threads.
  • the messages generated by the electronic device are generally stored in the message queue, so as to wait for the main thread to read the message from the message queue and execute the event corresponding to the message.
  • the messages to be executed may include messages stored in a message queue and waiting to be executed.
  • the existing technology when there are messages to be executed in the message queue that are easily perceived by the user and have high urgency for execution, the existing technology often increases the priority of the message in the main thread to reduce the Message delay.
  • the prior art does not fundamentally solve the problem of message lag.
  • the message execution processing device will first obtain at least one message to be executed in the message queue, then detect the message to be executed that is easily perceived by the user, and update the position of the message to be executed in the message queue, thereby improving the waiting time.
  • the execution priority of the execution message avoids the problem of delay of the message to be executed and improves the efficiency of message execution.
  • the message execution processing device may detect at least one message to be executed, so as to determine whether there is a message easily perceived by the user in the message to be executed.
  • the message execution processing device may detect at least one message to be executed based on a preset type flag, and obtain a detection result.
  • the preset type flag may be preset, and it is a basis for detecting whether there is a message easily perceived by the user in the message to be executed.
  • the preset type flag may be set as the preset drawing type flag. Then, it is possible to detect whether there is a drawing message in the messages to be executed through the preset drawing type flag.
  • the message execution processing means may perform identification processing for the message that is easily perceived by the user, so that the message that is easily perceived by the user has a type mark. Then, at the stage of message execution, the message execution processing device may detect at least one message to be executed based on the preset type flag, and obtain a detection result.
  • the detection result may indicate whether there is a message easily perceived by the user in the message to be executed.
  • the result to be detected has various expression forms.
  • the expression form of the result to be detected may be True or False. Wherein, True may indicate that there is a message easily perceived by the user in the message to be executed, and False may indicate that there is no message easily perceived by the user in the message to be executed.
  • the expression form of the result to be detected may be 1 or 0. Wherein, 1 may indicate that there is a message easily perceived by the user in the message to be executed, and 0 may indicate that there is no message easily perceived by the user in the message to be executed.
  • a detection result may also be generated for each message to be executed. For example, assuming that there are 10 messages to be executed in the message queue, 10 results to be detected may be generated, and each result to be detected corresponds to a message to be executed.
  • a target to-be-executed message with a preset type flag may be identified in at least one to-be-executed message based on the detection result.
  • target to-be-executed message may include a message easily perceived by the user.
  • target pending messages may include paint messages, and so on.
  • the message execution processing device may determine the message easily perceived by the user in the message queue as the target message to be executed.
  • the message execution processing device can update the target message to be executed in the message queue Execution location information in , get update pending execution message. By updating the execution location information of the target to-be-executed message in the message queue, the target to-be-executed message can be quickly executed without causing a lag problem.
  • the message queue includes four messages to be executed, which are message 1 to be executed, message 2 to be executed, message 3 to be executed and message 4 to be executed.
  • the position of the to-be-executed message 4 in the message queue can be adjusted.
  • the position of message 4 to be executed is adjusted to the head of the message queue, so that the main thread can directly read message 4 to be executed without traversing the message queue, thereby reducing the time for traversing the message queue , which improves the execution efficiency of messages that are easily perceived by users.
  • the embodiment of the present application proposes a message execution processing method, the method includes: obtaining at least one message to be executed in the message queue; based on a preset type flag, detecting at least one message to be executed to obtain a detection result; based on the detection result , identifying a target to-be-executed message with a preset type flag in at least one to-be-executed message; updating the execution position information of the target to-be-executed message in the message queue to obtain the updated to-be-executed message.
  • the updated message to be executed can be quickly executed by the main thread.
  • the embodiment of the present application does not require the main thread to traverse the message queue, so as to extract the target message to be executed for execution. Therefore, compared with the prior art, the embodiment of the present application can reduce the time for the main thread to traverse the message queue, thereby improving the efficiency of the main thread for executing messages that are easily perceived by the user.
  • the method in the embodiment of the present application will be introduced by taking the integration of the message execution processing method on the terminal as an example.
  • the flow of the message execution processing method proposed in the embodiment of the present application may include:
  • the terminal acquires at least one message to be executed in the message queue.
  • the terminal generally relies on the operating system to implement various functions, and the operation of the operating system is generally inseparable from the message mechanism. Everything that happens in the operating system can be identified by a message, and the message is used to tell the operating system what happened, and the applications in the operating system are generally message-driven.
  • the message mechanism of the operating system generally includes a message queue, a message processor, a message, a message loop (Looper) and a thread.
  • the Looper will be started when the thread starts, and the main responsibility of the Looper is to circularly retrieve the messages in the Message Queue (Message Queue) and execute the messages.
  • the thread When the message queue has no messages to execute, the thread will sleep.
  • the thread When there is a message that needs to be executed, the thread is awakened and the Looper starts to retrieve the message and execute the message.
  • Each message can send a message to the message queue through the message handler (Handler) during the execution process or the running process of other threads.
  • the message generated by the terminal can be stored in the message queue, so as to wait for the main thread to read the message from the message queue and execute the event corresponding to the message.
  • the terminal can obtain at least one message to be executed in the message queue ; Based on the preset type tag, at least one message to be executed is detected to obtain a detection result; based on the detection result, a target message to be executed with a preset type tag is identified in at least one message to be executed; the target message to be executed is updated in Execution location information in the message queue, message to be executed after being updated.
  • the terminal may identify the message that is easily perceived by the user when the message is generated. Specifically, before the step "the terminal acquires at least one message to be executed in the message queue", it includes:
  • generating a message may refer to a message generated by a terminal.
  • the operating system may acquire the generated message, identify the generated message, and obtain the type of the generated message.
  • the generated message may be identified, so as to determine whether the generated message is a drawing message, an input message, or an output message, and so on.
  • the type of the generated message may be discriminated, so as to determine whether the type of the generated message is a preset target type.
  • the preset target type may include a message type easily perceived by the user.
  • preset target types may include drawing message types, and so on.
  • the type of the generated message can be matched with the preset target type. If they match, it means that the type of the generated message is the preset target type, otherwise it is not.
  • the terminal in order to enable the terminal to correctly detect the target message to be executed in the message queue to be executed, when the type of the generated message is the preset target type, it can perform identification processing for the generated message to obtain the tag Post message.
  • an ID can be added directly in the build message.
  • At least one message to be executed can be detected based on a preset type flag by modifying the field of the generated message, and a detection result can be obtained.
  • the step "when the type of the generated message is the preset target type, perform identification processing for the generated message to obtain a marked message" including:
  • the type of the generated message is the preset target type, identify the generated message, and obtain the message structure of the generated message;
  • the preset type identification field of the initial identification message is activated to obtain the marked message.
  • each message is composed of a message structure.
  • the message structure may include content constituting the message.
  • the message structure may include the type of the message, the function of the message, the attributes of the message, and so on.
  • a preset type identification field may be added to the message structure of the generated message, so that the generated message carries the type identification.
  • the preset type identification field may be a preset field added to the generated message. Adding a preset type identification field to the message structure of the generated message may be equivalent to increasing the priority of the generated message. Therefore, after the marked message with the preset type identification field enters the message queue, the execution position information of the to-be-executed information with the preset type identification field in the message can be updated, thereby improving the execution efficiency of the user-perceivable message.
  • the message structure that generates the message originally includes: what, arg1, and arg2.
  • a vsync field can be added to the message structure of the generated message to obtain the initial identification message.
  • the preset identification field of the initial identification message may be activated and set to obtain the marked message.
  • activating the preset identification field in the initial identification message may instruct the preset identification field in the initial identification information to take effect.
  • the operating system can send a global update command to update the message structure of the message renew. Then, the message structure of the initial identification information will be updated, and the preset identification field of the initial identification information will take effect.
  • the marked message may be added to the message queue. After the marked message enters the message queue, the marked message will become a message to be executed.
  • the terminal detects at least one message to be executed based on the preset type flag, and obtains a detection result.
  • the terminal may detect at least one message to be executed in the message queue based on the preset type flag, and obtain a detection result.
  • the step of "detecting at least one message to be executed based on a preset type flag, and obtaining a detection result" may include:
  • the detection result is generated according to the matching result.
  • the message to be executed in the message queue may be parsed first to obtain a message structure of the message to be executed, wherein the message structure includes a plurality of structural parameters.
  • these structural parameters may refer to the content of the message structure.
  • the preset type tag can be matched with the structure parameter to obtain a matching result.
  • the preset type flag could be vsync. Then, it may be determined whether there is a target message to be executed in at least one message to be executed in the message queue by matching the preset type flag with the structure parameter.
  • the preset type mark may be a preset drawing type mark. At this time, at least one message to be executed may be detected based on the preset drawing type flag, and a detection result may be obtained.
  • the generated message whose type is a drawing message may be identified.
  • a vsync field can be added to the drawing message, thereby increasing the priority of the drawing message in the message queue.
  • the terminal Based on the detection result, the terminal identifies a target to-be-executed message with a preset type flag in at least one to-be-executed message.
  • the terminal may identify a target to-be-executed message with a preset type flag in at least one to-be-executed message.
  • target to-be-executed message may include a message easily perceived by the user.
  • target pending messages may include paint messages, and so on.
  • the message execution processing device may determine the message easily perceived by the user in the message queue as the target message to be executed.
  • the target to be executed message when the type of message that is easily perceived by the user is a drawing message, the target to be executed message may be a target to be executed drawing message.
  • the step of "identifying the target message to be executed with a preset type flag in at least one message to be executed based on the detection result" may include:
  • a target pending drawing message with a preset drawing type flag is identified in at least one pending message.
  • the terminal updates the execution position information of the target to-be-executed message in the message queue, and obtains the updated to-be-executed message.
  • the terminal may update the execution location information of the target to-be-executed message in the message queue, and obtain the updated to-be-executed message.
  • the terminal may update the position of the target message to be executed to the head of the message queue.
  • the step of "updating the execution location information of the target message to be executed in the message queue, and obtaining the updated message to be executed" includes:
  • the execution location information of the target message to be executed is updated to the target update location information, and the updated message to be executed is obtained.
  • the target update location information may refer to the location of the target message to be executed in the message queue after the location of the target message to be executed is updated.
  • the target message to be executed can be determined as the head of the message queue. Therefore, the main thread generally executes the message to be executed at the head of the message queue first. Therefore, determining the target message to be executed as the head of the message queue can ensure that the target message to be executed can be executed immediately.
  • the execution locations of other messages to be executed may be affected, and the associated messages to be executed may include messages to be executed whose execution locations will be affected.
  • the message queue includes four messages to be executed, which are message 1 to be executed, message 2 to be executed, message 3 to be executed and message 4 to be executed.
  • the position of the to-be-executed message 4 in the message queue can be adjusted.
  • the position of the message 4 to be executed is adjusted to the head of the message queue, so that the main thread can directly read the message 4 to be executed without traversing the message queue.
  • the pending message queue 4 if it is adjusted to the head of the message queue, it will affect the execution positions of the pending message 1, the pending message 2 and the pending message 3. At this time, the associated pending message may include the pending message 1. To-be-executed message 2 and to-be-executed message 3.
  • the associated message to be executed may be affected. Therefore, the execution location information of the associated message to be executed may be adjusted first, and then the execution location information of the target message to be executed is updated to the target updated location information to obtain the updated message to be executed.
  • the target to-be-executed message may also be directly inserted into the head of the message queue, so as to update the execution position information of the target to-be-executed message in the message queue, and obtain the updated to-be-executed message.
  • the execution position information of the target to-be-executed message in the message queue before updating the execution position information of the target to-be-executed message in the message queue, it may be determined whether the execution position of the target to-be-executed message in the message queue is at the target update position. Wherein, if the execution position of the target to-be-executed message in the message queue is at the target update position, it is not necessary to update the execution position information of the target to-be-executed message in the message queue; Execution location information in .
  • the target to be executed message may be a target to be executed drawing message.
  • the step "update the execution position information of the target message to be executed in the message queue, and obtain the updated message to be executed" includes:
  • the main thread may be called to execute the message to be executed after update.
  • the method proposed in the embodiment of the present application also includes:
  • the main thread can immediately obtain the message to be executed after the update without traversing the message queue, thereby improving the problem of message execution delay that is easily perceived by the user.
  • the execution efficiency of user-friendly messages is improved.
  • FIG. 5 it is a schematic flowchart of the method proposed in the embodiment of the present application.
  • the message execution processing method can be divided into two phases, which are message generation phase 001 and message execution phase 002 .
  • the generated message in the message generation phase, can be identified to obtain the type of the generated message; when the generated message When the type is the preset target type, identify the generated message to obtain the marked message; add the marked message to the message queue.
  • Chorecgrapher is a message processor that can call back the method proposed in the embodiment of the present application.
  • onVsync may refer to judging whether the type of the generated message is a preset target type.
  • Message.setVsync(True) can mean that when the type of the generated message is the preset target type, add a preset type identification field to the message structure of the generated message, obtain the initial identification message, and identify the default type of the initial identification message The field is activated and the post-mark message is obtained.
  • the marked message can then be added to the message queue (enqueueMessage).
  • At least one message to be executed may be detected based on a preset type flag, and a detection result may be obtained.
  • the judgment block 003 in FIG. 5 is detecting at least one message to be executed, and obtaining a detection result.
  • a target to-be-executed message with a preset type flag can be identified from at least one to-be-executed message.
  • message to be executed (msg) 104 may be a target message to be executed. Then, the target message to be executed can be put at the head of the message queue.
  • the main thread obtains messages from the message queue in the next message cycle, and when it starts to traverse the message queue, if the head of the message queue is a target message to be executed (for example, a drawing message), it is directly taken out and executed.
  • a target message to be executed for example, a drawing message
  • the embodiment of the present application proposes a message execution processing method, the method includes: obtaining at least one message to be executed in the message queue; based on a preset type flag, detecting at least one message to be executed to obtain a detection result; based on the detection result , identifying a target to-be-executed message with a preset type flag in at least one to-be-executed message; updating the execution position information of the target to-be-executed message in the message queue to obtain the updated to-be-executed message.
  • the updated message to be executed can be quickly executed by the main thread.
  • the embodiment of the present application does not require the main thread to traverse the message queue, so as to extract the target message to be executed for execution. Therefore, compared with the prior art, the embodiment of the present application can reduce the time for the main thread to traverse the message queue, thereby improving the efficiency of the main thread for executing messages that are easily perceived by the user.
  • messages can be identified, message queues can be optimized to manage messages easily perceived by users, and message strategies for messages easily perceived by users can be added to reduce the number of messages easily perceived by users on the whole. Latency issue.
  • an embodiment further provides a message execution processing device, and the message execution processing device may be integrated into an electronic device.
  • the meaning of the nouns is the same as the above message
  • the execution processing method is the same, and for specific implementation details, please refer to the description in the method embodiment.
  • a message execution processing device is provided, and the message execution processing device may be integrated in an electronic device.
  • the message execution processing device includes: an acquisition unit 301, a detection unit 302, an identification unit 303 and updating unit 304, specifically as follows:
  • An acquisition unit 301 configured to acquire at least one message to be executed in the message queue
  • a detection unit 302 configured to detect the at least one message to be executed based on a preset type flag, and obtain a detection result
  • An identifying unit 303 configured to, based on the detection result, identify a target message to be executed with the preset type flag in the at least one message to be executed;
  • the updating unit 304 is configured to update the execution location information of the target message to be executed in the message queue, and obtain the updated message to be executed.
  • the detection unit 302 may include:
  • the parsing subunit is configured to parse the message to be executed to obtain a message structure of the message to be executed, and the message structure includes a plurality of structural parameters;
  • a matching subunit configured to match the preset type flag and the structural parameters to obtain a matching result
  • a generating subunit configured to generate the detection result according to the matching result.
  • the update unit 304 may include:
  • An information determining subunit configured to determine target update location information of the target message to be executed based on the execution location information
  • a message determining subunit configured to determine an associated to-be-executed message associated with the target update location information
  • An information adjustment subunit configured to adjust the execution location information of the associated message to be executed
  • the information update subunit is configured to update the execution location information of the target to-be-executed message to the target update location information, and obtain the updated to-be-executed message.
  • the detection unit may include:
  • the at least one message to be executed is detected to obtain a detection result.
  • the identification unit may include:
  • a target to-be-executed drawing message with the preset drawing type flag is identified in the at least one to-be-executed message.
  • the updating unit may include:
  • the message execution processing device proposed in the embodiment of the present application may further include:
  • the calling unit is used to call the message to be executed after the main thread executes the update.
  • the message execution processing device may further include:
  • a message identifying unit configured to identify the generated message to obtain the type of the generated message
  • An identification unit configured to, when the type of the generated message is a preset target type, perform identification processing for the generated message to obtain a marked message
  • An adding unit configured to add the marked message to the message queue.
  • the identification unit may include:
  • a message identification subunit configured to identify the generated message when the type of the generated message is a preset target type, and obtain a message structure of the generated message
  • the field adding subunit is used to add a preset type identification field to the message structure of the generated message to obtain an initial identification message
  • An activating subunit configured to activate and set the preset type identification field of the initial identification message, to obtain the Postscript.
  • each of the above units may be implemented as an independent entity, or may be combined arbitrarily as the same or several entities.
  • the specific implementation of each of the above units may refer to the previous method embodiments, and will not be repeated here.
  • the reliability of message execution processing can be improved by the above message execution processing device.
  • the embodiment of the present application also provides an electronic device, which may include a terminal or a server; for example, the electronic device may be a server, such as a message execution processing server.
  • the electronic device may be a server, such as a message execution processing server.
  • Figure 7 it shows a schematic structural diagram of a terminal involved in the embodiment of the present application, specifically:
  • the electronic device may include a processor 401 of one or more processing cores, a memory 402 of one or more computer-readable storage media, a power supply 403, an input unit 404 and other components.
  • a processor 401 of one or more processing cores may include a processor 401 of one or more processing cores, a memory 402 of one or more computer-readable storage media, a power supply 403, an input unit 404 and other components.
  • FIG. 7 does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine some components, or arrange different components. in:
  • the processor 401 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device, by running or executing software programs and/or modules stored in the memory 402, and calling the Data, perform various functions of electronic equipment and process data, so as to monitor electronic equipment as a whole.
  • the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user pages and application programs, etc. , the modem processor mainly handles wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 401 .
  • the memory 402 can be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402 .
  • the memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); Data created by the use of computer equipment, etc.
  • the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
  • the memory 402 may further include a memory controller to provide the processor 401 with access to the memory 402 .
  • the electronic device also includes a power supply 403 for supplying power to various components.
  • the power supply 403 can be logically connected to the processor 401 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system.
  • the power supply 403 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
  • the electronic device can also include an input unit 404, which can be used to receive input numbers or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • an input unit 404 which can be used to receive input numbers or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • the electronic device may also include a display unit, etc., which will not be repeated here.
  • the processor 401 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the executable file stored in the The application program in memory 402, thus realizes various functions, as follows:
  • a computer program application or computer program comprising computer instructions stored in a computer readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementation manners in the foregoing embodiments.
  • the embodiment of the present application further provides a storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any one of the message execution processing methods provided in the embodiments of the present application.
  • the computer program can perform the following steps:
  • the computer program stored in the storage medium can execute the steps in any one of the message execution processing methods provided in the embodiments of the present application, and therefore, can realize any of the message execution processing methods provided in the embodiments of the present application.
  • the beneficial effects that can be achieved see the previous embodiments for details, and will not be repeated here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种消息执行处理方法、装置、电子设备和存储介质;本申请可以获取消息队列中待执行消息;基于预设类型标记,对待执行消息进行检测,得到检测结果;基于检测结果,在待执行消息中识别出具有预设类型标记的目标待执行消息;更新目标待执行消息在消息队列中的执行位置信息,得到更新后待执行消息,提高了消息执行的效率。

Description

一种消息执行处理方法、装置、电子设备和存储介质
本申请要求申请日为2022年02月11日、申请号为202210127687.X、发明名称为“一种消息执行处理方法、装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通讯技术领域,具体涉及一种消息执行处理方法、装置、电子设备和存储介质。
背景技术
目前的电子设备一般都是依赖于操作***实现各种功能的,而操作***的运行一般离不开消息机制,消息机制驱动着***各种业务流程的执行。例如,电子设备中应用程序的运行,***服务的运行等等,都是消息机制驱动的。而电子设备生成的各种事件中,往往存在着一些用户易感知,执行迫切度较高的事件,此时,便需要提高这些事件对应的消息的执行优先级。而在现有技术中,往往是通过提高消息在主线程的优先级,从而提高事件的优先级。而提高消息在主线程的优先级时,***会分配更多的资源给主线程,从而减少消息的延迟,但并没有从根本上解决消息滞后的问题。
技术问题
操作***中存在消息滞后的问题。
技术解决方案
本申请实施例提出了一种消息执行处理方法、装置、电子设备和存储介质,可以解决消息滞后的问题,从而提高消息执行处理的效率。
本申请实施例提供了一种消息执行处理方法,包括:
获取消息队列中的至少一个待执行消息;
基于预设类型标记,对所述至少一个待执行消息进行检测,得到检测结果;
基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设类型标记的目标待执行消息;
更新所述目标待执行消息在所述消息队列中的执行位置信息,得到更新后待执行消息。
相应的,本申请实施例还提供了一种消息执行处理装置,包括:
获取单元,用于获取消息队列中的至少一个待执行消息;
检测单元,用于基于预设类型标记,对所述至少一个待执行消息进行检测,得到检测结果;
识别单元,用于基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设类型标记的目标待执行消息;
更新单元,用于更新所述目标待执行消息在所述消息队列中的执行位置信息,得到更新后待执行消息。
在一实施例中,所述检测单元,可以包括:
解析子单元,用于对所述待执行消息进行解析,得到所述待执行消息的消息结构体,所述消息结构体中包括多个结构参数;
匹配子单元,用于将所述预设类型标记和所述结构参数进行匹配,得到匹配结果;
生成子单元,用于根据所述匹配结果生成所述检测结果。
在一实施例中,所述更新单元,可以包括:
信息确定子单元,用于基于所述执行位置信息,确定所述目标待执行消息的目标更新位 置信息;
消息确定子单元,用于确定与所述目标更新位置信息关联的关联待执行消息;
信息调整子单元,用于调整所述关联待执行消息的执行位置信息;
信息更新子单元,用于将所述目标待执行消息的执行位置信息更新为所述目标更新位置信息,得到所述更新后待执行消息。
在一实施例中,所述检测单元,可以包括:
基于预设绘制类型标记,对所述至少一个待执行消息进行检测,得到检测结果。
在一实施例中,所述识别单元,可以包括:
基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设绘制类型标记的目标待执行绘制消息。
在一实施例中,所述更新单元,可以包括:
更新所述目标待执行绘制消息在所述消息队列中的执行位置信息,得到更新后待执行消息。
在一实施例中,本申请实施例提出的消息执行处理装置还可以包括:
调用单元,用于调用主线程执行所述更新后待执行消息。
在一实施例中,所述消息执行处理装置还可以包括:
消息识别单元,用于对生成消息进行识别,得到所述生成消息的类型;
标识单元,用于当所述生成消息的类型是预设目标类型时,为所述生成消息进行标识处理,得到标记后消息;
添加单元,用于将所述标记后消息添加到所述消息队列中。
在一实施例中,所述标识单元,可以包括:
消息识别子单元,用于当所述生成消息的类型是预设目标类型时,对所述生成消息进行识别,得到所述生成消息的消息结构体;
字段添加子单元,用于为所述生成消息的消息结构体添加预设类型标识字段,得到初始标识消息;
激活子单元,用于对所述初始标识消息的预设类型标识字段进行激活设置,得到所述标记后消息。
相应的,本申请实施例还提供一种电子设备,所述电子设备包括存储器和处理器;所述存储器存储有计算机程序,所述处理器用于运行所述存储器内的计算机程序,以执行本申请实施例任一提供的消息执行处理方法。
相应的,本申请实施例还提供一种存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现本申请实施例任一提供的消息执行处理方法。
有益效果
本申请实施例可以获取消息队列中的至少一个待执行消息;基于预设类型标记,对至少一个待执行消息进行检测,得到检测结果;基于检测结果,在至少一个待执行消息中识别出具有预设类型标记的目标待执行消息;更新目标待执行消息在消息队列中的执行位置信息,得到更新后待执行消息,提高了消息执行的效率。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的消息执行处理方法的场景示意图;
图2是本申请实施例提供的消息执行处理方法的流程示意图;
图3是本申请实施例提供的消息执行处理方法的消息队列示意图;
图4是本申请实施例提供的消息执行处理方法的又一流程示意图;
图5是本申请实施例提供的消息执行处理方法的又一流程示意图;
图6是本申请实施例提供的消息执行处理装置的结构示意图;
图7是本申请实施例提供的电子设备的结构示意图。
本发明的实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,然而,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例提出了一种消息执行处理方法,该消息执行处理方法可以由消息执行处理装置执行,该消息执行处理装置可以集成在电子设备中。其中,该电子设备可以包括终端以及服务器等中的至少一个。即该消息执行处理方法可以由终端执行,也可以由服务器执行。
其中,该终端可以包括个人电脑、平板电脑、智能电视、智能手机、智能家居、可穿戴电子设备、VR/AR设备、车载计算机等等。
其中,服务器可以为多个异构***之间的互通服务器或者后台服务器,还可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式***,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、以及大数据和人工智能平台等基础云计算服务的云服务器等等。
在一实施例中,如图1所示,消息执行处理装置可以集成在终端或服务器等电子设备上,以实施本申请实施例提出的消息执行处理方法。具体地,电子设备可以获取消息队列中的至少一个待执行消息;基于预设类型标记,对至少一个待执行消息进行检测,得到检测结果;基于检测结果,在至少一个待执行消息中识别出具有预设类型标记的目标待执行消息;更新目标待执行消息在消息队列中的执行位置信息,得到更新后待执行消息。
以下分别进行详细说明,需要说明的是,以下实施例的描述顺序不作为对实施例优选顺序的限定。
本申请实施例将从消息执行处理装置集成在电子设备的角度进行本申请实施例提出的消息执行处理方法进行描述。
如图2所示,提供了一种消息执行处理方法,具体流程包括:
101、获取消息队列中的至少一个待执行消息。
目前的电子设备一般都是依赖于操作***实现各种功能的,而操作***的运行一般离不开消息机制。在操作***中发生的一切都可以用消息来标识,消息用于告诉操作***发生了什么,操作***中的应用程序一般都是消息驱动的。
例如,当用户点击了电子设备中应用程序的某个控件时,操作***便会接收到消息。又例如,当用户开启了电子设备时,操作***也会接收到消息。又例如,当用户移动了和电子设备连接着的鼠标时,操作***也会接收到消息,等等。
在一实施例中,由于用户对电子设备会具有不同的操作,且有的电子设备会存在着自动化操作,因此,电子设备会生成各种不同类型的消息。例如,电子设备可能会生成绘制消息、输入输出消息和存储消息等等。
在一实施例中,在电子设备生成的消息中,往往存在着一些用户易感知,且执行迫切度较高的消息。例如,绘制消息,等等。
其中,绘制消息可以指会导致电子设备显示的界面设计(User Interface Design,UI)存 在变化的消息。例如,电子设备是智能电视,当用户通过遥控控制智能电视,从而使得智能电视的界面发生变化时,操作***便会接收到绘制消息。又例如,当电子设备是智能手机时,当用户点击了智能手机中的某个应用程序,从而导致智能手机UE界面的变化时,操作***便会接收到绘制消息。
其中,操作***可以包括管理计算机硬件与软件资源的计算机程序。例如,操作***需要处理如管理与配置内存、决定***资源供需的优先次序、控制输入设备与输出设备、操作网络与管理文件***等基本事务。操作***也提供一个让用户与***交互的操作界面。
例如,操作***可以包括Linux***、iOS***和Android等等。
在一实施例中,操作***的消息机制一般包括消息队列、消息处理器、消息、消息循环(Looper)和线程。其中,线程启动时会启动Looper,Looper的主要职责是循环检索消息队列(Message Queue)中的消息,并执行消息。当消息队列没有消息需要执行,线程会休眠。当有需要执行的消息,线程被唤醒Looper开始检索消息执行消息。每条消息在执行过程,或其他线程运行过程中,可通过消息处理器(Handler)向消息队列发送消息。
因此,电子设备生成的消息一般会存储到消息队列中,以等待主线程从消息队列中读取出消息,并执行消息对应的事件。
其中,待执行消息可以包括存储在消息队列中,等待被执行的消息。
在一实施例中,在现有技术中,当消息队列中的待执行消息存在用户易感知,执行迫切度较高的消息时,现有技术往往是通过提高消息在主线程的优先级,减少消息的延迟。但是,现有技术并没有从根本上解决消息滞后的问题。
而在本申请实施例中,消息执行处理装置会首先获取消息队列中至少一个待执行消息,然后检测出用户易感知的待执行消息,更新该待执行消息在消息队列中的位置,从而提高待执行消息的执行优先级,避免了待执行消息滞后的问题,提高了消息执行的效率。
102、基于预设类型标记,对至少一个待执行消息进行检测,得到检测结果。
在一实施例中,消息执行处理装置在获取到消息队列中的至少一个待执行消息之后,可以对至少一个待执行消息进行检测,从而判断待执行消息中是否具有用户易感知的消息。
其中,消息执行处理装置可以基于预设类型标记,对至少一个待执行消息进行检测,得到检测结果。
其中,预设类型标记可以是预先设置好的,检测待执行消息中是否具有用户易感知的消息的依据。
例如,当用户易感知的消息是绘制消息时,可以将预设类型标记设置为预设绘制类型标记。然后,可以通过预设绘制类型标记,检测待执行消息中是否有绘制消息。
在一实施例中,在电子设备生成消息时,消息执行处理装置可以为用户易感知的消息进行标识处理,从而使得用户易感知的消息中具有类型标记。然后,在执行消息的阶段,消息执行处理装置可以基于预设类型标记,对至少一个待执行消息进行检测,并得到检测结果。
其中,检测结果可以说明待执行消息是否存在用户易感知的消息。其中,待检测结果具有多种的表达形式。例如,待检测结果的表达形式可以为True或False。其中,True可以指待执行消息中存在用户易感知的消息,而False可以指待执行消息中不存在用户易感知的消息。又例如,待检测结果的表达形式可以为1或0。其中,1可以指待执行消息中存在用户易感知的消息,而0可以指待执行消息中不存在用户易感知的消息。
在一实施例中,还可以分别为每一个待执行消息都生成一个检测结果。例如,假设消息队列中有10个待执行消息,则可以生成10个待检测结果,每个待检测结果对应一个待执行消息。
103、基于检测结果,在至少一个待执行消息中识别出具有预设类型标记的目标待执行消息。
在一实施例中,在得到检测结果之后,可以基于检测结果,在至少一个待执行消息中识别出具有预设类型标记的目标待执行消息。
其中,目标待执行消息可以包括用户易感知的消息。例如,目标待执行消息可以包括绘制消息,等等。
在一实施例中,当检测结果中显示待执行消息中存在有用户易感知的消息时,消息执行处理装置便可以将消息队列中用户易感知的消息确定为目标待执行消息。
104、更新目标待执行消息在消息队列中的执行位置信息,得到更新后待执行消息。
在一实施例中,当检测出消息队列中存在用户易感知的消息时,为了提高目标待执行消息的优先级,并且避免消息滞后的问题,消息执行处理装置可以更新目标待执行消息在消息队列中的执行位置信息,得到更新后待执行消息。通过更新目标待执行消息在消息队列中的执行位置信息,使得目标待执行消息可以快速地被执行,而不会造成滞后的问题。
例如,如图3所示,消息队列中包括4个待执行消息,分别是待执行消息1、待执行消息2、待执行消息3和待执行消息4。
其中,检测出待执行消息4是目标待执行消息。此时,可以调整待执行消息4在消息队列中的位置。例如,将待执行消息4的位置调整到消息队列的头部,从而使得主线程可以直接读取到待执行消息4,而不需要对消息队列进行遍历,从而减少了对消息队列进行遍历的时间,提高了用户易感知的消息被执行的效率。
本申请实施例提出了一种消息执行处理方法,该方法包括:获取消息队列中的至少一个待执行消息;基于预设类型标记,对至少一个待执行消息进行检测,得到检测结果;基于检测结果,在至少一个待执行消息中识别出具有预设类型标记的目标待执行消息;更新目标待执行消息在消息队列中的执行位置信息,得到更新后待执行消息。在本申请实施例中,通过更新目标待执行消息在消息队列中的执行位置消息,可以使得更新后待执行消息可以快速地被主线程执行到。和现有技术相比,本申请实施例不需要主线程对消息队列进行遍历,从而提取出目标待执行消息进行执行。因此,和现有技术相比,本申请实施例可以减少主线程遍历消息队列的时间,从而提高了主线程执行用户易感知的消息的效率。
根据上面实施例所描述的方法,以下将举例作进一步详细说明。
本申请实施例将以消息执行处理方法集成在终端上为例来介绍本申请实施例方法。具体的,如图4所示,本申请实施例提出的消息执行处理方法的流程可以包括:
201、终端获取消息队列中的至少一个待执行消息。
在一实施例中,终端一般都是依赖于操作***实现各种功能的,而操作***的运行一般离不开消息机制。在操作***中发生的一切都可以用消息来标识,消息用于告诉操作***发生了什么,操作***中的应用程序一般都是消息驱动的。
在一实施例中,操作***的消息机制一般包括消息队列、消息处理器、消息、消息循环(Looper)和线程。其中,线程启动时会启动Looper,Looper的主要职责是循环检索消息队列(Message Queue)中的消息,并执行消息。当消息队列没有消息需要执行,线程会休眠。当有需要执行的消息,线程被唤醒Looper开始检索消息执行消息。每条消息在执行过程,或其他线程运行过程中,可通过消息处理器(Handler)向消息队列发送消息。
因此,终端生成的消息可以存储到消息队列中,以等待主线程从消息队列中读取出消息,并执行消息对应的事件。
其中,为了解决现有技术中消息之后的问题,提高用户易感知的消息的执行效率,在主线程读取出消息队列中的待执行消息之前,终端可以获取消息队列中的至少一个待执行消息;基于预设类型标记,对至少一个待执行消息进行检测,得到检测结果;基于检测结果,在至少一个待执行消息中识别出具有预设类型标记的目标待执行消息;更新目标待执行消息在消息队列中的执行位置信息,得到更新后待执行消息。
其中,为了终端可以在消息队列中的待执行消息中正确地检测出目标待执行消息,终端可以在消息生成时,对用户易感知的消息进行标识处理。具体的,在步骤“终端获取消息队列中的至少一个待执行消息”之前,包括:
对生成消息进行识别,得到生成消息的类型;
当生成消息的类型是预设目标类型时,为生成消息进行标识处理,得到标记后消息;
将标记后消息添加到消息队列中。
其中,生成消息可以指终端生成的消息。
在一实施例中,当终端生成消息时,操作***可以获取到生成的消息,并对生成消息进行识别,得到生成消息的类型。
例如,可以对生成消息进行识别,从而判断生成消息是绘制消息,还是输入消息,亦或是输出消息,等等。
在一实施例中,在得到生成消息的类型之后,可以对生成消息的类型进行判别处理,从而判断生成消息的类型是否是预设目标类型。
其中,预设目标类型可以包括用户易感知的消息类型。例如,预设目标类型可以包括绘制消息类型,等等。
其中,有多种方式可以对生成消息的类型进行判别处理。例如,可以将生成消息的类型和预设目标类型进行匹配,若匹配,则说明生成消息的类型是预设目标类型,否则这不是。
在一实施例中,为了令终端可以在消息队列中的待执行消息中正确地检测出目标待执行消息,当生成消息的类型是预设目标类型时,可以为生成消息进行标识处理,得到标记后消息。
其中,有多种方式可以对生成消息进行标识处理,得到标记后消息。
例如,可以在生成消息中直接添加一个标识。
在一实施例中,还可以通过修改生成消息的字段,从而可以基于预设类型标记,对至少一个待执行消息进行检测,得到检测结果。具体的,步骤“当生成消息的类型是预设目标类型时,为生成消息进行标识处理,得到标记后消息”,包括:
当生成消息的类型是预设目标类型时,对生成消息进行识别,得到生成消息的消息结构体;
为生成消息的消息结构体添加预设类型标识字段,得到初始标识消息;
对初始标识消息的预设类型标识字段进行激活设置,得到标记后消息。
在一实施例中,每条消息都是由消息结构体构成的。其中,消息结构体可以包括构成消息的内容。在消息结构体中具有很多消息相关的信息。例如,消息结构体可以包括消息的类型、消息的作用、消息的属性,等等。
在一实施例中,在得到生成消息的消息结构体之后,可以为生成消息的消息结构体添加预设类型标识字段,从而使得生成消息带上类型标识。
其中,预设类型标识字段可以是预先设置好的,添加到生成消息中的字段。为生成消息的消息结构添加预设类型标识字段,可以相当于提高了生成消息的优先级。因此,当具有预设类型标识字段的标记后消息进入了消息队列之后,可以更新具有预设类型标识字段的待执行信息在消息中的执行位置信息,从而提高用户易感知消息的执行效率。
例如,生成消息的消息结构体原来包括的内容有:what、arg1、arg2。当生成消息的类型是预设目标类型时,可以在生成消息的消息结构体中添加vsync字段,得到初始标识消息。
在一实施例中,在得到初始标识消息之后,可以对初始标识消息的预设标识字段进行激活设置,得到标记后消息。
其中,对初始标识消息的预设标识字段进行激活设置可以指令初始标识信息中预设标识字段进行生效。例如,操作***可以发送一条全局更新指令,从而对消息的消息结构体进行 更新。然后,初始标识信息的消息结构体便会更新,初始标识信息的预设标识字段便会生效。
在一实施例中,在得到标记后消息之后,可以将标记后消息添加到消息队列中。当标记后消息进入到消息队列中之后,标记后消息便会成为待执行消息。
202、终端基于预设类型标记,对至少一个待执行消息进行检测,得到检测结果。
在一实施例中,由于在消息生成阶段,终端为消息添加了预设类型标识字段。因此,在消息执行阶段,终端可以基于预设类型标记,对消息队列中的至少一个待执行消息进行检测,得到检测结果。具体的,步骤“基于预设类型标记,对至少一个待执行消息进行检测,得到检测结果”,可以包括:
对待执行消息进行解析,得到待执行消息的消息结构体,消息结构体中包括多个结构参数;
将预设类型标记和结构参数进行匹配,得到匹配结果;
根据匹配结果生成所述检测结果。
在一实施例中,可以首先对消息队列中的待执行消息进行解析,得到待执行消息的消息结构体,其中,该消息结构体中包括多个结构参数。
其中,这些结构参数可以指消息结构体的内容。
然后,可以将预设类型标记和结构参数进行匹配,得到匹配结果。例如,预设类型标记可以是vsync。然后,可以通过将预设类型标记和结构参数进行匹配,从而判断消息队列中的至少一个待执行消息中是否具有目标待执行消息。
在一实施例中,当用户易感知的消息类型是绘制消息时,该预设类型标记可以是预设绘制类型标记。此时,可以基于预设绘制类型标记,对至少一个待执行消息进行检测,得到检测结果。
此外,当消息类型是绘制消息时,可以在生成消息阶段,对是类型是绘制消息的生成消息进行标识处理。例如,可以在绘制消息中添加vsync字段,从而提高绘制消息在消息队列中的优先级。
203、终端基于检测结果,在至少一个待执行消息中识别出具有预设类型标记的目标待执行消息。
在一实施例中,终端可以基于检测结果,在至少一个待执行消息中识别出具有预设类型标记的目标待执行消息。
其中,目标待执行消息可以包括用户易感知的消息。例如,目标待执行消息可以包括绘制消息,等等。
在一实施例中,当检测结果中显示待执行消息中存在有用户易感知的消息时,消息执行处理装置便可以将消息队列中用户易感知的消息确定为目标待执行消息。
在一实施例中,当用户易感知的消息类型是绘制消息时,该目标待执行消息可以是目标待执行绘制消息。此时,步骤“基于检测结果,在至少一个待执行消息中识别出具有预设类型标记的目标待执行消息”,可以包括:
基于检测结果,在至少一个待执行消息中识别出具有预设绘制类型标记的目标待执行绘制消息。
204、终端更新目标待执行消息在消息队列中的执行位置信息,得到更新后待执行消息。
在一实施例中,在确定了目标待执行消息之后,终端可以更新目标待执行消息在消息队列中的执行位置信息,得到更新后待执行消息。
例如,当目标待执行消息不是在消息队列的头部时,终端便可以将目标待执行消息的位置更新到消息队列的头部。
具体的,步骤“更新目标待执行消息在消息队列中的执行位置信息,得到更新后待执行消息”,包括:
基于执行位置信息,确定目标待执行消息的目标更新位置信息;
确定与目标更新位置信息关联的关联待执行消息;
调整关联待执行消息的执行位置信息;
将目标待执行消息的执行位置信息更新为目标更新位置信息,得到更新后待执行消息。
其中,目标更新位置信息可以指对目标待执行消息的位置进行更新后,目标待执行消息在消息队列中的位置。一般情况下,为了避免目标待执行消息的延迟,提高目标待执行消息被执行的优先级和效率,可以将目标待执行消息确定为消息队列的头部。因此,主线程一般会先执行消息队列头部的待执行消息,因此,将目标待执行消息确定为消息队列的头部,可以保证目标待执行消息可以马上被执行掉。
在一实施例中,在更新目标待执行消息的执行位置信息时,可能会影响到其他待执行消息的执行位置,关联待执行消息可以包括执行位置会被影响的待执行消息。
例如,消息队列中包括4个待执行消息,分别是待执行消息1、待执行消息2、待执行消息3和待执行消息4。
其中,检测出待执行消息4是目标待执行消息。此时,可以调整待执行消息4在消息队列中的位置。例如,将待执行消息4的位置调整到消息队列的头部,从而使得主线程可以直接读取到待执行消息4,而不需要对消息队列进行遍历。
其中,若将待执行消息队列4调整到消息队列的头部,会影响到待执行消息1、待执行消息2和待执行消息3的执行位置,此时,关联待执行消息可以包括待执行消息1、待执行消息2和待执行消息3。
在一实施例中,由于更新目标待执行消息的执行位置信息时,可能会影响关联待执行消息。因此,可以首先调整关联待执行消息的执行位置信息,然后,将目标待执行消息的执行位置信息更新为目标更新位置信息,得到更新后待执行消息。
例如,可以首先让关联待执行消息放置到一个空队列中,令消息队列的头部空出来。然后,将目标待执行消息***到消息队列的头部去。然后,在按照关联待执行消息原来的执行顺序,将关联待执行消息添加到消息队列中去。
在一实施例中,还可以直接将目标待执行消息插到消息队列的头部,以实现更新目标待执行消息在消息队列中的执行位置信息,得到更新后待执行消息。
在一实施例中,在更新目标待执行消息在消息队列中的执行位置信息之前,可以判断目标待执行消息在消息队列中的执行位置是否在目标更新位置处。其中,若目标待执行消息在消息队列中的执行位置是在目标更新位置处,则不需要更新目标待执行消息在消息队列中的执行位置信息,否则,则需要更新目标待执行消息在消息队列中的执行位置信息。
在一实施例中,当用户易感知的消息类型是绘制消息时,该目标待执行消息可以是目标待执行绘制消息。此时,步骤“更新目标待执行消息在消息队列中的执行位置信息,得到更新后待执行消息”,包括:
更新目标待执行绘制消息在消息队列中的执行位置信息,得到更新后待执行消息。
在一实施例中,在得到更新后待执行消息之后,可以调用主线程执行更新后待执行消息。具体的,本申请实施例提出的方法还包括:
调用主线程执行更新后待执行消息。
其中,由于更新后待执行消息在消息队列的头部,所以主线程可以马上获取到更新后待执行消息,而不需要对消息队列进行遍历,从而改善了用户易感知的消息执行延迟的问题,提高了用户易感知消息的执行效率。
在一实施例中,如图5所示,是本申请实施例提出的方法的流程示意图。在图5中,消息执行处理方法可以被划分为两个阶段,分别是消息生成阶段001和消息执行阶段002。
其中,在消息生成阶段,可以对生成消息进行识别,得到生成消息的类型;当生成消息 的类型是预设目标类型时,为生成消息进行标识处理,得到标记后消息;将标记后消息添加到消息队列中。
其中,Chorecgrapher是一种消息处理器,可以回调本申请实施例提出的方法。其中,onVsync可以指判断生成消息的类型是否是预设目标类型。Message.setVsync(True),可以指当生成消息的类型是预设目标类型时,为生成消息的消息结构体添加预设类型标识字段,得到初始标识消息,并对初始标识消息的预设类型标识字段进行激活设置,得到标记后消息。
然后便可以将标记后消息添加到消息队列(enqueueMessage)。
在消息执行阶段,可以基于预设类型标记,对至少一个待执行消息进行检测,得到检测结果。例如,如图5所示,图5中的判断框003便是在对至少一个待执行消息进行检测,得到检测结果。接下来,便可以基于检测结果,在至少一个待执行消息中识别出具有预设类型标记的目标待执行消息。例如,如图5所示,待执行消息(msg)104可以是目标待执行消息。然后,便可以将目标待执行消息放到消息队列的头部。
接着主线程在下次消息循环从消息队列获取消息,开始遍历消息队列时,如果消息队列头部是目标待执行消息(例如,绘制消息),便直接拿出来执行。这样会优先拿到之前标记的用户易感知的消息,减少了获取目标待执行消息遍历队列时间,从而进一步改善用户易感知的消息延迟的问题。
本申请实施例提出了一种消息执行处理方法,该方法包括:获取消息队列中的至少一个待执行消息;基于预设类型标记,对至少一个待执行消息进行检测,得到检测结果;基于检测结果,在至少一个待执行消息中识别出具有预设类型标记的目标待执行消息;更新目标待执行消息在消息队列中的执行位置信息,得到更新后待执行消息。在本申请实施例中,通过更新目标待执行消息在消息队列中的执行位置消息,可以使得更新后待执行消息可以快速地被主线程执行到。和现有技术相比,本申请实施例不需要主线程对消息队列进行遍历,从而提取出目标待执行消息进行执行。因此,和现有技术相比,本申请实施例可以减少主线程遍历消息队列的时间,从而提高了主线程执行用户易感知的消息的效率。
此外,在本申请实施例中,可以对消息进行标识,优化消息队列对用户易感知消息管理,增加用户易感知消息的消息策略,整体上减少了用户易感知的消息因为队列消息数量大引起的延时问题。
本申请实施例以用户易感知消息为绘制消息为了,做了相应的测试,测试数据如表1所示:
表1
由表1可以看出,通过在消息队列中添加100+条消息,通过主动触发执行,分别抓取绘制消息优化前后绘制消息的延迟,消息入队出队总时间提升了12ms以上,优化超过20%。
为了更好地实施本申请实施例提供的消息执行处理方法,在一实施例中还提供了一种消息执行处理装置,该消息执行处理装置可以集成于电子设备中。其中名词的含义与上述消息 执行处理方法中相同,具体实现细节可以参考方法实施例中的说明。
在一实施例中,提供了一种消息执行处理装置,该消息执行处理装置具体可以集成在电子设备,如图6所示,该消息执行处理装置包括:获取单元301、检测单元302、识别单元303和更新单元304,具体如下:
获取单元301,用于获取消息队列中的至少一个待执行消息;
检测单元302,用于基于预设类型标记,对所述至少一个待执行消息进行检测,得到检测结果;
识别单元303,用于基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设类型标记的目标待执行消息;
更新单元304,用于更新所述目标待执行消息在所述消息队列中的执行位置信息,得到更新后待执行消息。
在一实施例中,所述检测单元302,可以包括:
解析子单元,用于对所述待执行消息进行解析,得到所述待执行消息的消息结构体,所述消息结构体中包括多个结构参数;
匹配子单元,用于将所述预设类型标记和所述结构参数进行匹配,得到匹配结果;
生成子单元,用于根据所述匹配结果生成所述检测结果。
在一实施例中,所述更新单元304,可以包括:
信息确定子单元,用于基于所述执行位置信息,确定所述目标待执行消息的目标更新位置信息;
消息确定子单元,用于确定与所述目标更新位置信息关联的关联待执行消息;
信息调整子单元,用于调整所述关联待执行消息的执行位置信息;
信息更新子单元,用于将所述目标待执行消息的执行位置信息更新为所述目标更新位置信息,得到所述更新后待执行消息。
在一实施例中,所述检测单元,可以包括:
基于预设绘制类型标记,对所述至少一个待执行消息进行检测,得到检测结果。
在一实施例中,所述识别单元,可以包括:
基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设绘制类型标记的目标待执行绘制消息。
在一实施例中,所述更新单元,可以包括:
更新所述目标待执行绘制消息在所述消息队列中的执行位置信息,得到更新后待执行消息。
在一实施例中,本申请实施例提出的消息执行处理装置还可以包括:
调用单元,用于调用主线程执行所述更新后待执行消息。
在一实施例中,所述消息执行处理装置还可以包括:
消息识别单元,用于对生成消息进行识别,得到所述生成消息的类型;
标识单元,用于当所述生成消息的类型是预设目标类型时,为所述生成消息进行标识处理,得到标记后消息;
添加单元,用于将所述标记后消息添加到所述消息队列中。
在一实施例中,所述标识单元,可以包括:
消息识别子单元,用于当所述生成消息的类型是预设目标类型时,对所述生成消息进行识别,得到所述生成消息的消息结构体;
字段添加子单元,用于为所述生成消息的消息结构体添加预设类型标识字段,得到初始标识消息;
激活子单元,用于对所述初始标识消息的预设类型标识字段进行激活设置,得到所述标 记后消息。
具体实施时,以上各个单元可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元的具体实施可参见前面的方法实施例,在此不再赘述。
通过上述的消息执行处理装置可以提高消息执行处理的可靠性。
本申请实施例还提供一种电子设备,该电子设备可以包括终端或服务器;比如电子设备可以为服务器,如消息执行处理服务器等。如图7所示,其示出了本申请实施例所涉及的终端的结构示意图,具体来讲:
该电子设备可以包括一个或者一个以上处理核心的处理器401、一个或一个以上计算机可读存储介质的存储器402、电源403和输入单元404等部件。本领域技术人员可以理解,图7中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:
处理器401是该电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器402内的软件程序和/或模块,以及调用存储在存储器402内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。可选的,处理器401可包括一个或多个处理核心;优选的,处理器401可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作***、用户页面和应用程序等,调制解调处理器主要处理无线通讯。可以理解的是,上述调制解调处理器也可以不集成到处理器401中。
存储器402可用于存储软件程序以及模块,处理器401通过运行存储在存储器402的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器402可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据计算机设备的使用所创建的数据等。此外,存储器402可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器402还可以包括存储器控制器,以提供处理器401对存储器402的访问。
电子设备还包括给各个部件供电的电源403,优选的,电源403可以通过电源管理***与处理器401逻辑相连,从而通过电源管理***实现管理充电、放电、以及功耗管理等功能。电源403还可以包括一个或一个以上的直流或交流电源、再充电***、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。
该电子设备还可包括输入单元404,该输入单元404可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。
尽管未示出,电子设备还可以包括显示单元等,在此不再赘述。具体在本实施例中,电子设备中的处理器401会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器402中,并由处理器401来运行存储在存储器402中的应用程序,从而实现各种功能,如下:
获取消息队列中的至少一个待执行消息;
基于预设类型标记,对所述至少一个待执行消息进行检测,得到检测结果;
基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设类型标记的目标待执行消息;
更新所述目标待执行消息在所述消息队列中的执行位置信息,得到更新后待执行消息。
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。
根据本申请的一个方面,提供了一种计算机程序应用或计算机程序,该计算机程序应用或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述实施例中各种可选实现方式中提供的方法。
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过计算机程序来完成,或通过计算机程序控制相关的硬件来完成,该计算机程序可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。
为此,本申请实施例还提供一种存储介质,其中存储有计算机程序,该计算机程序能够被处理器进行加载,以执行本申请实施例所提供的任一种消息执行处理方法中的步骤。例如,该计算机程序可以执行如下步骤:
获取消息队列中的至少一个待执行消息;
基于预设类型标记,对所述至少一个待执行消息进行检测,得到检测结果;
基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设类型标记的目标待执行消息;
更新所述目标待执行消息在所述消息队列中的执行位置信息,得到更新后待执行消息。
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。
由于该存储介质中所存储的计算机程序,可以执行本申请实施例所提供的任一种消息执行处理方法中的步骤,因此,可以实现本申请实施例所提供的任一种消息执行处理方法所能实现的有益效果,详见前面的实施例,在此不再赘述。
以上对本申请实施例所提供的一种消息执行处理方法、装置、电子设备和存储介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (20)

  1. 一种消息执行处理方法,其中,包括:
    获取消息队列中的至少一个待执行消息;
    基于预设类型标记,对所述至少一个待执行消息进行检测,得到检测结果;
    基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设类型标记的目标待执行消息;
    更新所述目标待执行消息在所述消息队列中的执行位置信息,得到更新后待执行消息。
  2. 根据权利要求1所述的方法,其中,所述基于预设类型标记,对所述至少一个待执行消息进行检测,得到检测结果,包括:
    对所述待执行消息进行解析,得到所述待执行消息的消息结构体,所述消息结构体中包括多个结构参数;
    将所述预设类型标记和所述结构参数进行匹配,得到匹配结果;
    根据所述匹配结果生成所述检测结果。
  3. 根据权利要求1所述的方法,其中,所述更新所述目标待执行消息在所述消息队列中的执行位置信息,得到更新后待执行消息,包括:
    基于所述执行位置信息,确定所述目标待执行消息的目标更新位置信息;
    确定与所述目标更新位置信息关联的关联待执行消息;
    调整所述关联待执行消息的执行位置信息;
    将所述目标待执行消息的执行位置信息更新为所述目标更新位置信息,得到所述更新后待执行消息。
  4. 根据权利要求3所述的方法,其中,所述调整所述关联待执行消息的执行位置信息,包括:
    获取空队列;
    将所述关联待执行消息存储至所述空队列中;
    在所述将所述目标待执行消息的执行位置信息更新为所述目标更新位置信息,得到所述更新后待执行消息之后,还包括:
    按照所述关联待执行消息的执行顺序,将所述空队列中所述关联待执行消息添加至所述消息队列中。
  5. 根据权利要求1所述的方法,其中,所述预设类型标记包括预设绘制类型标记;所述基于预设类型标记,对所述至少一个待执行消息进行检测,得到检测结果,包括:
    基于预设绘制类型标记,对所述至少一个待执行消息进行检测,得到检测结果;
    基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设类型标记的目标待执行消息,包括:
    基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设绘制类型标记的目标待执行绘制消息;
    所述更新所述目标待执行消息在所述消息队列中的执行位置信息,得到更新后待执行消息,包括:
    更新所述目标待执行绘制消息在所述消息队列中的执行位置信息,得到更新后待执行消息。
  6. 根据权利要求1或5所述的方法,其中,所述方法还包括:
    调用主线程执行所述更新后待执行消息。
  7. 根据权利要求1所述的方法,其中,所述获取消息队列中的至少一个待执行消息之前,包括:
    对生成消息进行识别,得到所述生成消息的类型;
    当所述生成消息的类型是预设目标类型时,为所述生成消息进行标识处理,得到标记后消息;
    将所述标记后消息添加到所述消息队列中。
  8. 根据权利要求7所述的方法,其中,所述当所述生成消息的类型是预设目标类型时,为所述生成消息进行标识处理,得到标记后消息,包括:
    当所述生成消息的类型是预设目标类型时,对所述生成消息进行识别,得到所述生成消息的消息结构体;
    为所述生成消息的消息结构体添加预设类型标识字段,得到初始标识消息;
    对所述初始标识消息的预设类型标识字段进行激活设置,得到所述标记后消息。
  9. 根据权利要求7所述的方法,其中,所述当所述生成消息的类型是预设目标类型时,为所述生成消息进行标识处理,得到标记后消息,包括:
    当所述生成消息的类型是预设目标类型时,获取标识;
    在所述生成消息中添加所述标识,得到标记后消息。
  10. 根据权利要求1所述的方法,其中,所述基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设类型标记的目标待执行消息,包括:
    若所述检测结果为True,则基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设类型标记的目标待执行消息。
  11. 根据权利要求1所述的方法,其中,所述基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设类型标记的目标待执行消息,包括:
    若所述检测结果为1,则基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设类型标记的目标待执行消息。
  12. 一种消息执行处理装置,其中,包括:
    获取单元,用于获取消息队列中的至少一个待执行消息;
    检测单元,用于基于预设类型标记,对所述至少一个待执行消息进行检测,得到检测结果;
    识别单元,用于基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设类型标记的目标待执行消息;
    更新单元,用于更新所述目标待执行消息在所述消息队列中的执行位置信息,得到更新后待执行消息。
  13. 根据权利要求12所述的消息执行处理装置,其中,所述检测单元包括:
    解析子单元,用于对所述待执行消息进行解析,得到所述待执行消息的消息结构体,所述消息结构体中包括多个结构参数;
    匹配子单元,用于将所述预设类型标记和所述结构参数进行匹配,得到匹配结果;
    生成子单元,用于根据所述匹配结果生成所述检测结果。
  14. 根据权利要求12所述的消息执行处理装置,其中,所述更新单元包括:
    信息确定子单元,用于基于所述执行位置信息,确定所述目标待执行消息的目标更新位置信息;
    消息确定子单元,用于确定与所述目标更新位置信息关联的关联待执行消息;
    信息调整子单元,用于调整所述关联待执行消息的执行位置信息;
    信息更新子单元,用于将所述目标待执行消息的执行位置信息更新为所述目标更新位置信息,得到所述更新后待执行消息。
  15. 根据权利要求14所述的消息执行处理装置,其中,所述信息调整子单元用于执行:
    获取空队列;
    将所述关联待执行消息存储至所述空队列中;
    按照所述关联待执行消息的执行顺序,将所述空队列中所述关联待执行消息添加至所述消息队列中。
  16. 根据权利要求12所述的消息执行处理装置,其中,所述预设类型标记包括预设绘制类型标记,所述检测单元用于执行:
    基于预设绘制类型标记,对所述至少一个待执行消息进行检测,得到检测结果;
    所述识别单元用于执行:
    基于所述检测结果,在所述至少一个待执行消息中识别出具有所述预设绘制类型标记的目标待执行绘制消息;
    所述更新单元用于执行:
    更新所述目标待执行绘制消息在所述消息队列中的执行位置信息,得到更新后待执行消息。
  17. 根据权利要求12或16所述的消息执行处理装置,其中,所述消息执行处理装置还包括:
    调用单元,用于调用主线程执行所述更新后待执行消息。
  18. 根据权利要求12所述的消息执行处理装置,其中,所述消息执行处理装置还包括:
    消息识别单元,用于对生成消息进行识别,得到所述生成消息的类型;
    标识单元,用于当所述生成消息的类型是预设目标类型时,为所述生成消息进行标识处理,得到标记后消息;
    添加单元,用于将所述标记后消息添加到所述消息队列中。
  19. 一种电子设备,其中,包括存储器和处理器;所述存储器存储有计算机程序,所述处理器用于运行所述存储器内的计算机程序,以执行权利要求1至11任一项所述的消息执行处理方法。
  20. 一种存储介质,其中,所述存储介质存储有多条计算机程序,所述计算机程序适于处理器进行加载,以执行权利要求1至11任一项所述的消息执行处理方法。
PCT/CN2023/074150 2022-02-11 2023-02-01 一种消息执行处理方法、装置、电子设备和存储介质 WO2023151498A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210127687.XA CN114546677A (zh) 2022-02-11 2022-02-11 一种消息执行处理方法、装置、电子设备和存储介质
CN202210127687.X 2022-02-11

Publications (1)

Publication Number Publication Date
WO2023151498A1 true WO2023151498A1 (zh) 2023-08-17

Family

ID=81673710

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/074150 WO2023151498A1 (zh) 2022-02-11 2023-02-01 一种消息执行处理方法、装置、电子设备和存储介质

Country Status (2)

Country Link
CN (1) CN114546677A (zh)
WO (1) WO2023151498A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114546677A (zh) * 2022-02-11 2022-05-27 深圳Tcl新技术有限公司 一种消息执行处理方法、装置、电子设备和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9038093B1 (en) * 2013-03-11 2015-05-19 Sprint Communications Company L.P. Retrieving service request messages from a message queue maintained by a messaging middleware tool based on the origination time of the service request message
CN113419841A (zh) * 2021-08-24 2021-09-21 北京每日优鲜电子商务有限公司 消息调度方法、装置、电子设备和计算机可读介质
CN114546677A (zh) * 2022-02-11 2022-05-27 深圳Tcl新技术有限公司 一种消息执行处理方法、装置、电子设备和存储介质

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9038093B1 (en) * 2013-03-11 2015-05-19 Sprint Communications Company L.P. Retrieving service request messages from a message queue maintained by a messaging middleware tool based on the origination time of the service request message
CN113419841A (zh) * 2021-08-24 2021-09-21 北京每日优鲜电子商务有限公司 消息调度方法、装置、电子设备和计算机可读介质
CN114546677A (zh) * 2022-02-11 2022-05-27 深圳Tcl新技术有限公司 一种消息执行处理方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN114546677A (zh) 2022-05-27

Similar Documents

Publication Publication Date Title
CN107729139B (zh) 一种并发获取资源的方法和装置
CN110971700B (zh) 分布式锁的实现方法及装置
US20090150869A1 (en) System and method of monitoring dynamic scopes in synchronous and asynchronous calls
WO2023151498A1 (zh) 一种消息执行处理方法、装置、电子设备和存储介质
EP3972222A1 (en) Method, apparatus, electronic device, readable storage medium and program for adjusting instance number
CN108984290B (zh) 任务调度方法和***
CN110851276A (zh) 一种业务请求处理方法、装置、服务器和存储介质
CN112395097A (zh) 一种消息处理方法、装置、设备和存储介质
WO2022214012A1 (zh) 实现应用程序的多语言翻译的***、方法、设备和介质
CN115439250A (zh) 一种交易请求的处理方法及装置、存储介质、电子装置
US8055806B2 (en) Autonomic threading model switch based on input/output request type
US10523746B2 (en) Coexistence of a synchronous architecture and an asynchronous architecture in a server
CN113204425B (zh) 供进程管理内部线程的方法、装置、电子设备及存储介质
WO2024037629A1 (zh) 区块链的数据整合方法、装置、计算机设备及存储介质
WO2023193527A1 (zh) 线程执行方法、装置、电子设备及计算机可读存储介质
CN114138371B (zh) 配置动态加载方法、装置及计算机设备、存储介质
WO2023279829A1 (zh) 消息延迟检测方法、装置、电子设备及存储介质
CN114817134A (zh) 一种快照任务监控方法、装置、设备及介质
CN112988422A (zh) 一种异步消息处理方法、装置、电子设备及存储介质
CN110968595A (zh) 一种单线程sql语句执行方法、设备及存储介质
CN106484536B (zh) 一种io调度方法、装置和设备
CN113996058B (zh) 信息处理方法、装置、电子设备和计算机可读存储介质
CN117093387B (zh) 消息处理方法、装置、电子设备和存储介质
CN116301568A (zh) 一种数据访问方法、装置以及设备
CN115220879A (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: 23752278

Country of ref document: EP

Kind code of ref document: A1