A message processing method, apparatus and electronic device

By caching and responding to the latest operation messages, the problem of resource waste caused by frequent operation messages on the browser side is solved, and the response efficiency and visual effect during the creation of the playback component are improved.

CN116010674BActive Publication Date: 2026-01-23HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211715261.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-29
Publication Date
2026-01-23
Estimated Expiration
2042-12-29

AI Technical Summary

Technical Problem

The browser frequently sends operation messages while waiting for the playback component to be created, resulting in wasted resources and low response efficiency.

Method used

By receiving and caching operation messages through a local service control, only the latest target operation message is responded to, reducing unnecessary message responses.

Benefits of technology

It reduced the number of operation message responses, improved response efficiency, avoided resource waste, and enhanced visual effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116010674B_ABST
    Figure CN116010674B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a message processing method and device and electronic equipment. In the embodiments, operation messages are processed according to the types of the received operation messages, so that the target operation message under each type is the latest received operation message belonging to the type. In this way, after the playing component is successfully created, only the target operation message needs to be responded to, the number of operation message responses is reduced, the waste of time and resources is reduced, and the operation message response efficiency is improved. Furthermore, the playing component only responds to the target operation message, and multiple flickers do not occur, and the visual effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a message processing method, apparatus and electronic device. Background Technology

[0002] When a local service control (Web control) on an electronic device (e.g., a terminal, a server, etc.) receives a playback component creation request from the browser on that electronic device, it begins to create the playback component. The creation time of the playback component can be quite long, but the user on the browser side is unaware that it has not been created yet. The user will keep clicking on the browser interface, and the browser will correspondingly send multiple operation messages to the local service (e.g., hide / show the playback component, change the size of the playback component, etc.). After the local service creates the playback component, it will respond to each of the above multiple operation messages, wasting time and resources, and the operation message response efficiency is low. Summary of the Invention

[0003] In view of this, embodiments of this application provide a message processing method, apparatus, and electronic device to reduce the number of operation message responses and improve operation message response efficiency.

[0004] According to a first aspect of the embodiments of this application, a message processing method is provided, the method being applied to an electronic device, the method comprising:

[0005] The local service control receives operation messages for the playback component sent by the browser after sending the playback component creation request;

[0006] After the playback component is successfully created through the local service control, the target operation message is sent to the playback component so that the playback component can perform the corresponding operation based on the received target operation message; wherein, the target operation message is determined from the received operation messages according to the type of the received operation message, and the target operation message under each type is the latest received operation message belonging to that type.

[0007] Optionally, the method further includes: when any operation message is received, replacing other cached operation messages of the same type as the operation message with the operation message, so that the cached operation message is the latest received operation message of the type;

[0008] The target operation message is a cached operation message.

[0009] Optionally, the playback component creation request carries at least a playback component identifier;

[0010] The operation message carries the playback component identifier;

[0011] The operation message is cached in the operation message set corresponding to the playback component identifier.

[0012] Optionally, the target operation message is determined through the following steps:

[0013] For each type, obtain all operation messages under that type, find the latest operation message from all the obtained operation messages, and determine the found operation message as the target operation message corresponding to that type.

[0014] Optionally, the target operation message is determined through the following steps:

[0015] The latest operation message received for the playback component is determined. If the operation message is an operation message indicating the destruction of the playback component, then the latest operation message is determined as the target operation message. If the operation message is not an operation message indicating the destruction of the playback component, then for each type, all operation messages under that type are obtained, the latest operation message is found from all the obtained operation messages, and the found operation message is determined as the target operation message corresponding to that type.

[0016] Optionally, the types of operation messages include at least: hide / show playback component messages, playback component window size adjustment messages, and destroy playback component messages;

[0017] After determining the target operation message, the method further includes:

[0018] Delete all operation messages except the target operation message.

[0019] According to a second aspect of the embodiments of this application, a message processing apparatus is provided, which is applied to an electronic device, the apparatus comprising:

[0020] The operation message receiving module is used to receive operation messages sent by the browser after sending a request to create the playback component, and to perform operations on the playback component;

[0021] The message processing module is used to send a target operation message to the playback component after the playback component is successfully created through the local service control, so that the playback component can perform a corresponding operation based on the received target operation message; wherein, the target operation message is determined from the received operation messages according to the type of the received operation message, and the target operation message under each type is the latest received operation message belonging to that type.

[0022] Optionally, the device further includes:

[0023] The replacement module is used to replace any cached operation message of the same type with any operation message received, so that the cached operation message is the most recently received operation message of the type; the target operation message is the cached operation message.

[0024] The playback component creation request must carry at least a playback component identifier;

[0025] The operation message carries the playback component identifier;

[0026] The operation message is cached in the operation message set corresponding to the playback component identifier;

[0027] The message processing module is specifically used for:

[0028] For each type, obtain all operation messages under that type, find the latest operation message from all the obtained operation messages, and determine the found operation message as the target operation message corresponding to that type.

[0029] The types of operation messages include at least: hide / show playback component messages, playback component window resizing messages, and destroy playback component messages;

[0030] The device further includes a deletion module for deleting other operation messages besides the target operation message.

[0031] According to a third aspect of the present application, an electronic device is provided, including a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being prompted by the machine-executable instructions to perform the method as described in the first aspect or any optional embodiment of the first aspect.

[0032] According to a fourth aspect of the embodiments of this application, a machine-readable storage medium is provided, the machine-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to perform the method as described in the first aspect or any optional embodiment of the first aspect.

[0033] The technical solutions provided in this application embodiment may include the following beneficial effects:

[0034] In this embodiment, the operation message is processed according to the type of the received operation message, so that the target operation message under each type is the latest received operation message belonging to that type. In this way, after the playback component is successfully created, it only needs to respond to the target operation message. Compared with responding to all operation messages, the number of operation message responses is reduced, the waste of time and resources is reduced, and the operation message response efficiency is improved.

[0035] Furthermore, the playback component only responds to the target operation message, avoiding multiple flickering events and improving the visual effect. Attached Figure Description

[0036] Figure 1 This is a network example diagram of the browser and local service controls provided in the embodiments of this application.

[0037] Figure 2 This is a flowchart of a message processing method provided in an embodiment of this application.

[0038] Figure 3 This is an example diagram of the operation message provided in the embodiments of this application.

[0039] Figure 4 This is another example diagram of operation messages provided in the embodiments of this application.

[0040] Figure 5 This is a block diagram of a message processing device provided in an embodiment of this application.

[0041] Figure 6 This is a block diagram of the electronic device provided in the embodiments of this application. Detailed Implementation

[0042] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0043] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0044] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0045] The embodiments described in this specification will now be described in detail.

[0046] See Figure 1 , Figure 1 This is a network example diagram of the browser and local service controls provided in the embodiments of this application, such as... Figure 1 As shown in the embodiments of this application, the browser can be Internet Explorer, 360 Browser, Sogou Browser, etc., and the embodiments of this application are not specifically limited.

[0047] The local service control is a web control. Here, the web control is an installer. After the local service control is downloaded and successfully installed on the electronic device, the task manager runs as a specified process (e.g., an .exe process) to provide an extended function (i.e., a video playback window) to the webpage in the browser. The webpage and the web control complete the command interaction by establishing a WebSocket connection or an HTTP connection, etc.

[0048] In this embodiment, the browser and the local service control run on the same electronic device. The browser establishes a connection with the local service control (web control) via a WebSocket connection or an HTTP connection, and then interacts with it through commands to asynchronously create multiple playback components.

[0049] based on Figure 1 The network structure of the browser and local service controls shown below will be discussed later. Figure 2 The process shown is described below:

[0050] See Figure 2 , Figure 2 This is a flowchart illustrating a method provided in an embodiment of this application. The method is applied to... Figure 1 The processing unit in the JS development kit or local service control of the electronic device shown is not specifically limited in the embodiments of this application.

[0051] As an example, the electronic device here may be a terminal, a server, etc., but this example is not specifically limited.

[0052] like Figure 2 As shown, the process may include the following steps:

[0053] S210: Receive operation messages for the playback component sent by the browser after sending the playback component creation request via a local service control.

[0054] For example, in this embodiment, the browser can be Internet Explorer, 360 Browser, Sogou Browser, etc., and this application embodiment is not specifically limited.

[0055] In this embodiment, the browser sends a playback component creation request to the local service control, which instructs the local service control to create the corresponding playback component.

[0056] For example, in this embodiment, the operation message is a message formed by performing an operation on the playback component. Here, the operation on the playback component can be, for example, hiding / showing the playback component, adjusting the size of the playback component window, and destroying the playback component. This embodiment of the application is not specifically limited.

[0057] After receiving the playback component creation request from the browser, the local service control begins to create the playback component. The creation time of the playback component can be relatively long, but the user on the browser side is unaware that it has not been created yet. The user will keep clicking on the browser interface, and the browser will correspondingly keep sending multiple operation messages to the local service. Therefore, in this embodiment, the received operation messages are cached first, and the local service responds to the cached operation messages after the playback component is created.

[0058] In this embodiment, when caching operation messages for each playback component, all received operation messages can be cached in one cache space, or the operation messages can be grouped and cached in different cache spaces. This embodiment does not specifically limit the scope of the application.

[0059] The method for grouping operation messages can be found in the description of the following embodiments, which will not be repeated here.

[0060] S220: After successfully creating the playback component through the local service control, the target operation message is sent to the playback component so that the playback component can perform the corresponding operation based on the received target operation message.

[0061] For example, in this embodiment, after the local service control successfully creates the playback component, it can send a playback component creation success message. Here, when this method is applied... Figure 1 When the JS development kit of the electronic device is used, the local service control sends a playback component creation success message to the JS development kit of the electronic device via a WebSocket connection or an HTTP connection. The JS development kit then sends the cached target operation message to the playback component, so that the playback component can perform the corresponding operation based on the received target operation message. When this method is applied to the processing unit in the local service control of the electronic device, the local service control directly sends the playback component creation success message to the aforementioned processing unit, which then sends the cached target operation message to the playback component, so that the playback component can perform the corresponding operation based on the received target operation message.

[0062] In this embodiment, the target operation message is determined from the received operation messages based on the type of the received operation message. Since the operation messages are time-sensitive, for the same type of operation message, only the latest operation message needs to be recorded. Therefore, the target operation message under each type is the latest received operation message belonging to that type. Here, there are many ways to determine the target operation message from the received operation messages based on the type of the received operation message, and this embodiment does not specifically limit the methods.

[0063] As one embodiment of this application, determining the target operation message from the received operation messages based on the type of the received operation message can be achieved by processing the received operation messages in real time according to the type of the received operation messages to obtain the target operation message. The specific method of determining the target operation message from the received operation messages in real time according to the type of the received operation messages is described in the following embodiments and will not be repeated here.

[0064] As another embodiment of this application, determining the target operation message from the received operation message based on the type of the received operation message can also be achieved by periodically processing the received operation message according to the type of the received operation message to obtain the target operation message. The specific method of periodically determining the target operation message from the received operation message based on the type of the received operation message is described in the following embodiments and will not be repeated here.

[0065] As an example, after the target operation message is identified, other operation messages besides the target operation message are deleted from the received operation messages.

[0066] This concludes the process. Figure 2 Description of the process shown.

[0067] pass Figure 2 As can be seen from the process shown, in this embodiment of the application, the operation message is processed according to the type of the received operation message, so that the target operation message under each type is the latest received operation message belonging to that type. In this way, after the playback component is successfully created, it only needs to respond to the target operation message. Compared with responding to all operation messages, the number of operation message responses is reduced, the waste of time and resources is reduced, and the operation message response efficiency is improved.

[0068] Furthermore, the playback component only responds to the target operation message, avoiding multiple flickering events and improving the visual effect.

[0069] The following describes the timing process of receiving operation messages based on their type to obtain the target operation message. As an optional implementation of this application, the message processing method further includes:

[0070] When any operation message is received, replace any other cached operation message of the same type with that operation message, so that the cached operation message is the most recently received operation message of that type; the target operation message is the cached operation message.

[0071] For example, in this embodiment, when any operation message is received, it is determined whether there are other operation messages of the same type as the operation message in the cached operation messages according to the type of the operation message. If there are, the operation message is used to replace the other cached operation messages of the same type as the operation message. If there are, the operation message is directly cached so that the cached operation message is the latest received operation message of the type and the target operation message is the cached operation message.

[0072] As an optional implementation of this application, the playback component creation request carries at least a playback component identifier;

[0073] The operation message carries the playback component identifier;

[0074] Operation messages are cached in the operation message set corresponding to the playback component identifier.

[0075] For example, in this embodiment, when the browser sends a playback component creation request, the playback component creation request carries at least a playback component identifier, which can be a WinUUID identifier to identify different playback components.

[0076] Based on the above-mentioned playback component creation request carrying at least a playback component identifier, in this embodiment, the operation message also carries a playback component identifier, so as to determine the playback component corresponding to the received operation message and cache the operation message in the operation message set corresponding to the playback component identifier. Here, the operation message set includes at least one operation message.

[0077] The following describes how to determine the target operation message from the received operation messages based on the type of the received operation message at regular intervals. Here, the time interval can be every minute or every half minute, and this application embodiment does not specifically limit it.

[0078] For each type, obtain all operation messages under that type, find the latest operation message from all the obtained operation messages, and determine the found operation message as the target operation message corresponding to that type.

[0079] For example, in this embodiment, in addition to carrying the playback component identifier, the operation message may also carry a sending timestamp. For each type, all operation messages cached under that type are obtained, the latest operation message is found from all the obtained operation messages, and the found operation message is determined as the target operation message corresponding to that type.

[0080] For example, such as Figure 3 As shown, when the received operation message is: hideWnd (hide playback component) -> showWnd (show playback component) -> hideWnd (hide playback component) -> showWnd (show playback component) -> setWndGeometry (playback component size change) -> setWndGeometry (playback component size change) -> setWndGeometry (playback component size change), since hideWnd -> showWnd -> hideWnd -> showWnd are operation messages of the same type, the last showWnd is taken as the target operation message of this type; since setWndGeometry -> setWndGeometry -> setWndGeometry are operation messages of the same type, the last setWndGeometry is taken as the target operation message of this type.

[0081] After obtaining the target operation messages corresponding to each type, the target operation messages for each type are sorted by time, and the sorting result is used as the processed target operation message. Figure 3 For example, the target operation messages are: showWnd and setWndGeometry.

[0082] As one embodiment of this application, the latest operation message received for the playback component is determined. If the operation message is an operation message used to instruct the destruction of the playback component, then the latest operation message is determined to be the target operation message.

[0083] For example, in this embodiment, for each playback component, the latest operation message is determined based on the timestamp of each operation message received for that playback component. If the latest operation message is an operation message used to indicate the destruction of the playback component, then the latest operation message is directly determined as the target operation message.

[0084] For example, such as Figure 4As shown, when the received operation message is: hideWnd (hide playback component) -> showWnd (show playback component) -> setWndGeometry (playback component size change) -> setWndGeometry (playback component size change) -> hideWnd (hide playback component) -> destroyWnd (destroy playback component), the latest operation message is the playback component destruction operation message. This operation message is directly used as the target operation message. Only the target operation message needs to be responded to to destroy the corresponding playback component.

[0085] As another embodiment of this application, the latest operation message received for the playback component is determined. If the operation message is not an operation message used to instruct the destruction of the playback component, then for each type, all operation messages under that type are obtained, the latest operation message is found from all the obtained operation messages, and the found operation message is determined as the target operation message corresponding to that type.

[0086] For example, in this embodiment, for each playback component, the latest operation message is determined based on the timestamp of each operation message received for the playback component. If the latest operation message is not an operation message used to indicate the destruction of the playback component, then for each type, all operation messages under that type are obtained, the latest operation message is found from all the obtained operation messages, and the found operation message is determined as the target operation message corresponding to that type. The latest operation message is directly determined as the target operation message, thereby determining the target operation message corresponding to each type. The target operation information corresponding to each type is combined to obtain the target operation message corresponding to the playback component.

[0087] like Figure 3 As shown, when the received operation message is: hideWnd->showWnd->hideWnd->showWnd->setWndGeometry->setWndGeometry->setWndGeometry, the steps for determining the target operation message described in the above embodiment are executed, and will not be repeated here.

[0088] This application embodiment improves the operation message response efficiency by determining whether the latest cached operation message is an operation message indicating the destruction of the playback component before determining the target operation message based on the type of the operation message. If so, it is not necessary to perform processing operations on multiple operation messages.

[0089] Corresponding to the embodiments of the foregoing methods, this specification also provides embodiments of the apparatus and the terminal to which it is applied.

[0090] like Figure 5As shown, Figure 5 This is a block diagram of a message processing apparatus provided in an embodiment of this application. The message processing apparatus is applied to an electronic device and includes:

[0091] The operation message receiving module is used to receive operation messages sent by the browser after sending the playback component creation request, which are used to perform operations on the playback component;

[0092] The message processing module is used to send the target operation message to the playback component after the playback component is successfully created through the local service control, so that the playback component can perform the corresponding operation based on the received target operation message. The target operation message is determined from the received operation messages according to the type of the received operation message. The target operation message under each type is the latest received operation message belonging to that type.

[0093] As an optional implementation of this application embodiment, the message processing apparatus further includes:

[0094] The replacement module is used to replace any cached operation message of the same type with the received operation message when any operation message is received, so that the cached operation message is the latest received operation message of the type;

[0095] The target operation message is a cached operation message.

[0096] As an optional implementation of this application, the playback component creation request carries at least a playback component identifier;

[0097] The operation message carries the playback component identifier;

[0098] Operation messages are cached in the operation message set corresponding to the playback component identifier.

[0099] As an optional implementation of this application embodiment, the above message processing module is specifically used for:

[0100] For each type, obtain all operation messages under that type, find the latest operation message from all the obtained operation messages, and determine the found operation message as the target operation message corresponding to that type.

[0101] As an optional implementation of this application embodiment, the message processing module is further used for:

[0102] Determine the latest operation message received for the playback component. If the operation message is an operation message used to instruct the destruction of the playback component, then determine the latest operation message as the target operation message. If the operation message is not an operation message used to instruct the destruction of the playback component, then for each type, obtain all operation messages under that type, find the latest operation message from all the obtained operation messages, and determine the found operation message as the target operation message corresponding to that type.

[0103] As an optional implementation of this application, the types of operation messages include at least: hide / show playback component messages, playback component window size adjustment messages, and destroy playback component messages;

[0104] After the target operation message is determined, the message processing device further includes:

[0105] The delete module is used to delete operation messages other than the target operation message.

[0106] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0107] This concludes the process. Figure 5 Description of the block diagram shown.

[0108] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0109] Correspondingly, embodiments of this application also provide Figure 5 The hardware structure diagram of the device shown is as follows: Figure 6 As shown, the electronic device can be a device implementing the above-described method. Figure 6 As shown, the hardware structure includes: a communication interface 601, a processor 602, a machine-readable storage medium 603, and a bus 604; wherein, the communication interface 601, the processor 602, and the machine-readable storage medium 603 communicate with each other via the bus 604. The processor 602 can execute the checkpoint flow prediction method described above by reading and executing the machine-executable instructions corresponding to the checkpoint flow prediction control logic in the machine-readable storage medium 603.

[0110] The machine-readable storage medium 603 mentioned herein can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be volatile memory, non-volatile memory, or similar storage media. Specifically, the machine-readable storage medium 603 can be RAM (Random Access Memory), flash memory, a storage drive (such as a hard disk drive), a solid-state drive, any type of storage disk (such as an optical disc, DVD, etc.), or similar storage media, or combinations thereof.

[0111] The machine-readable storage medium stores machine-executable instructions that can be executed by the processor, which is prompted by the machine-executable instructions to execute the method embodiment corresponding to the message processing described above.

[0112] This concludes the process. Figure 6 Description of the electronic device shown.

[0113] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0114] Other embodiments of this specification will readily occur to those skilled in the art upon consideration of the specification and practice of the invention claimed herein. This specification is intended to cover any variations, uses, or adaptations that follow the general principles of this specification and include the present invention.

[0115] The specification does not include any common general knowledge or customary techniques in this field. The specification and examples are to be considered exemplary only, and the true scope and spirit of this specification are indicated by the following claims.

[0116] It should be understood that this specification is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this specification is limited only by the appended claims.

[0117] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification shall be included within the scope of protection of this specification.

Claims

1. A message processing method, characterized in that, This method is applied to electronic devices, and the method includes: The local service control receives operation messages for the playback component sent by the browser after sending the playback component creation request; After the playback component is successfully created through the local service control, the target operation message is sent to the playback component so that the playback component can perform the corresponding operation based on the received target operation message; wherein, the target operation message is determined from the received operation messages according to the type of the received operation message, and the target operation message under each type is the latest received operation message belonging to that type.

2. The method according to claim 1, characterized in that, The method further includes: when any operation message is received, replacing other cached operation messages of the same type with the operation message with the operation message, so that the cached operation message is the latest received operation message of the type; The target operation message is a cached operation message.

3. The method according to claim 1 or 2, characterized in that, The playback component creation request must carry at least a playback component identifier; The operation message carries the playback component identifier; The operation message is cached in the operation message set corresponding to the playback component identifier.

4. The method according to claim 1, characterized in that, The target operation message is determined through the following steps: For each type, obtain all operation messages under that type, find the latest operation message from all the obtained operation messages, and determine the found operation message as the target operation message corresponding to that type.

5. The method according to claim 1, characterized in that, The target operation message is determined through the following steps: The latest operation message received for the playback component is determined. If the operation message is an operation message indicating the destruction of the playback component, then the latest operation message is determined as the target operation message. If the operation message is not an operation message indicating the destruction of the playback component, then for each type, all operation messages under that type are obtained, the latest operation message is found from all the obtained operation messages, and the found operation message is determined as the target operation message corresponding to that type.

6. The method according to claim 1, characterized in that, The types of operation messages include at least: hide / show playback component messages, playback component window resizing messages, and destroy playback component messages; After determining the target operation message, the method further includes: Delete all operation messages except the target operation message.

7. A message processing device, characterized in that, This device is used in electronic devices and includes: The operation message receiving module is used to receive operation messages sent by the browser after sending a request to create the playback component, and to perform operations on the playback component; The message processing module is used to send a target operation message to the playback component after the playback component is successfully created through the local service control, so that the playback component can perform a corresponding operation based on the received target operation message; wherein, the target operation message is determined from the received operation messages according to the type of the received operation message, and the target operation message under each type is the latest received operation message belonging to that type.

8. The apparatus according to claim 7, characterized in that, The device further includes: The replacement module is used to replace any cached operation message of the same type with any received operation message, so that the cached operation message is the most recently received operation message of the type; the target operation message is the cached operation message. The playback component creation request must carry at least a playback component identifier; The operation message carries the playback component identifier; The operation message is cached in the operation message set corresponding to the playback component identifier; The message processing module is specifically used for: For each type, obtain all operation messages under that type, find the latest operation message from all the obtained operation messages, and determine the found operation message as the target operation message corresponding to that type. The types of operation messages include at least: hide / show playback component messages, playback component window resizing messages, and destroy playback component messages; The device further includes a deletion module for deleting other operation messages besides the target operation message.

9. An electronic device, characterized in that, The method includes a processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, the processor being prompted by the machine-executable instructions to perform the method as described in any one of claims 1 to 6.

10. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for carrying out audio and video information display in browser and device thereof

    CN104065896A

  • Music playing method and device, electronic device and computer storage medium

    CN109587553A