Asynchronous event management system, method, device and storage medium for multi-standard platform
Through an asynchronous event management system for multiple standard platforms, multi-platform parallel processing and data fusion are realized, solving the problems of inefficient data and poor monitoring in the existing technology, and improving the efficiency, reliability and adaptability of vehicle data transmission.
Patent Information
- Application Number
- CN202411886454.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-20
AI Technical Summary
The existing technology relies on a synchronous upload mechanism, resulting in low data efficiency during multi-platform interactions, unable to support multiple application scenarios, and monitoring of the data transmission process is relatively simple, and there is a lack of precise control of the connection status, reception status and transmission status.
It provides an asynchronous event management system for multiple standard platforms. Through the platform acquisition module, callback function configuration module, asynchronous operation module and data fusion storage module, realizes parallel processing and data fusion of multi-platforms, configures callback functions for connection status, reception status and sending status, runs these callback functions asynchronously to obtain written data, and stores data through the data fusion storage module.
It improves the efficiency, accuracy and reliability of vehicle data transmission, supports a variety of application scenarios, enhances the ability to adapt to different platform states and data needs, optimizes storage space and management efficiency, and reduces the storage of redundant data.
Smart Images

Figure CN119342101B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle data transmission, and in particular to an asynchronous event management system, method, device and storage medium for a multi-standard platform. Background Art
[0002] In modern vehicle management systems, vehicle data transmission is the basis for realizing key functions such as Internet of Vehicles, intelligent transportation, and remote diagnosis. As a standardized data transmission method, the Ministry Standard Protocol upload is widely used in the communication between vehicles and platforms to support the management and monitoring of vehicle data.
[0003] The current upload of the ministerial standard protocol adopts a synchronous upload mechanism, and the data transmission between the vehicle and the platform relies on a single upload channel. When multiple platforms are running at the same time, the connection between the vehicle and each platform, data transmission and reception need to be processed one by one in sequence. This synchronization method leads to low upload efficiency. Once a platform has a network problem or delay, the entire upload process will be blocked, affecting the real-time performance of data transmission. In addition, the existing methods are relatively simple in monitoring the data transmission process, usually only judging whether the data is successfully transmitted, and lack precise control and detailed monitoring of the connection status, receiving status and sending status. This limitation makes it difficult to locate the problem and increases the unreliability and maintenance cost of data transmission. Summary of the invention
[0004] The present application provides an asynchronous event management system, method, device and storage medium for multiple departmental standard platforms, which solves the technical problem that the prior art relies on a synchronous upload mechanism for data transmission, resulting in low data efficiency when multiple platforms interact and can only support a single application scenario. It achieves the technical effect of improving the efficiency, accuracy and reliability of vehicle data transmission while meeting the needs of multiple application scenarios.
[0005] In view of the above problems, on the one hand, the present application provides an asynchronous event management system for multiple departmental standard platforms, which is communicatively connected to the multiple departmental standard platforms, including: a platform acquisition module, which is used to obtain the first departmental standard platform in a communication-ready state when a recovery instruction of the first departmental standard platform is received; a callback function configuration module, which is used to configure a connection status callback function, a receiving status callback function and a sending status callback function; a first asynchronous operation module, which is used to asynchronously run the connection status callback function, the receiving status callback function and the sending status callback function on the first departmental standard platform to obtain the first write data; an Nth asynchronous operation module, which is used to asynchronously run the connection status callback function, the receiving status callback function and the sending status callback function on the Nth departmental standard platform to obtain the Nth write data; a data fusion storage module, which is used to take the union data of the first write data to the Nth write data, obtain the fused write data for storage.
[0006] On the other hand, the present application also provides an asynchronous event management method for multiple departmental standard platforms, which is applied to an asynchronous event management system for multiple departmental standard platforms, including: when a recovery instruction from a first departmental standard platform is received, obtaining the first departmental standard platform in a communication-ready state; configuring a connection status callback function, a receiving status callback function, and a sending status callback function; asynchronously running the connection status callback function, the receiving status callback function, and the sending status callback function on the first departmental standard platform to obtain first write data; until the connection status callback function, the receiving status callback function, and the sending status callback function are asynchronously run on the Nth departmental standard platform to obtain the Nth write data; taking the union data of the first write data until the Nth write data, obtaining the fused write data for storage.
[0007] In a third aspect, the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the execution steps in the above-mentioned asynchronous event management system for a multi-department standard platform when executing the computer program.
[0008] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the execution steps in the above-mentioned asynchronous event management system for a multi-standard platform are implemented.
[0009] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0010] When receiving the recovery instruction of the first departmental standard platform, the platform acquisition module obtains the first departmental standard platform in the state of preparing for communication, providing a feasible platform foundation for subsequent data transmission and ensuring that subsequent communication can proceed smoothly. The callback function configuration module configures the connection state callback function, the receiving state callback function and the sending state callback function, providing specific implementation means for the real-time response of each subsequent departmental standard platform, and improving the refinement of subsequent data processing and state management. The first asynchronous operation module and the Nth asynchronous operation module asynchronously run the connection state callback function, the receiving state callback function and the sending state callback function on multiple departmental standard platforms respectively to obtain write data, so that the communication and data transmission with multiple departmental standard platforms can be processed in parallel, avoiding the communication of other platforms affected by the processing blockage of a single platform, and improving the data transmission response speed. At the same time, through multiple callback functions, the interaction status between the vehicle and the departmental standard platform can be carefully monitored. Whether it is the stability of the connection link, whether the data is correctly received or whether the transmission is successful, it can be accurately located through the corresponding callback function, and problems in the data transmission process can be discovered and solved in time to ensure the reliability of data interaction. The data fusion storage module takes the union data of the first written data to the Nth written data, obtains the fused written data for storage, avoids duplicate storage of data, saves storage space, and reduces the complexity of subsequent data management.
[0011] In summary, this application realizes multi-platform parallel processing in the process of uploading the vehicle departmental standard protocol through the coordinated operation of the above-mentioned modules. Asynchronous operation module. Asynchronous processing and parallel execution improve the speed of data interaction between vehicles and multiple platforms, shorten the response time, and avoid delays and blockages in traditional synchronous operations; the flexible callback mechanism ensures the reliability of data interaction through comprehensive status monitoring, and enhances the adaptability to different platform status and data requirements; data fusion storage effectively integrates data from different platforms, optimizes storage space and management efficiency, and reduces the storage of redundant data. On the whole, this solution improves the transmission efficiency, reliability and flexibility of vehicle data transmission, and provides a more efficient, accurate and scalable solution for vehicle communication management.
[0012] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A schematic diagram of the structure of an asynchronous event management system for a multi-standard platform provided in an embodiment of the present application.
[0014] Figure 2A schematic diagram of a process for obtaining first write data in an asynchronous event management system for a multi-standard platform provided in an embodiment of the present application.
[0015] Figure 3 A flowchart of an asynchronous event management method for a multi-standard platform provided in an embodiment of the present application.
[0016] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0017] Explanation of the accompanying drawings: platform acquisition module 10, callback function configuration module 20, first asynchronous operation module 30, Nth asynchronous operation module 40, data fusion storage module 50, bus 300, receiver 301, processor 302, transmitter 303, memory 304, bus interface 305. DETAILED DESCRIPTION
[0018] The embodiments of the present application provide an asynchronous event management system, method, device and storage medium for multiple standard platforms. By introducing asynchronous event management, multi-platform parallel processing and flexible configuration of callback functions, the technical problem that the prior art relies on a synchronous upload mechanism for data transmission, resulting in low data efficiency during multi-platform interaction and only supporting a single application scenario is solved, thereby achieving the technical effect of improving the efficiency, accuracy and reliability of vehicle data transmission and meeting the requirements of multiple application scenarios. It should be noted that the multiple standard platforms described in the embodiments of the present application all refer to the terminal communication protocol platform of the road transport vehicle satellite positioning system.
[0019] Embodiment 1, as Figure 1 As shown, the embodiment of the present application provides an asynchronous event management system for a multi-standard platform, the system comprising:
[0020] The platform acquisition module 10 is used to obtain the first platform in a communication-ready state upon receiving a recovery instruction of the first platform.
[0021] Specifically, before the embodiment of the present application starts working, the user enters the name of the corresponding platform, the address of the TCP server, the port number and other basic information in the application, and adds multiple departmental standard platforms. These departmental standard platforms are platforms for receiving, processing and storing data information from vehicle terminals. Departmental standard platforms usually communicate with vehicle systems according to standard protocols (such as JT / T808).
[0022] The recovery instruction is a control instruction used to instruct the system or module to restore to a previous state or perform a previous operation. The platform acquisition module 10 receives the recovery instruction sent by the first departmental standard platform, obtains relevant information of the platform, such as IP address, port number, connection channel, etc., checks the status of the first departmental standard platform, and ensures that it is in a communication-ready state, so as to establish a connection with the departmental standard platform and exchange data, and obtain the required data or services.
[0023] The callback function configuration module 20 is used to configure a connection status callback function, a receiving status callback function and a sending status callback function.
[0024] Specifically, after the departmental standard platform is in the communication preparation state, that is, after establishing communication with multiple departmental standard platforms, the callback function configuration module 20 configures three different callback functions: connection state callback function, receiving state callback function and sending state callback function. These callback functions are used to process the state changes of the vehicle system and the departmental standard platform, including connection state, receiving state and sending state. Among them, the connection state callback function is used to monitor the connection state with the departmental standard platform. Through this function, you can be notified when the connection is successful, failed or interrupted, and perform corresponding processing measures. For example, when the departmental standard platform is successfully connected, the connection state callback function will be triggered to notify the system that the connection is successful; if the connection fails, the callback function will inform the system to retry. The receiving state callback function is used to monitor the state of data reception. When data is received from the departmental standard platform, the callback function will be triggered. According to whether the received data is valid, the system is reminded to perform further processing, such as storing data or sending a confirmation message. The sending state callback function is used to monitor the state of data sending. When sending data to the departmental standard platform, the sending state callback function will be triggered to notify the system whether the data is successfully sent or problems (such as network failures) occur during the sending process. For example, after the system sends vehicle status data to the departmental standard platform, the sending status callback function will notify the system whether the data is successfully transmitted. If it fails, it may be necessary to retry sending or record the failure information.
[0025] By configuring these callback functions, it is possible to accurately control and respond to changes in the communication status between the vehicle system and the departmental standard platform, ensuring that corresponding actions are taken in a timely manner when different communication events occur.
[0026] The first asynchronous operation module 30 is used to asynchronously execute the connection status callback function, the receiving status callback function and the sending status callback function on the first standard platform to obtain first write data.
[0027] Specifically, the first asynchronous operation module 30 establishes a connection with the first standard platform, and calls the connection status callback function when connected, and executes subsequent processing logic according to the connection status. For example, if the connection status callback function determines that the connection is successful, data interaction is performed with the first standard platform; if the connection status callback function determines that the connection fails, the connection will be retried. When receiving data from the first standard platform, the first asynchronous operation module 30 triggers the receiving status callback function to independently verify and process the data. When sending data to the first standard platform, the first asynchronous operation module 30 will start the sending status callback function to monitor the results of data sending. If the sending fails, the sending will be retried through the sending status callback function to ensure that the data can be transmitted smoothly. The first asynchronous operation module 30 obtains the final data (i.e., the first write data) after verification and processing through interaction with the first standard platform and prepares for storage.
[0028] When the first asynchronous operation module 30 is connected and performs data exchange operations with the first standard platform, an asynchronous processing mechanism is adopted, that is, other operations will not be suspended during the execution process. For example, data processing of other platforms can continue to be performed to avoid waste of resources.
[0029] The Nth asynchronous operation module 40 is used to asynchronously execute the connection status callback function, the receiving status callback function and the sending status callback function on the Nth standard platform to obtain the Nth written data.
[0030] Specifically, during the use of the vehicle, it is necessary to communicate with multiple departmental standard platforms in parallel. Due to the uncertainty of the departmental standard platforms, N is used in the embodiment of the present application to refer to the number of departmental standard platforms that need to perform data transmission interaction. Wherein N is a positive integer. In the system described in the embodiment of the present application, an asynchronous operation module is configured for each departmental standard platform.
[0031] Similar to the first asynchronous operation module 30, the Nth asynchronous operation module 40 also handles the connection and data interaction with the Nth standard platform in an asynchronous manner, calls the connection status callback function, the receiving status callback function and the sending status callback function, obtains the Nth write data and prepares for storage.
[0032] The first asynchronous operation module 30 and the Nth asynchronous operation module 40 use an asynchronous processing mechanism to enable the system to exchange data and monitor status with multiple departmental standard platforms in parallel, avoiding the waiting and blocking problems that may occur in the traditional synchronization method. By independently executing each callback function, the response speed and concurrency can be improved when processing communications with different platforms, thereby improving the overall data processing efficiency and transmission reliability.
[0033] The data fusion storage module 50 is used to obtain the union data of the first written data to the Nth written data, and obtain the fused written data for storage.
[0034] Specifically, the data fusion storage module 50 receives the write data of each asynchronous operation module, that is, the first write data to the Nth write data. Then, the multiple groups of write data are merged, all elements in these data are integrated together, and duplicate parts are removed to form a new data set containing all the write data, that is, the fused write data. The fused write data is stored.
[0035] Through the above data fusion method, reliable data support is provided for subsequent possible data analysis, vehicle management and real-time monitoring. At the same time, data redundancy is eliminated, storage space waste is reduced, and data management efficiency is improved.
[0036] Further, such as Figure 2 As shown, the first asynchronous operation module 30 in the embodiment of the present application is also used to perform the following steps:
[0037] Step P31: performing a connection status callback on the first part platform according to the connection status callback function to obtain a first callback result.
[0038] Step P32: At the same time, the receiving status callback is performed on the first part standard platform according to the receiving status callback function to obtain a second callback result.
[0039] Step P33: At the same time, the sending status callback is performed on the first part label platform according to the sending status callback function to obtain a third callback result.
[0040] Step P34: Perform asynchronous judgment according to the first callback result and the second callback result to obtain the first write data.
[0041] Step P35: Perform asynchronous judgment according to the first callback result and the third callback result, and execute a callback loop.
[0042] Specifically, the first asynchronous operation module 30 calls the connection status callback function to monitor the connection process with the first part standard platform, and generates a first callback result reflecting the connection status of the vehicle system and the first part standard platform. If the connection is successful, the connection status callback function returns a connection success result, such as "connected"; if the connection fails, the connection status callback function returns a connection failure result, such as "disconnected".
[0043] After the connection is successful, the system will enter the state of receiving data. The first asynchronous operation module 30 calls the receiving state callback function to monitor the receiving process, check whether the data received from the first standard platform is complete and valid, and generate a second callback result reflecting the data receiving state. If the reception is successful, the callback result of successful reception is returned, such as "data reception is successful"; if the reception fails, the callback result of failed reception is returned, such as "data reception fails".
[0044] While receiving data, it may also be necessary to send data to the first standard platform. At this time, the first asynchronous operation module 30 calls the sending status callback function to monitor the sending process, and returns the result indicating the data sending status after the sending is completed, that is, the third callback result. If the data is successfully sent, the result of successful sending is returned, such as "successful sending"; if the sending fails, the result of failed sending is returned, such as "sending interrupted" or "sending failed".
[0045] After obtaining the first callback result and the second callback result, the first asynchronous operation module 30 performs asynchronous judgment. When the first callback result indicates that the connection is successful and the second callback result indicates that the data is successfully received, the relevant data is extracted from the receiving buffer as the first write data.
[0046] The first asynchronous operation module 30 performs asynchronous judgment and executes a callback loop according to the first callback result and the third callback result. Assuming that the first callback result is a successful connection but the third callback result is a sending failure, the callback loop may re-execute the sending status callback function and try to resend the data.
[0047] The first asynchronous operation module 30 ensures smooth communication with the first standard platform and efficient data processing by executing callback functions of connection status, receiving status and sending status. By asynchronously judging the callback result, it can decide whether to continue data exchange or retry the operation according to different situations, thereby ensuring data reliability. The callback loop mechanism ensures that in abnormal situations such as sending failure, it can automatically recover and maintain continuous communication.
[0048] Further, step P34 includes:
[0049] Step P341: When the first callback result is a successful connection and the second callback result is a successful reception, the first write data is obtained and the next event is executed at the same time.
[0050] Step P342: When the first callback result is a connection failure, the connection status callback function is executed cyclically to automatically reconnect to the first standard platform.
[0051] Step P343: When the first callback result is a successful connection, and the second callback result is a reception failure, the reception status callback function is executed in a loop to perform a reception status callback on the first part standard platform.
[0052] Specifically, check the first callback result and the second callback result. When the first callback result is a successful connection and the second callback result is a successful reception, it means that the vehicle system has established a connection with the first standard platform and successfully received data from the first standard platform. At this time, extract the received data from the receive buffer as the first write data and prepare to store it. Then prepare to execute the next event, such as updating the status, processing other requests, or preparing new data. After extracting the data in the receive buffer, initialize the data buffer and ensure that the previous data will not interfere with subsequent operations to avoid reading wrong data.
[0053] When the first callback result is a connection failure, it means that the vehicle system has failed to establish an effective connection with the first standard platform, which may be due to network failure, platform server failure, etc. In this case, the module triggers the reconnection logic, initializes the network connection parameters, determines the minimum and maximum reconnection delays, tries different network ports or adjusts the relevant settings of the network protocol to retry to establish a connection with the first standard platform, and repeatedly calls the connection status callback function to judge the connection status. The reconnection process will continue until the connection status callback function shows that the connection is successful.
[0054] When the first callback result is a successful connection, but the second callback result is a failed reception, it means that the vehicle system is connected to the first standard platform normally, but there is a problem in the data reception process. This may be due to interference during data transmission, data format errors, or problems with data sent by the platform. In this case, the module triggers the re-receiving mechanism and tries to re-receive data by adjusting the buffer size of the received data, resetting the format of the data reception, or checking the verification mechanism of the data reception. At the same time, the receiving status callback function is repeatedly executed during the re-receiving process until the data is successfully received.
[0055] The first asynchronous operation module 30 judges the connection status and the receiving status, and when problems occur in the connection and data reception process, it automatically starts the reconnection mechanism or repeatedly tries to re-receive data to ensure that the valid first write data can be received, thereby adapting to various network or communication problems, improving the stability and reliability of data transmission, and avoiding connection interruption and data loss.
[0056] Further, step P35 includes:
[0057] Step P351: When the first callback result is a successful connection and the third callback result is a successful sending, execute the next event.
[0058] Step P352: When the first callback result is a connection failure, the connection status callback function is executed cyclically to automatically reconnect to the first standard platform.
[0059] Step P353: When the first callback result is a successful connection, and the third callback result is a sending failure, the sending status callback function is executed in a loop to perform a sending status callback on the first part label platform.
[0060] Specifically, when the first callback result is a successful connection and the third callback result is a successful transmission, it means that the vehicle system has established a connection with the first standard platform and successfully sent data to the first standard platform. At this time, the next event is executed, such as continuing to send other data, receiving new instructions, or performing other operations related to the system process.
[0061] When the first callback result is a connection failure, similar to step P342, the module triggers the automatic reconnection mechanism and cyclically calls the connection status callback function to automatically reconnect to the first tag platform until the connection is successful.
[0062] When the first callback result is a successful connection, but the third callback result is a sending failure, it means that the vehicle system is connected to the first standard platform normally, but there is a problem in the data sending process. At this time, the module triggers the resending mechanism and tries to send data again by adjusting the format of the sent data, rechecking the status of the sending buffer, adjusting the sending frequency, or checking the verification mechanism of the data sending. At the same time, the sending status callback function is called cyclically during the sending process to call back the sending status of the first standard platform until the data is successfully sent.
[0063] The above process is similar to the data sending process. By judging the connection status and sending status, when problems occur in the connection and data sending process, the automatic reconnection mechanism or the sending status callback loop mechanism is started to ensure that the vehicle data can be successfully sent to the first standard platform.
[0064] Furthermore, the Nth asynchronous operation module 40 in the embodiment of the present application is further configured to perform the following steps:
[0065] Step P41: Obtain a first event write data attribute set.
[0066] Step P42: performing attribute comparison on the first written data to the N-1th written data according to the first event written data attribute set to obtain a first missing data attribute set.
[0067] Step P43: Asynchronously running the connection status callback function, the receiving status callback function and the sending status callback function on the Nth standard platform according to the first missing data attribute set to obtain the Nth written data.
[0068] Specifically, the first event write data attribute set is a set of attributes about the first event write data, which is used to describe the data characteristics generated by the first event. The data attributes in the set may include the timestamp, data type, data source, etc. of the data. Among them, the first event is a specific operation or event in the vehicle system, such as "vehicle positioning" and "vehicle start", and the data generated in this event will be written to the vehicle system. This write data attribute set is pre-stored in the vehicle system configuration file. When the first event is executed, the first event write data attribute set is called so that the received data can be verified.
[0069] For each written data (from the first written data to the N-1th written data), traverse its attributes and compare them with the first event written data attribute set to find out the missing attributes in these data and obtain the first missing data attribute set. This set contains all the data attributes in the first event written data attribute set that are not included in the first written data to the N-1th written data.
[0070] A connection status callback function, a receiving status callback function and a sending status callback function are asynchronously run on the Nth standard platform according to the first missing data attribute set to obtain the Nth written data to supplement the missing data.
[0071] Through attribute comparison, missing data can be accurately identified and supplemented as needed, ensuring that the data received from all departmental standard platforms is consistent in attributes and content, thereby improving data integrity and accuracy.
[0072] Furthermore, the data fusion storage module 50 of the embodiment of the present application is also used to perform the following steps:
[0073] Step P51: performing attribute comparison on the fused write data according to the first event write data attribute set to obtain a second missing data attribute set.
[0074] Step P52: When the second missing data attribute set is not equal to 0, a callback loop is executed for the first event.
[0075] Step P53: Otherwise, execute the next event.
[0076] Specifically, after acquiring the fused write data, the data fusion storage module 50 traverses the first event write data attribute set, compares each attribute in the first event write data attribute set with the attribute of the fused write data, and if the corresponding data attribute cannot be found in the fused write data, adds the data attribute to the second missing data attribute set. The second missing data attribute set includes all data attributes in the first event write data attribute set that are not included in the fused write data.
[0077] The number of data in the second missing data attribute set is queried. If the second missing data attribute set is not equal to 0, it indicates that there is data missing in the fused written data. At this time, the callback loop is executed, and the first asynchronous operation module 30 to the Nth asynchronous operation module 40 re-call the connection status callback function, the receiving status callback function and the sending status callback function to obtain the written data, and input the data fusion storage module 50 to generate the fused written data, and then perform attribute comparison, and repeat the loop until the second missing data attribute set is equal to 0.
[0078] When the second missing data attribute set is equal to 0, it means that the fused write data has included all attributes in the first event write data attribute set, that is, the complete write data has been obtained, and the next event can be executed at this time.
[0079] The data fusion storage module 50 completely and accurately integrates data from multiple departmental standard platforms by comparing data attributes, detecting missing attributes, and using a callback mechanism, thereby ensuring data integrity and avoiding errors caused by missing data. It can thus effectively perform data fusion in complex multi-platform data interaction scenarios, thereby improving the stability and accuracy of data transmission interaction.
[0080] Furthermore, the system described in the embodiment of the present application is also used to perform the following steps:
[0081] Step P6: upon receiving a pause instruction from the first departmental logo platform, disconnecting the communication connection with the first departmental logo platform.
[0082] Specifically, the pause instruction is an instruction sent by the departmental standard platform to the system, which is used to notify the system to suspend the communication connection with a specific departmental standard platform. When receiving the pause instruction from the first departmental standard platform, the system will disconnect from the departmental standard platform through the control protocol, and will no longer send data to the departmental standard platform or receive data from the departmental standard platform. This mechanism can effectively control the communication process of the system. By disconnecting from the platform, the system can suspend unnecessary data exchange, thereby improving resource utilization efficiency and avoiding wasting the system's processing power when the platform is unavailable.
[0083] In summary, the asynchronous event management system for multiple standard platforms provided by the embodiments of the present application has the following technical effects:
[0084] When receiving the recovery instruction of the first departmental standard platform, the platform acquisition module 10 obtains the first departmental standard platform in the state of preparing for communication, providing a feasible platform foundation for subsequent data transmission, and ensuring that subsequent communication can proceed smoothly. The callback function configuration module 20 configures the connection state callback function, the receiving state callback function and the sending state callback function, providing a specific implementation means for the real-time response of each subsequent departmental standard platform, and improving the refinement of subsequent data processing and state management. The first asynchronous operation module 30 and the Nth asynchronous operation module 40 asynchronously operate the connection state callback function, the receiving state callback function and the sending state callback function on multiple departmental standard platforms respectively, and obtain write data, so that the communication and data transmission with multiple departmental standard platforms can be processed in parallel, avoiding the communication of other platforms affected by the processing blockage of a single platform, and improving the data transmission response speed. At the same time, through multiple callback functions, the interaction state between the vehicle and the departmental standard platform can be carefully monitored. Whether the connection link is stable, whether the data is correctly received or whether the transmission is successful, it can be accurately located through the corresponding callback function, and problems in the data transmission process can be discovered and solved in time to ensure the reliability of data interaction. The data fusion storage module 50 obtains the union data of the first written data to the Nth written data, obtains the fused written data for storage, avoids repeated storage of data, saves storage space, and identifies missing attributes through attribute comparison and supplements these missing data through a callback mechanism, thereby ensuring the integrity and accuracy of the data finally stored. By processing the pause instruction, the communication with a specific platform can be flexibly disconnected as needed to avoid unnecessary resource consumption.
[0085] In general, the embodiment of the present application realizes multi-platform parallel processing in the process of uploading the vehicle department standard protocol through the coordinated operation of the above-mentioned modules. Asynchronous operation module. Asynchronous processing and parallel execution improve the speed of data interaction between vehicles and multiple platforms, shorten the response time, and avoid delays and blockages in traditional synchronous operations; the flexible callback mechanism ensures the reliability of data interaction through comprehensive status monitoring, and enhances the adaptability to different platform status and data requirements; data fusion storage effectively integrates data from different platforms, optimizes storage space and management efficiency, and reduces the storage of redundant data. Overall, the system improves the transmission efficiency, reliability and accuracy of vehicle data transmission, and provides a more efficient, accurate and scalable solution for vehicle communication management.
[0086] Embodiment 2, as Figure 3 As shown, the embodiment of the present application provides an asynchronous event management method for a multi-standard platform, the method comprising:
[0087] Step S1: when receiving a recovery instruction from a first tag platform, obtaining the first tag platform in a communication-ready state.
[0088] Step S2: configure the connection status callback function, the receiving status callback function and the sending status callback function.
[0089] Step S3: asynchronously running the connection status callback function, the receiving status callback function and the sending status callback function on the first label platform to obtain first write data.
[0090] Step S4: until the connection status callback function, the receiving status callback function and the sending status callback function are asynchronously run on the Nth part platform to obtain the Nth written data.
[0091] Step S5: taking the union data of the first written data to the Nth written data, obtaining fused written data for storage.
[0092] Furthermore, step S3 of the embodiment of the present application includes:
[0093] According to the connection status callback function, the connection status of the first departmental standard platform is called back to obtain a first callback result; at the same time, according to the receiving status callback function, the receiving status of the first departmental standard platform is called back to obtain a second callback result; at the same time, according to the sending status callback function, the sending status of the first departmental standard platform is called back to obtain a third callback result; according to the first callback result and the second callback result, asynchronous judgment is performed to obtain the first write data; according to the first callback result and the third callback result, asynchronous judgment is performed to execute a callback loop.
[0094] Furthermore, in step S3 of the embodiment of the present application, performing asynchronous judgment according to the first callback result and the second callback result to obtain the first write data includes:
[0095] When the first callback result is a successful connection and the second callback result is a successful reception, the first write data is obtained and the next event is executed at the same time; when the first callback result is a failed connection, the connection status callback function is executed in a loop to automatically reconnect to the first departmental standard platform; when the first callback result is a successful connection and the second callback result is a failed reception, the reception status callback function is executed in a loop to perform a reception status callback on the first departmental standard platform.
[0096] Furthermore, in step S3 of the embodiment of the present application, asynchronous judgment is performed according to the first callback result and the third callback result, and a callback loop is executed, including:
[0097] When the first callback result is a successful connection and the third callback result is a successful sending, execute the next event; when the first callback result is a failed connection, loop execute the connection status callback function to automatically reconnect to the first departmental standard platform; when the first callback result is a successful connection and the third callback result is a failed sending, loop execute the sending status callback function to perform a sending status callback on the first departmental standard platform.
[0098] Furthermore, step S4 of the embodiment of the present application includes:
[0099] Obtain a first event write data attribute set; perform attribute comparison on the first write data to the N-1th write data according to the first event write data attribute set to obtain a first missing data attribute set; asynchronously run the connection status callback function, the receiving status callback function and the sending status callback function on the Nth part platform according to the first missing data attribute set to obtain the Nth write data.
[0100] Furthermore, step S5 of the embodiment of the present application further includes:
[0101] According to the first event write data attribute set, the attribute comparison is performed on the fused write data to obtain a second missing data attribute set; when the second missing data attribute set is not equal to 0, a callback loop is executed for the first event; otherwise, the next event is executed.
[0102] Furthermore, the method described in the embodiment of the present application also includes:
[0103] When receiving the pause instruction from the first departmental mark platform, the communication connection with the first departmental mark platform is disconnected.
[0104] Through the above-mentioned detailed description of the asynchronous event management system for multiple departmental standard platforms in this specification, those skilled in the art can clearly understand the asynchronous event management method for multiple departmental standard platforms in this embodiment. For the method disclosed in Example 2, since it corresponds to the system disclosed in Example 1 and has corresponding execution steps and beneficial effects, the relevant parts can be referred to the description of the method part.
[0105] Embodiment three, based on the same inventive concept of the asynchronous event management system for multiple departmental standard platforms in the aforementioned embodiment one, the present application also provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the execution steps of the asynchronous event management system for multiple departmental standard platforms described in the aforementioned embodiment one.
[0106] like Figure 4As shown, the bus architecture is represented by bus 300, which may include any number of interconnected buses and bridges, and bus 300 connects various circuits including one or more processors represented by processor 302 and memory represented by memory 304. Bus 300 may also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 305 provides an interface between bus 300 and receiver 301 and transmitter 303. Receiver 301 and transmitter 303 may be the same element, namely a transceiver, providing a unit for communicating with various other devices on a transmission medium. Processor 302 is responsible for managing bus 300 and general processing, while memory 304 may be used to store data used by processor 302 when performing operations.
[0107] Embodiment 4, based on the same inventive concept of the asynchronous event management system for multiple departmental standard platforms in the aforementioned embodiment 1, the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by the processor, the various execution steps of the above-mentioned asynchronous event management system for multiple departmental standard platforms embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0108] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An asynchronous event management system for multiple standard platforms, characterized in that: The system is connected to multiple departmental standard platforms, including: The platform acquisition module is used to obtain the first platform in a communication-ready state upon receiving a recovery instruction from the first platform; The callback function configuration module is used to configure the connection status callback function, the receiving status callback function and the sending status callback function; A first asynchronous operation module is used to asynchronously execute the connection status callback function, the receiving status callback function and the sending status callback function on the first standard platform to obtain first write data; The Nth asynchronous operation module is used to asynchronously operate the connection status callback function, the receiving status callback function and the sending status callback function on the Nth standard platform to obtain the Nth written data; A data fusion storage module, used for reading the union data of the first written data to the Nth written data, and obtaining fused written data for storage; The Nth asynchronous operation module is used to asynchronously operate the connection status callback function, the receiving status callback function and the sending status callback function on the Nth standard platform to obtain the Nth written data, and the execution steps include: Get the first event write data attribute set; According to the first event written data attribute set, attribute comparison is performed on the first written data to the N-1th written data to obtain a first missing data attribute set; The connection status callback function, the receiving status callback function and the sending status callback function are asynchronously run on the Nth standard platform according to the first missing data attribute set to obtain the Nth written data.
2. The asynchronous event management system for multiple departmental standard platforms according to claim 1, characterized in that: The first asynchronous operation module is used to asynchronously operate the connection status callback function, the receiving status callback function and the sending status callback function on the first standard platform to obtain the first write data, and the execution steps include: Performing a connection status callback on the first departmental standard platform according to the connection status callback function to obtain a first callback result; At the same time, according to the receiving status callback function, the receiving status of the first standard platform is called back to obtain a second callback result; At the same time, according to the sending status callback function, the sending status of the first part standard platform is called back to obtain a third callback result; Perform asynchronous judgment according to the first callback result and the second callback result to obtain the first write data; An asynchronous judgment is performed according to the first callback result and the third callback result, and a callback loop is executed.
3. The asynchronous event management system for multiple standard platforms as claimed in claim 2, characterized in that: Performing asynchronous judgment according to the first callback result and the second callback result to obtain the first write data, the execution steps include: When the first callback result is a successful connection, and the second callback result is a successful reception, obtaining the first write data and executing the next event at the same time; When the first callback result is a connection failure, the connection status callback function is executed cyclically to automatically reconnect to the first departmental standard platform; When the first callback result is a successful connection, and the second callback result is a reception failure, the reception status callback function is executed cyclically to perform a reception status callback on the first departmental standard platform.
4. The asynchronous event management system for multiple standard platforms as claimed in claim 2, characterized in that: Perform asynchronous judgment according to the first callback result and the third callback result, and execute a callback loop. The execution steps include: When the first callback result is a successful connection, and the third callback result is a successful sending, executing the next event; When the first callback result is a connection failure, the connection status callback function is executed cyclically to automatically reconnect to the first departmental standard platform; When the first callback result is a successful connection, and the third callback result is a sending failure, the sending status callback function is executed cyclically to perform a sending status callback on the first part label platform.
5. The asynchronous event management system for multiple standard platforms according to claim 1, characterized in that: A data fusion storage module is used to obtain the union data of the first written data to the Nth written data to obtain the fused written data for storage, and the execution step also includes: Performing attribute comparison on the fused written data according to the first event written data attribute set to obtain a second missing data attribute set; When the second missing data attribute set is not equal to 0, executing a callback loop for the first event; Otherwise, execute the next event.
6. The asynchronous event management system for multiple standard platforms according to claim 1, characterized in that: The execution steps of the system also include: When receiving the pause instruction from the first departmental label platform, the communication connection with the first departmental label platform is disconnected.
7. An asynchronous event management method for a multi-standard platform, characterized in that: The asynchronous event management system for a multi-standard platform as claimed in any one of claims 1 to 6 comprises: When receiving a recovery instruction from the first tag platform, obtaining the first tag platform in a communication-ready state; Configure the connection status callback function, the receiving status callback function, and the sending status callback function; Asynchronously running the connection status callback function, the receiving status callback function and the sending status callback function on the first standard platform to obtain first write data; Until the connection status callback function, the receiving status callback function and the sending status callback function are asynchronously run on the Nth part platform to obtain the Nth written data; The union data of the first write data to the Nth write data is read to obtain fused write data for storage.
8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the execution steps of the asynchronous event management system for a multi-standard platform described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the execution steps of the asynchronous event management system for a multi-standard platform as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Message sequence processing method and device in protocol simulation and readable medium
CN112328394A
Vehicle data processing method and device based on TBox, automobile and readable storage medium
CN118625779A