Event processing method and device, computer equipment, readable storage medium and program product

By using the target communication mechanism of R-SOME/IP in the automotive industry communication protocol to receive and confirm event information, the problem of message loss caused by UDP unreliability is solved, and reliable transmission between network devices and system stability are achieved. sexual enhancement.

CN118540372APending Publication Date: 2024-08-23CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410532699.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In the existing automotive industry communication protocols, the UDP-based message transmission is unreliable, resulting in message loss. The common method is to solve the problem by sending multiple messages, but it increases the network load and consumes the controller's computing power, which cannot fundamentally solve the problem. .

Method used

By using the target communication mechanism based on R-SOME/IP between network devices, event information is received and confirmed to ensure reliable transmission and avoid message loss. The specific method includes receiving event information and mechanism identification when the event processing cycle arrives, generating a confirmation message, and sending the confirmation through the target communication mechanism to achieve reliable transmission between the first network device and the second network device.

Benefits of technology

Reliable transmission between the first network device and the second network device is achieved, message loss is avoided, network load and controller computing power consumption are reduced, and system stability is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540372A
    Figure CN118540372A
Patent Text Reader

Abstract

The invention relates to an event processing method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: when a current event processing cycle arrives, receiving event information and a mechanism identifier of a current event sent by second network equipment; under the condition that the first network equipment successfully receives the event information, generating a confirmation message; determining a target communication mechanism indicated by the mechanism identifier, and sending a confirmation message to the second network device through the target communication mechanism to indicate the second network device to determine that the first network device has successfully received the event information based on the confirmation message; and when the next event processing cycle arrives, returning to the step of receiving the event information of the current event and the mechanism identifier sent by the second network equipment, and continuing to execute until a preset stop condition is reached. By adopting the method, reliable transmission between the first network equipment and the second network equipment can be realized, so that message loss is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an event processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] Scalable service-oriented middleware over IP (IPSOME / IP) is the core communication protocol of the automotive industry. Most methods now use the notification mechanism to transmit messages, and the basic user datagram protocol (UDP) is used for transmission. However, in this way, when there is message loss between the second network device and the first network device, it will affect the response function. The common method is to solve the problem by sending multiple messages, but it cannot fundamentally solve the problem. In fact, sending multiple messages will not only further increase the network load, but also consume the computing power of the controller, and the problem of message loss cannot be solved. Summary of the invention

[0003] Based on this, it is necessary to provide an event processing method, device, computer equipment, computer-readable storage medium and computer program product that can achieve reliable transmission between the first network device and the second network device, thereby avoiding message loss, in response to the above technical problems.

[0004] In a first aspect, the present application provides an event processing method, comprising:

[0005] When the current event processing cycle arrives, receiving event information and a mechanism identifier of the current event sent by the second network device; the event information and the mechanism identifier are sent by the second network device through a target communication mechanism in a middleware protocol R-SOME / IP based on a network interconnection protocol; the target communication mechanism is a mechanism indicated by the mechanism identifier;

[0006] In case the first network device successfully receives the event information, generating a confirmation message;

[0007] Determine the target communication mechanism indicated by the mechanism identifier, and send the confirmation message to the second network device through the target communication mechanism to indicate that the second network device determines that the first network device has successfully received the event information based on the confirmation message;

[0008] When the next event processing cycle arrives, the step of receiving the event information of the current event and the mechanism identifier sent by the second network device is returned and continued until a preset stop condition is reached.

[0009] In one embodiment, the target mechanism is a request and response communication mechanism;

[0010] After sending the confirmation message to the second network device through the target communication mechanism, the method further includes:

[0011] Configure response instructions for the event information;

[0012] Based on the configured response instruction, a first response message for the event information is sent to the second network device.

[0013] In one of the embodiments, the target mechanism is a notification mechanism;

[0014] The receiving event information and mechanism identifier of the current event sent by the second network device includes:

[0015] Sending first subscription event data to the second network device;

[0016] Receive the event information and mechanism identifier sent by the second network device when detecting that the first subscription event data is updated; wherein the event information carries the first subscription event data after the data update.

[0017] In one of the embodiments, the target mechanism is a field mechanism;

[0018] In the case where the field mechanism includes a request and response communication sub-mechanism, after sending the confirmation message to the second network device through the target communication mechanism, the method further includes:

[0019] Obtain a field value corresponding to the field mechanism, and generate a second response message based on the field value and the event information; configure a response instruction for the event information; and based on the configured response instruction, send the second response message to the second network device.

[0020] In one of the embodiments, the target mechanism is a field mechanism;

[0021] In the case where the field mechanism includes a notification sub-mechanism, the receiving event information of the current event and the mechanism identifier sent by the second network device includes:

[0022] Sending second subscription event data to the second network device, wherein the second subscription event includes an initial field value corresponding to the field mechanism;

[0023] Receive the event information and mechanism identifier sent by the second network device when detecting that the initial field value is updated; wherein the event information carries the updated field value.

[0024] In one of the embodiments, when the first network device successfully receives the event information, generating a confirmation message includes:

[0025] Get the transmission ID;

[0026] If the transmission identifier satisfies a preset reliability transmission identifier and the first network device successfully receives the event information, generating a confirmation message;

[0027] Among them, the preset reliability transmission identifier includes a first reliability transmission identifier and a second reliability transmission identifier; the first reliability transmission identifier is used to indicate that reliability transmission is performed between the second network device and the first network device in the current event processing cycle; the second reliability transmission identifier is used to indicate that reliability transmission is performed between the second network device and the first network device in all event processing cycles.

[0028] In one embodiment, the method further comprises:

[0029] In the case that the first network device fails to successfully receive the event information, the event information is received again by the second network device after a preset waiting time has expired, where the preset waiting time is no longer than an event processing cycle.

[0030] In a second aspect, the present application also provides an event processing device, including:

[0031] A first receiving module is used to receive event information and a mechanism identifier of a current event sent by a second network device when a current event processing cycle arrives; the event information and the mechanism identifier are sent by the second network device through a target communication mechanism in a middleware protocol R-SOME / IP based on a network interconnection protocol; the target communication mechanism is a mechanism indicated by the mechanism identifier;

[0032] A generating module, configured to generate a confirmation message when the first network device successfully receives the event information;

[0033] a determination module, configured to determine the target communication mechanism indicated by the mechanism identifier, and send the confirmation message to the second network device through the target communication mechanism to instruct the second network device to determine, based on the confirmation message, that the first network device has successfully received the event information;

[0034] The loop module is used to return to the step of receiving the event information and mechanism identifier of the current event sent by the second network device and continue to execute when the next event processing cycle arrives, until a preset stop condition is reached.

[0035] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of each embodiment when executing the computer program.

[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method of each embodiment when executed by a processor.

[0037] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the methods of each embodiment when executed by a processor.

[0038] The above-mentioned event processing method, device, computer equipment, computer-readable storage medium and computer program product, in this embodiment, when the current event processing cycle arrives, the event information and mechanism identification of the current event sent by the second network device are received; the event information and mechanism identification are sent by the second network device through the target communication mechanism in the middleware protocol R-SOME / IP based on the network interconnection protocol; the target communication mechanism is the mechanism indicated by the mechanism identification. When the first network device successfully receives the event information, a confirmation message is generated, the target communication mechanism indicated by the mechanism identification is determined, and a confirmation message is sent to the second network device through the target communication mechanism, that is, the first network device will feedback a confirmation message to the event information received from the second network device. When the next event processing cycle arrives, the step of receiving the event information and mechanism identification of the current event sent by the second network device is returned and continued to be executed until the preset stop condition is reached. It can be seen that the first network device of the present application scheme sends a confirmation message to the second network device, so that the second network device can clearly determine that the first network device has successfully received the event processing request, thereby realizing reliable transmission, thereby avoiding the loss of messages between the second network device and the first network device. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1A schematic diagram of a flow chart of an event processing method in an embodiment;

[0041] Figure 2 A schematic diagram of an application scenario of an event processing method in an embodiment;

[0042] Figure 3 A schematic diagram of an application scenario of an event processing method in another embodiment;

[0043] Figure 4 A schematic diagram of an application scenario of an event processing method in another embodiment;

[0044] Figure 5 A schematic diagram of an application scenario of an event processing method in another embodiment;

[0045] Figure 6 is a structural block diagram of an event processing device in an embodiment;

[0046] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] Reliable-scalable service-oriented middleware over IP is an IP-based middleware protocol used to implement communication between automotive electronic control units. It provides a standardized method that enables different automobile manufacturers and suppliers to develop and integrate software on the same platform and use UDP for reliable transmission.

[0049] In the application process of SOME / IP, due to the unreliability of UDP protocol, the time-consuming and long delay of transmission control protocol (TCP), and the defect of not supporting multicast, various problems occurred in the application process of SOME / IP. Therefore, a faster and more reliable SOME / IP is more in line with the requirements of the project. In this case, R-SOME / IP came into being. R-SOME / IP has the following characteristics:

[0050] (1) Service-oriented middleware;

[0051] (2) Use UDP for transmission, but with reliable transmission;

[0052] (3) It can support more event designs and has low protocol stack overhead;

[0053] (4) It can support more multicast designs and reduce bandwidth usage.

[0054] The comparison between SOME / IP and R-SOME / IP is as follows:

[0055] Transport layer protocol: SOME / IP supports TCP or UDP protocol, and R-SOME / IP supports UDP protocol; Reliability: SOME / IP uses TCP for reliable transmission and UDP for unreliable transmission; Protocol overhead: SOME / IP has a large overhead when using TCP protocol, a small overhead when using UDP protocol, and a small overhead when using R-SOME / IP; Bandwidth: SOME / IP occupies a large bandwidth when using TCP protocol, occupies a small bandwidth when using UDP protocol, and R-SOME / IP occupies a slightly larger bandwidth; Weak network connection: SOME / IP has poor weak network connection capability, and R-SOME / IP has strong weak network connection capability; Occupied port number: SOME / IP occupies port 30490, and R-SOME / IP occupies port 30491; Multicast or broadcast: SOME / IP does not support multicast / broadcast when using TCP protocol, but supports multicast or broadcast when using UDP protocol, and R-SOME / IP supports multicast / broadcast; Serialization / deserialization: SOME / IP is fixed serialization or deserialization, and R-SOME / IP supports XML format or JSON format, custom serialization and deserialization.

[0056] In one embodiment, Figure 1 As shown, an event processing method is provided. This embodiment takes the method applied to a terminal as an example. It can be understood that the method can also be applied to a first network device. In this embodiment, the method includes the following steps:

[0057] Step 102: When the current event processing cycle arrives, receive event information and a mechanism identifier of the current event sent by the second network device; the event information and the mechanism identifier are sent by the second network device through a target communication mechanism in the middleware protocol R-SOME / IP based on the network interconnection protocol; the target communication mechanism is the mechanism indicated by the mechanism identifier;

[0058] When the current event processing cycle arrives, the second network device obtains the current event from the event queue according to the order in which the events are arranged, the number of events in the event queue is multiple, and the first network device receives the event information and mechanism identifier of the current event sent by the second network device, which specifically includes the following situations:

[0059] The first network device may be a server, in which case the corresponding second network device is a client, and the event information refers to an event processing request sent by the client to the server;

[0060] The first network device may be a client, and the corresponding second network device may be a server. The event information refers to a parameter value of a transmission or update event.

[0061] The middleware protocol R-SOME / IP based on the network interconnection protocol includes four mechanisms, namely: request and response communication (RR) mechanism, fire and forget communication mechanism, notification mechanism and field mechanism. The target mechanism is one of the four mechanisms.

[0062] Step 104: When the first network device successfully receives the event information, a confirmation message is generated;

[0063] Step 106: determine the target communication mechanism indicated by the mechanism identifier, and send a confirmation message to the second network device through the target communication mechanism to instruct the second network device to determine that the first network device has successfully received the event information based on the confirmation message;

[0064] If the first network device has successfully received the event information, a confirmation message is generated and sent to the second network device through the target communication mechanism, so as to achieve reliable transmission between the first network device and the second network device. The second network device can determine that the first network device has successfully received the event information based on the confirmation message, so that the second network device can clearly know whether there is message loss between it and the first network device.

[0065] After receiving the event information, the first network device may process the event information and generate a corresponding processing result.

[0066] Step 108: When the next event processing cycle arrives, return to the step of receiving the event information of the current event and the mechanism identifier sent by the second network device and continue to execute until a preset stop condition is reached.

[0067] If the second network device does not receive the confirmation message sent by the first network device, the second network device can resend the event information to the first network device. If the second network device receives the confirmation message sent by the first network device, it means that the first network has successfully received the event information of the current event. When the next event processing cycle arrives, the second network device sends the event information of the next event and the mechanism identifier to the first network device, so that the first network device returns to the step of receiving the event information and mechanism identifier of the current event sent by the second network device and continues to execute until the preset stop condition is reached. It can be seen that the present application can ensure that the second network device successfully receives the event information of the current event in each event processing cycle, realizes the reliability transmission between the first network device and the second network device, and avoids the loss of messages.

[0068] The preset stop condition is: the current event is the last event in the event list.

[0069] In this embodiment, when the current event processing cycle arrives, the event information and mechanism identifier of the current event sent by the second network device are received; the event information and mechanism identifier are sent by the second network device through the target communication mechanism in the middleware protocol R-SOME / IP based on the network interconnection protocol; the target communication mechanism is the mechanism indicated by the mechanism identifier. When the first network device successfully receives the event information, a confirmation message is generated, the target communication mechanism indicated by the mechanism identifier is determined, and a confirmation message is sent to the second network device through the target communication mechanism, that is, the first network device will feedback a confirmation message to the event information received from the second network device, and when the next event processing cycle arrives, the step of receiving the event information and mechanism identifier of the current event sent by the second network device is returned and continued to be executed until the preset stop condition is reached. It can be seen that the first network device of the present application scheme sends a confirmation message to the second network device to ensure that the second network device can clearly determine that the first network device has successfully received the event processing request, thereby achieving reliable transmission, thereby avoiding the loss of messages between the second network device and the first network device.

[0070] In actual applications, the target mechanism can be a request and response communication mechanism. Therefore, in one embodiment, the target mechanism is a request and response communication mechanism; after sending the confirmation message to the second network device through the target communication mechanism, the method also includes: configuring a response instruction for the event information; based on the configured response instruction, sending a first response message for the event information to the second network device.

[0071] like Figure 2As shown, for the case where the target mechanism is the RR mechanism, the first network device refers to the server, the second network device refers to the client, and the interaction process between the client and the server is shown in the figure. The specific application scheme is:

[0072] The server receives the event processing request (request) and mechanism identifier of the current event sent by the client. If the server has successfully received the event processing request, it generates a confirmation message (req-ack) and sends the confirmation message to the client. The server configures the response instruction for the event information and sends the first response message (response) for the event information to the client based on the configured response instruction.

[0073] The client needs to configure: a unique request ID, the information type is set to the request type, and the return code is set to 0x00.

[0074] The server needs to be configured as follows: the request ID is matched to the client, the information type is set to response or error, and the return code is set to the calling method code or error code.

[0075] In practical applications, the target mechanism can be a fire and forget communication mechanism; Figure 3 As shown, the first network device refers to the server, and the second network device refers to the client. The specific application scheme is:

[0076] The server receives the event processing request (request) and mechanism identifier of the current event sent by the client. If the server has successfully received the event processing request, it generates a confirmation message, corresponding to the request acknowledge character (req-ack) in the figure, and sends the confirmation message to the client. Under this mechanism, the server does not need to send a response message to the client for the event information.

[0077] The client needs to configure: a unique request ID, a message ID to identify the method to be called, the message type is set to "REQUEST_NO_RETURN", the return code is 0x00, and error handling is performed on the application side.

[0078] In actual applications, the target mechanism can be a notification mechanism. Therefore, in one embodiment, the target mechanism is a notification mechanism; the event information and mechanism identifier of the current event received from the second network device include: sending the first subscription event data to the second network device; receiving the event information and mechanism identifier sent by the second network device when it detects that the first subscription event data is updated; wherein the event information carries the first subscription event data after the data is updated.

[0079] Reference Figure 4 In this embodiment, the target mechanism is a notification mechanism, the event is sent from the server to the client (corresponding to the event from S to C in the figure, S represents the server, C represents the client), the first network device is the client, and the second network device is the server. Figure 4 , this application plan is:

[0080] The client sends the first subscription event data to the server, corresponding to the subscription event (subscribe onevent) in the figure. The server returns a confirmation message to the client that the first subscription event data has been successfully received. The confirmation message corresponds to the subscription acknowledgement character (sub-ack) in the figure. When the server detects that the first subscription event data has been updated, it sends an update event to the client, corresponding to the event (Event) and mechanism identifier in the figure. If the client has successfully received the update event, it generates a confirmation message, corresponding to the event acknowledgement character (eventacknowledge character, event-ack) in the figure, and sends the confirmation message to the server. If the event is updated again later, the server sends the update event to the client again. After the client successfully receives the update event, it sends a confirmation message to the server.

[0081] SOME / IP only transmits or updates parameter values, and the notification mechanism is implemented in SOME / IP SD. The message identifier event, the client representation is set to 0x00, the message type is set to notification, and the return code is set to 0x00.

[0082] Reference Figure 5 , when the target mechanism is a field mechanism, the specific application scheme is:

[0083] In one of the embodiments, when the field mechanism includes request and response communication sub-mechanisms, after sending the confirmation message to the second network device through the target communication mechanism, the method also includes: obtaining a field value corresponding to the field mechanism, generating a second response message based on the field value and the event information; configuring a response instruction for the event information; and sending a second response message to the second network device based on the configured response instruction.

[0084] In the case where the field mechanism includes request and response communication sub-mechanisms, the specific implementation of the present application is similar to the case where the above target mechanism is a request and response communication mechanism. The first network device refers to the server, and the second network device refers to the client. The specific implementation of the present application is:

[0085] The server receives the event processing request for the current event (corresponding to the getter in the figure) and the mechanism identifier sent by the client. If the server has successfully received the event processing request, it generates a confirmation message (getter acknowledge character, getter_ack) and sends the confirmation message to the client.

[0086] The server obtains a field value of the field mechanism, generates a second response message based on the field value and the event processing request, configures a response instruction for the event information on the server side, and sends a second response message to the client based on the configured response instruction.

[0087] In this embodiment, the field value appears in the payload of the second response message.

[0088] In one of the embodiments, when the field mechanism includes a setter mechanism, the first network device refers to the server, and the second network device refers to the client. The specific solution of the present application is: the server receives the event processing request (corresponding to the setter in the figure) and the mechanism identifier of the current event sent by the client. If the server has successfully received the event processing request, it generates a confirmation message (getter_ack) and sends the confirmation message to the client.

[0089] Under the setter mechanism, you can configure the response instructions for the event processing request on the server side. The server obtains the field value of the field mechanism, generates a response message based on the field value and the event processing request, configures the response instructions for the event information on the server side, and sends a response message to the client based on the configured response instructions. The field value that needs to be set appears in the response message.

[0090] Under the setter mechanism, the server may not respond to the request sent by the client, and the field value to be set must appear in the event processing request.

[0091] In one embodiment, the target mechanism is a field mechanism; when the field mechanism includes a notification sub-mechanism, the receiving event information and mechanism identifier of the current event sent by the second network device includes: sending second subscription event data to the second network device, the second subscription event including the initial field value corresponding to the field mechanism; receiving the event information and mechanism identifier sent by the second network device when it detects that the initial field value is updated; wherein the event information carries the updated field value.

[0092] In this embodiment, the first network device is a client, the second network device is a server, and the application scheme is:

[0093] The client sends the second subscription event data to the server, corresponding to the subscription for a field value (subscribefor a field) in the figure. The second subscription event includes the initial field value. The server returns a sub-ack to the client indicating that the second subscription event data has been successfully received. When the server detects that the initial field value has been updated, it sends event information to the client, corresponding to the event update (event_on change) and mechanism identifier in the figure. The event information carries the updated field value. If the client has successfully received the update event, it generates a confirmation message, corresponding to the event-ack in the figure, and sends the confirmation message to the server. If the field value is updated again later, the server sends the updated field value to the client again. After the client successfully receives the updated field value, it sends a confirmation message to the server.

[0094] In the above embodiments, the reliability transmission process between the first network device and the second network device is discussed in detail for four target mechanisms, which can achieve reliability transmission under different mechanisms, thereby avoiding message loss between the first network device and the second network device.

[0095] In one of the embodiments, it is characterized in that when the first network device successfully receives the event information, a confirmation message is generated, including: obtaining a transmission identifier; when the transmission identifier satisfies a preset reliability transmission identifier and the first network device successfully receives the event information, a confirmation message is generated; wherein the preset reliability transmission identifier includes a first reliability transmission identifier and a second reliability transmission identifier; the first reliability transmission identifier is used to indicate that reliability transmission is performed between the second network device and the first network device in the current event processing cycle; the second reliability transmission identifier is used to indicate that reliability transmission is performed between the second network device and the first network device in all event processing cycles.

[0096] In this embodiment, the first network device may also obtain a transmission identifier, which may be a first reliability transmission identifier, used to indicate that reliability transmission is performed between the second network device and the first network device in the current event processing cycle, that is, in the current event processing cycle, if the first network device has successfully received the event information, it is necessary to generate and send a confirmation message to the second network device;

[0097] The transmission identifier may be a second reliability transmission identifier, which is used to indicate that reliability transmission is performed between the second network device and the first network device in all event processing cycles, that is, in all current event processing cycles, if the first network device has successfully received the event information, a confirmation message needs to be generated and sent to the second network device;

[0098] If the transmission identifier does not meet the preset reliability transmission identifier, it means that all event processing cycles do not support reliability transmission. The first device does not need to generate and send a confirmation message to the second network device.

[0099] In this embodiment, it can be flexibly set which one, several or all current event processing cycles are to be transmitted with reliability, thus ensuring the flexibility of solution execution.

[0100] In one of the embodiments, the method further includes: when the first network device fails to successfully receive the event information, receiving the event information sent again by the second network device after a preset waiting time has expired, and the preset waiting time is no greater than an event processing cycle.

[0101] If the current event processing cycle supports reliable transmission, if the first network device fails to successfully receive the event information, after the preset waiting time is reached, the second network device sends the event information to the first network device again until the first network device successfully receives the event information. After the first network device successfully receives the event information, it generates and sends a confirmation message to the second network device. After the second network device receives the confirmation message, it will process subsequent events in the event list to avoid message loss.

[0102] It can be seen that if the second network device of the present application does not receive the confirmation message sent by the first network device, it will send event information to the first network device again until it receives the confirmation message sent by the first network device, thereby ensuring the reliability of transmission between the first network device and the second network device and avoiding message loss.

[0103] Based on the same inventive concept, the embodiment of the present application also provides an event processing device for implementing the event processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more event processing device embodiments provided below can refer to the limitations on the event processing method above, and will not be repeated here.

[0104] In an exemplary embodiment, Figure 6 As shown, an event processing device 600 is provided, comprising:

[0105] The first receiving module 601 is used to receive event information and a mechanism identifier of a current event sent by a second network device when a current event processing cycle arrives; the event information and the mechanism identifier are sent by the second network device through a target communication mechanism in a middleware protocol R-SOME / IP based on a network interconnection protocol; the target communication mechanism is a mechanism indicated by the mechanism identifier;

[0106] A generating module 602 is used to generate a confirmation message when the first network device successfully receives the event information;

[0107] A determination module 603 is used to determine the target communication mechanism indicated by the mechanism identifier, and send the confirmation message to the second network device through the target communication mechanism to indicate that the second network device determines that the first network device has successfully received the event information based on the confirmation message;

[0108] The loop module 604 is used to return to the step of receiving the event information and the mechanism identifier of the current event sent by the second network device and continue to execute when the next event processing cycle arrives, until a preset stop condition is reached.

[0109] In one embodiment, the target mechanism is a request and response communication mechanism;

[0110] The device also includes a configuration module and a sending module; after the determination module 403 sends the confirmation message to the second network device through the target communication mechanism;

[0111] A configuration module, used to configure a response instruction for the event information;

[0112] A sending module is used to send a first response message for the event information to the second network device based on the configured response instruction.

[0113] In one of the embodiments, the target mechanism is a notification mechanism;

[0114] When receiving the event information and the mechanism identifier of the current event sent by the second network device, the first receiving module 401 is specifically used to:

[0115] Sending first subscription event data to the second network device;

[0116] Receive the event information and mechanism identifier sent by the second network device when detecting that the first subscription event data is updated; wherein the event information carries the first subscription event data after the data update.

[0117] In one of the embodiments, the target mechanism is a field mechanism;

[0118] The apparatus further comprises an acquisition module; the determination module 603, in the case where the field mechanism comprises a request and response communication sub-mechanism, after the confirmation message is sent to the second network device through the target communication mechanism;

[0119] An acquisition module, used for acquiring a field value corresponding to the field mechanism, and generating a second response message based on the field value and the event information;

[0120] The configuration module is further used to configure response instructions for the event information;

[0121] The sending module is also used to send the second response message to the second network device based on the configured response instruction.

[0122] In one of the embodiments, the target mechanism is a field mechanism;

[0123] In the case where the field mechanism includes a notification sub-mechanism, the first receiving module 601, when receiving the event information of the current event and the mechanism identifier sent by the second network device, is specifically used to:

[0124] Sending second subscription event data to the second network device, wherein the second subscription event includes an initial field value corresponding to the field mechanism;

[0125] Receive the event information and mechanism identifier sent by the second network device when detecting that the initial field value is updated; wherein the event information carries the updated field value.

[0126] In one embodiment, the generating module 402 is specifically used to: obtain a transmission identifier; if the transmission identifier satisfies a preset reliability transmission identifier and the first network device successfully receives the event information, generate a confirmation message;

[0127] Among them, the preset reliability transmission identifier includes a first reliability transmission identifier and a second reliability transmission identifier; the first reliability transmission identifier is used to indicate that reliability transmission is performed between the second network device and the first network device in the current event processing cycle; the second reliability transmission identifier is used to indicate that reliability transmission is performed between the second network device and the first network device in all event processing cycles.

[0128] In one embodiment, the device also includes a second receiving module; the second receiving module is used to receive the event information sent again by the second network device after a preset waiting time is reached when the first network device fails to successfully receive the event information, and the preset waiting time is not greater than the event processing cycle.

[0129] Each module in the above event processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0130] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data of the event processing method. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the event processing method is implemented.

[0131] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0132] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0133] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0134] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0135] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0136] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0137] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0138] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An event processing method, characterized in that: Applied to a first network device, the method comprises: When the current event processing cycle arrives, receiving event information and a mechanism identifier of the current event sent by the second network device; the event information and the mechanism identifier are sent by the second network device through a target communication mechanism in a middleware protocol R-SOME / IP based on a network interconnection protocol; the target communication mechanism is a mechanism indicated by the mechanism identifier; In case the first network device successfully receives the event information, generating a confirmation message; Determine the target communication mechanism indicated by the mechanism identifier, and send the confirmation message to the second network device through the target communication mechanism to indicate that the second network device determines that the first network device has successfully received the event information based on the confirmation message; When the next event processing cycle arrives, the step of receiving the event information of the current event and the mechanism identifier sent by the second network device is returned and continued until a preset stop condition is reached.

2. The method according to claim 1, characterized in that The target mechanism is a request and response communication mechanism; After sending the confirmation message to the second network device through the target communication mechanism, the method further includes: Configure response instructions for the event information; Based on the configured response instruction, a first response message for the event information is sent to the second network device.

3. The method according to claim 1, characterized in that: The target mechanism is a notification mechanism; The receiving event information and mechanism identifier of the current event sent by the second network device includes: Sending first subscription event data to the second network device; Receive the event information and mechanism identifier sent by the second network device when detecting that the first subscription event data is updated; wherein the event information carries the first subscription event data after the data update.

4. The method according to claim 1, characterized in that: The target mechanism is a field mechanism; In the case where the field mechanism includes a request and response communication sub-mechanism, after sending the confirmation message to the second network device through the target communication mechanism, the method further includes: Obtain a field value corresponding to the field mechanism, and generate a second response message based on the field value and the event information; configure a response instruction for the event information; and based on the configured response instruction, send the second response message to the second network device.

5. The method according to claim 1, characterized in that The target mechanism is a field mechanism; In the case where the field mechanism includes a notification sub-mechanism, the receiving event information of the current event and the mechanism identifier sent by the second network device includes: Sending second subscription event data to the second network device, wherein the second subscription event includes an initial field value corresponding to the field mechanism; Receive the event information and mechanism identifier sent by the second network device when detecting that the initial field value is updated; wherein the event information carries the updated field value.

6. The method according to any one of claims 1 to 5, characterized in that The generating a confirmation message when the first network device successfully receives the event information includes: Get the transmission ID; If the transmission identifier satisfies a preset reliability transmission identifier and the first network device successfully receives the event information, generating a confirmation message; Among them, the preset reliability transmission identifier includes a first reliability transmission identifier and a second reliability transmission identifier; the first reliability transmission identifier is used to indicate that reliability transmission is performed between the second network device and the first network device in the current event processing cycle; the second reliability transmission identifier is used to indicate that reliability transmission is performed between the second network device and the first network device in all event processing cycles.

7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: In the case that the first network device fails to successfully receive the event information, the event information is received again by the second network device after a preset waiting time has expired, where the preset waiting time is no longer than an event processing cycle.

8. An event processing device, characterized in that: The device comprises: A first receiving module is used to receive event information and a mechanism identifier of a current event sent by a second network device when a current event processing cycle arrives; the event information and the mechanism identifier are sent by the second network device through a target communication mechanism in a middleware protocol R-SOME / IP based on a network interconnection protocol; the target communication mechanism is a mechanism indicated by the mechanism identifier; A generating module, configured to generate a confirmation message when the first network device successfully receives the event information; a determination module, configured to determine the target communication mechanism indicated by the mechanism identifier, and send the confirmation message to the second network device through the target communication mechanism to instruct the second network device to determine, based on the confirmation message, that the first network device has successfully received the event information; The loop module is used to return to the step of receiving the event information and mechanism identifier of the current event sent by the second network device and continue to execute when the next event processing cycle arrives, until a preset stop condition is reached.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.