CN-122019205-A - Message processing method, device, electronic equipment and computer storage medium
Abstract
The application provides a message processing method, a device, electronic equipment and a computer storage medium, wherein the method comprises the steps of judging whether a target plugin to be loaded corresponding to a target service exists or not when the target service is detected to be started, wherein the target plugin is compiled based on a preset standard interface specification, if yes, loading the target plugin, and if the message processing instruction is detected to be triggered under the condition that the target plugin is loaded, calling a corresponding message service interface through the target plugin so as to send or receive a message, and the message processing instruction comprises a message sending instruction or a message receiving instruction. The embodiment provided by the scheme can improve the system development efficiency and the expandability of the message service.
Inventors
- LIANG JINGBIAO
Assignees
- 三六零数字安全科技集团有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20241112
Claims (10)
- 1. A method of message processing comprising: When the target service is detected to be started, judging whether a target plug-in to be loaded corresponding to the target service exists, wherein the target plug-in is compiled based on a preset standard interface specification; If yes, loading the target plug-in; And under the condition that the loading of the target plug-in is completed, if the triggering of the message processing instruction is detected, calling a corresponding message service interface through the target plug-in to send or receive the message, wherein the message processing instruction comprises a message sending instruction or a message receiving instruction.
- 2. The method of claim 1, wherein the determining whether there is a target plug-in to be loaded corresponding to the target service comprises: Acquiring a configuration file corresponding to a target service; and scanning the plug-in catalogue included in the configuration file to determine whether a target plug-in to be loaded corresponding to the target service exists.
- 3. The method of claim 1, wherein the method further comprises: detecting whether a target plug-in to be updated corresponding to the target service exists; If yes, acquiring an updated target plug-in corresponding to the target plug-in to be updated; And replacing the target plug-in to be updated with the updated target plug-in.
- 4. The method of claim 1, wherein invoking the message service interface via the target plug-in for sending or receiving a message comprises: If the message processing instruction is the message sending instruction, receiving service data from a data sender based on the message sending instruction; generating a message to be sent based on the service data; and calling the message service interface through the target plug-in to send the message to be sent to a preset message queue.
- 5. The method of claim 4, wherein the generating a message to send based on the traffic data comprises: Analyzing the service data to obtain analyzed target data corresponding to the service data; and packaging the target data into a message to be sent according to preset message structure information, wherein the message to be sent comprises a message body and metadata.
- 6. The method of claim 1, wherein invoking the message service interface via the target plug-in for sending or receiving a message comprises: if the message processing instruction is the message receiving instruction, calling the message service interface through the target plug-in to generate a message channel; Determining a message to be received from a preset message queue based on the message receiving instruction; and transmitting the message to be received to a data receiver corresponding to the message to be received through the message channel.
- 7. The method of claim 6, wherein the method further comprises: if a message stopping instruction aiming at the message channel is detected, judging whether the transmission of the message to be received in the message channel is completed or not; and calling the message service interface through the target plug-in to disconnect the message channel under the condition that the transmission of the message to be received in the message channel is completed.
- 8. A message processing apparatus, comprising: the first judging module is used for judging whether a target plug-in to be loaded corresponding to the target service exists or not when the target service is detected to be started, wherein the target plug-in is compiled based on a preset standard interface specification; The loading module is used for loading the target plug-in to be loaded when the target plug-in to be loaded corresponding to the target service exists; And the processing module is used for calling a corresponding message service interface through the target plug-in to send or receive the message if the message processing instruction is detected to be triggered under the condition that the loading of the target plug-in is completed, wherein the message processing instruction comprises a message sending instruction or a message receiving instruction.
- 9. An electronic device is characterized by comprising a processor and a memory; the memory stores a computer program adapted to be loaded by the processor and to perform the steps of the method according to any one of claims 1 to 7.
- 10. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the steps of the method according to any one of claims 1 to 7.
Description
Message processing method, device, electronic equipment and computer storage medium Technical Field The present application relates to the field of message processing technologies, and in particular, to a message processing method, a device, an electronic apparatus, and a computer storage medium. Background In the related art, when the browser system is privately deployed, it is generally required to integrate the browser system with the existing message queue service of the client. However, because of the variety of message queue service types, the application programming interface and functionality of each service may be different, making the development of the system less efficient for the developer in determining the fit for the client's existing message queue service. Disclosure of Invention The embodiment of the application provides a message processing method, a message processing device, electronic equipment and a computer storage medium, which can improve the system development efficiency and the expandability of a message service. The technical scheme is as follows: in a first aspect, an embodiment of the present application provides a message processing method, where the method includes: When the target service is detected to be started, judging whether a target plug-in to be loaded corresponding to the target service exists, wherein the target plug-in is compiled based on a preset standard interface specification; if yes, loading the target plug-in; And under the condition that the loading of the target plug-in is completed, if the triggering of the message processing instruction is detected, calling a corresponding message service interface through the target plug-in to send or receive the message, wherein the message processing instruction comprises a message sending instruction or a message receiving instruction. In one possible implementation manner, the determining whether there is a target plug-in to be loaded corresponding to the target service includes: Acquiring a configuration file corresponding to a target service; And scanning the plug-in catalogue included in the configuration file to determine whether a target plug-in to be loaded corresponding to the target service exists. In one possible implementation manner, the method further includes: detecting whether a target plug-in to be updated corresponding to the target service exists; if yes, acquiring an updated target plug-in corresponding to the target plug-in to be updated; and replacing the target plug-in to be updated with the updated target plug-in. In one possible implementation manner, the calling, by the target plug-in, the message service interface to send or receive a message includes: If the message processing instruction is the message sending instruction, receiving service data from a data sender based on the message sending instruction; Generating a message to be sent based on the service data; And calling the message service interface through the target plug-in to send the message to be sent to a preset message queue. In one possible implementation manner, the generating the message to be sent based on the service data includes: analyzing the service data to obtain analyzed target data corresponding to the service data; And packaging the target data into a message to be sent according to preset message structure information, wherein the message to be sent comprises a message body and metadata. In one possible implementation manner, the calling, by the target plug-in, the message service interface to send or receive a message includes: if the message processing instruction is the message receiving instruction, calling the message service interface through the target plug-in to generate a message channel; determining a message to be received from a preset message queue based on the message receiving instruction; and transmitting the message to be received to a data receiver corresponding to the message to be received through the message channel. In one possible implementation manner, the method further includes: if a message stopping instruction aiming at the message channel is detected, judging whether the transmission of the message to be received in the message channel is completed or not; And calling the message service interface through the target plug-in to disconnect the message channel under the condition that the transmission of the message to be received in the message channel is completed. In a second aspect, an embodiment of the present application provides a message processing apparatus, where the apparatus includes: The first judging module is used for judging whether a target plug-in to be loaded corresponding to the target service exists or not when the target service is detected to be started, wherein the target plug-in is compiled based on a preset standard interface specification; The loading module is used for loading the target plug-in to be loaded when the target plug-in to be loaded corresponding