An information processing method and device
By determining whether the bus signal of the CAN message is invoked by the business application in the vehicle system, parsing is only performed when there is an invocation, and the parsing method is determined according to the interface type. This solves the problem of resource waste when the CAN message is not used and achieves efficient resource utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING CO WHEELS TECH CO LTD
- Filing Date
- 2022-05-27
- Publication Date
- 2026-07-14
AI Technical Summary
In vehicle systems, CAN messages are continuously parsed even when they are not being used, resulting in a waste of computing resources and storage space.
By determining whether the business application calls the bus signal in the CAN message, parsing is only performed when an application calls it, and parsing is terminated when no application calls it. The parsing method (distributing or caching parsed data) is determined according to the interface type.
It saves computing and storage resources and improves resource utilization efficiency.
Smart Images

Figure CN117176497B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information processing technology, specifically to an information processing method and apparatus. Background Technology
[0002] In existing technologies, vehicle systems require many buses, among which CAN bus is short for Controller Area Network (CAN) bus. CAN messages are data packets transmitted on the CAN bus. CAN messages are collected and parsed by signal parsing services, which provide interfaces to vehicle business applications so that the business applications can perceive the vehicle's operating status.
[0003] When all CAN messages need to be parsed, even when no application is currently using the CAN message, it will still be parsed continuously, which will result in a waste of computing resources and storage space. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide an information processing method and apparatus for dynamically parsing CAN messages, thereby saving computing and storage resources.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] In a first aspect, embodiments of the present invention provide an information processing method, comprising:
[0007] Obtain the message to be parsed from the bus;
[0008] Determine the bus signals contained in the message to be parsed and the bus signals invoked by each service application;
[0009] If at least one business application invokes at least one bus signal in the message to be parsed, then the message to be parsed is parsed.
[0010] If none of the business applications invoke the bus signal in the message to be parsed, the parsing of the message to be parsed will be terminated.
[0011] As an optional implementation of this invention, after parsing the message to be parsed, the method further includes:
[0012] Obtain the interface type corresponding to each bus signal in the message to be parsed; the interface type corresponding to any bus signal includes the interface type configured by each service application for that bus signal;
[0013] Based on the interface type corresponding to each bus signal in the message to be parsed, determine whether to parse each bus signal in the message to be parsed.
[0014] As an optional implementation of this invention, determining whether to parse each bus signal in the message to be parsed based on the interface type corresponding to each bus signal in the message to be parsed includes:
[0015] When the interface type corresponding to the first bus signal in the message to be parsed includes: a first interface type and / or a second interface type, the first bus signal is parsed.
[0016] The first interface type is used to indicate the parsing of the corresponding bus signal and distribute the obtained parsed data to the corresponding business application; the second interface type is used to indicate the parsing of the corresponding bus signal and cache the obtained parsed data to a preset cache space.
[0017] As an optional implementation of this invention, when the interface type corresponding to the first bus signal includes: the first interface type, the method further includes:
[0018] After parsing the first bus signal, the parsed data obtained from parsing the first bus signal is sent to the service application that has configured the first interface type for the first bus signal.
[0019] As an optional implementation of this invention, when the interface type corresponding to the first bus signal includes the second interface type, the method further includes:
[0020] After parsing the first bus signal, the parsed data obtained from parsing the first bus signal is cached in the preset cache space.
[0021] As an optional implementation of this invention, the method further includes:
[0022] Receive a first request information sent by a first business application, the first request information being used to request the real-time return of the parsed data obtained by parsing the first bus signal;
[0023] The parsed data obtained from parsing the first bus signal is read from the preset cache space and sent to the first service application.
[0024] As an optional implementation of this invention, the step of determining whether to parse each bus signal in the message to be parsed based on the interface type corresponding to each bus signal in the message to be parsed includes:
[0025] When the interface type corresponding to the second bus signal in the message to be parsed only includes the third interface type and / or the fourth interface type, the second bus signal will not be parsed.
[0026] The third interface type is used to indicate the cessation of distributing the parsed data obtained from parsing the corresponding bus signal to the corresponding business application; the fourth interface type is used to indicate the cessation of caching the parsed data obtained from parsing the corresponding bus signal to a preset cache space.
[0027] As an optional implementation of this invention, the step of determining whether to parse each bus signal in the message to be parsed based on the interface type corresponding to each bus signal in the message to be parsed includes:
[0028] Receive a second request message sent by a second service application, the second request message being used to request the return of parsed data obtained by parsing the second bus signal;
[0029] The second bus signal is parsed, and the parsed data obtained from parsing the second bus signal is sent to the second service application.
[0030] Secondly, embodiments of the present invention provide an information processing apparatus, comprising:
[0031] The acquisition unit is used to acquire the message to be parsed from the bus;
[0032] The determining unit is used to determine the bus signals and bus signals of each service call contained in the message to be parsed;
[0033] Judgment unit: used to determine whether at least one business application has invoked at least one bus signal in the message to be parsed;
[0034] Parsing unit: Used to parse the message to be parsed when at least one business application invokes at least one bus signal in the message to be parsed.
[0035] As an optional implementation of this invention, after parsing the message to be parsed, the method further includes: obtaining the interface type corresponding to each bus signal in the message to be parsed; determining whether to parse each bus signal in the message to be parsed based on the interface type corresponding to each bus signal in the message to be parsed; wherein, the interface type corresponding to any bus signal includes the interface type configured for the bus signal by each service application.
[0036] As an optional implementation of this invention, the determining unit is specifically used to parse the first bus signal when the interface type corresponding to the first bus signal in the message to be parsed includes: a first interface type and / or a second interface type; wherein, the first interface type is an interface type used to indicate parsing the corresponding bus signal and distributing the obtained parsed data to the corresponding business application; the second interface type is an interface type used to indicate parsing the corresponding bus signal and caching the obtained parsed data to a preset cache space.
[0037] As an optional implementation of the present invention, the determining unit is further configured to, when the interface type corresponding to the first bus signal includes the first interface type, after parsing the first bus signal, send the parsed data obtained from parsing the first bus signal to the service application that has configured the first interface type for the first bus signal.
[0038] As an optional implementation of the present invention, the determining unit is further configured to, when the interface type corresponding to the first bus signal includes the second interface type, cache the parsed data obtained from parsing the first bus signal into the preset cache space after parsing the first bus signal.
[0039] As an optional implementation of this invention, the determining unit is further configured to receive a first request information sent by a first service application, the first request information being used to request the real-time return of parsed data obtained from parsing the first bus signal; read the parsed data obtained from parsing the first bus signal from the preset cache space, and send the parsed data obtained from parsing the first bus signal to the first service application.
[0040] As an optional implementation of this invention, the parsing unit is configured to determine whether to parse each bus signal in the message to be parsed based on the interface type corresponding to each bus signal in the message to be parsed, including: when the interface type corresponding to the second bus signal in the message to be parsed only includes: a third interface type and / or a fourth interface type, the second bus signal is not parsed; wherein, the third interface type is an interface type used to indicate stopping the distribution of parsed data obtained from parsing the corresponding bus signal to the corresponding business application; and the fourth interface type is an interface type used to indicate stopping the caching of parsed data obtained from parsing the corresponding bus signal to a preset cache space.
[0041] As an optional implementation of this invention, the parsing unit is further configured to determine whether to parse each bus signal in the message to be parsed based on the interface type corresponding to each bus signal in the message to be parsed, including: receiving a second request information sent by a second service application, the second request information being used to request the return of parsed data obtained from parsing the second bus signal; parsing the second bus signal, and sending the parsed data obtained from parsing the second bus signal to the second service application.
[0042] Thirdly, embodiments of the present invention provide an electronic device, including: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to cause the electronic device to implement the information processing method described in any of the above embodiments when executing the computer program.
[0043] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a computing device, causes the computing device to implement the information processing method described in any of the above embodiments.
[0044] Fifthly, embodiments of the present invention provide a vehicle, including: the information processing device described in the second aspect or the electronic device described in the third aspect.
[0045] The information processing method provided in this embodiment of the invention specifically involves: acquiring a message to be parsed from a bus; determining the bus signals contained in the message to be parsed and the bus signals invoked by various service applications; parsing the message if at least one service application invokes at least one bus signal in the message to be parsed; and terminating the parsing of the message if none of the service applications invoke the bus signals in the message to be parsed. Because the information processing method provided in this embodiment of the invention can determine whether the message needs to be parsed by first acquiring the message to be parsed on the bus, determining the bus signals contained in the message to be parsed and the bus signals invoked by various services, and determining whether at least one service application invokes at least one bus signal in the message to be parsed, the method parses the message when at least one service application invokes at least one bus signal in the message to be parsed, and terminates the parsing of the message when none of the service applications invoke the bus signals in the message to be parsed. This saves computing and storage resources by not parsing the message when none of the service applications invoke the bus signals in the message to be parsed. Attached Figure Description
[0046] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings that need to be called in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is one of the flowcharts of the information processing method provided in the embodiments of the present invention;
[0049] Figure 2 The second flowchart of the information processing method provided in the embodiments of the present invention;
[0050] Figure 3 The third step of the information processing method provided in the embodiments of the present invention;
[0051] Figure 4 This is a schematic diagram of the structure of an information processing device provided in an embodiment of the present invention;
[0052] Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0053] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0054] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0055] In embodiments of the present invention, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in embodiments of the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner. Furthermore, in the description of embodiments of the present invention, unless otherwise stated, "a plurality of" means two or more.
[0056] It should be noted that, in this document, the term "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0057] The relevant terms in the embodiments of the present invention will be explained below.
[0058] CAN bus: A common communication bus in the automotive industry used to connect various electronic devices in a vehicle.
[0059] CAN message: A data packet transmitted on the CAN bus.
[0060] CAN signals: The specific content contained in a CAN message. A CAN message contains multiple CAN signals.
[0061] Based on the above, this invention provides an information processing method, referring to... Figure 1 As shown, the information processing method includes the following steps S101-S104:
[0062] S101. Obtain the message to be parsed from the bus.
[0063] Automobiles use many common buses to connect various electronic devices, and these buses carry numerous data packets called messages. Real-time detection is used to acquire and parse the messages on the bus when a message is detected.
[0064] S102. Determine the bus signals contained in the message to be parsed and the bus signals called by various service applications.
[0065] Step S102 above (determining the bus signals contained in the message to be parsed and the bus signals called by each service application) includes the following steps a and b:
[0066] Step a: Determine the bus signals contained in the message to be parsed.
[0067] In one optional implementation, the bus signal contained in the message to be parsed is looked up from the message-signal correspondence table in the database according to the message identifier of the message to be parsed.
[0068] The message-signal correspondence table contains all the bus signals contained in each message, as shown in Table 1 below.
[0069] Table 1
[0070] Message ID Bus signal 1 Bus signal 2 Bus signal 3 A have have none B have none have C have none none … … … …
[0071] As can be seen from the contents of the message-signal correspondence table, by looking up the message ID of the message to be parsed A in the message-signal correspondence table, we can find that the message to be parsed A contains two bus signals, namely bus signal 1 and bus signal 2.
[0072] Step b: Determine the bus signals for each service call.
[0073] In one alternative implementation, the bus signals called by each business application can be obtained by analyzing the bus signal calls of each business application. For example, if the business system has a total of 3 business applications, where business application 1 calls bus signal 1, business application 2 calls bus signal 3, and business application 3 calls bus signal 1, analysis shows that bus signal 1 and bus signal 3 were called by the business applications, while bus signal 2 was not called by the business applications.
[0074] S103. Based on the bus signals contained in the message to be parsed and the bus signals called by each service application, determine whether at least one service application has called at least one bus signal in the message to be parsed.
[0075] In step S103 (determining whether at least one service application has called at least one bus signal in the message to be parsed based on the bus signals contained in the message to be parsed and the bus signals called by each service application), if at least one service application calls at least one bus signal in the message to be parsed, it can be determined that a signal has been called in the message to be parsed, and it can be determined that the message to be parsed is used by an application, i.e., step S104 is executed. If none of the service applications call the bus signals in the message to be parsed, it can be determined that no signal has been called in the message to be parsed, and it can be determined that the message to be parsed is not used by an application, i.e., step S105 is executed.
[0076] In an optional embodiment, as shown in Table 1 above, there are three bus signals in the message A to be parsed: bus signal 1, bus signal 2, and bus signal 3. There are two service applications, service application 1 and service application 2. It is known that service application 1 calls bus signal 1 and service application 2 calls bus signal 3. Therefore, it can be concluded that bus signal 1 and bus signal 3 in the message A to be parsed are called by the service applications. That is, in the message A to be parsed, at least one bus signal is called by at least one service application. Then, step S104 is executed to parse the message to be parsed.
[0077] In an optional embodiment, as shown in Table 1 above, there are three bus signals in the message A to be parsed: bus signal 1, bus signal 2, and bus signal 3. There are two service applications, service application 1 and service application 2. It is known that service application 1 calls bus signal 4, and service application 2 calls bus signal 5. Therefore, it can be concluded that none of the bus signals in the message A to be parsed have been called by the service applications. In other words, none of the bus signals in the message A to be parsed have been called by the service applications. Therefore, step S105 is executed, and the message to be parsed is not parsed.
[0078] S104. The message to be parsed is parsed.
[0079] As an optional implementation, the message to be parsed is parsed by a parsing service to obtain the bus signals in the message to be parsed.
[0080] S105. Terminate the parsing of the message to be parsed.
[0081] The information processing method provided in this embodiment of the invention specifically involves: acquiring a message to be parsed from a bus; determining the bus signals contained in the message to be parsed and the bus signals invoked by various service applications; parsing the message if at least one service application invokes at least one bus signal in the message to be parsed; and terminating the parsing of the message if none of the service applications invoke the bus signals in the message to be parsed. Because the information processing method provided in this embodiment of the invention can determine whether the message needs to be parsed by first acquiring the message to be parsed on the bus, determining the bus signals contained in the message to be parsed and the bus signals invoked by various services, and determining whether at least one service application invokes at least one bus signal in the message to be parsed, the method parses the message when at least one service application invokes at least one bus signal in the message to be parsed, and terminates the parsing of the message when none of the service applications invoke the bus signals in the message to be parsed. This saves computing and storage resources by not parsing the message when none of the service applications invoke the bus signals in the message to be parsed.
[0082] As an extension and refinement of the above embodiments, this invention provides another information processing method, referred to... Figure 2 As shown, after step S104 is executed, the information processing method provided in this embodiment of the invention further includes the following steps:
[0083] S201. Obtain the interface type corresponding to each bus signal in the message to be parsed.
[0084] The interface type corresponding to any bus signal includes the interface type configured for that bus signal by each business application.
[0085] For example: When business application A and business application B are bus signal 1, the interface type configured is the first interface type; when business application C is bus signal 1, the interface type configured is the third interface type; and other business applications are all configured with the interface type for bus signal 1. Therefore, the interface types corresponding to bus signal 1 include the first interface type and the third interface type.
[0086] In one alternative implementation, the service application can configure four types of interface for the bus signal: a first interface type, a second interface type, a third interface type, and a fourth interface type.
[0087] The first interface type is used to indicate that the parsed data obtained from parsing the corresponding bus signal is distributed to the corresponding business application; the second interface type is used to indicate that the parsed data obtained from parsing the corresponding bus signal is cached in a preset cache space; the third interface type is used to indicate that the parsed data obtained from parsing the corresponding bus signal is stopped from being distributed to the corresponding business application; and the fourth interface type is used to indicate that the parsed data obtained from parsing the corresponding bus signal is stopped from being cached in a preset cache space.
[0088] For example, the first interface type can be a submit interface, which indicates that the signal is being listened to and its changes are being monitored throughout the entire time period. The signal needs to be continuously parsed and the parsed data returned to the business application. The second interface type can be a note interface, which is used to mark signals that the business application is interested in. After being marked, the parsing service needs to parse the signal and cache it after receiving the corresponding message so that it can be obtained in real time through the get interface. The third interface type can be an unsubmit interface, which indicates that the listening to the signal is ending. The fourth interface type can be an unnote interface, which indicates that the signal is being unmarked, indicating that the business application is not interested in the real-time nature of this signal.
[0089] S202. Based on the interface type corresponding to each bus signal in the message to be parsed, determine whether to parse each bus signal in the message to be parsed.
[0090] In an optional implementation, step S202 (determining whether to parse each bus signal in the message to be parsed based on the interface type corresponding to each bus signal in the message to be parsed) includes:
[0091] When the interface type corresponding to the first bus signal in the message to be parsed includes: a first interface type and / or a second interface type, the first bus signal is parsed.
[0092] When the interface type corresponding to the second bus signal in the message to be parsed only includes the third interface type and / or the fourth interface type, the second bus signal will not be parsed.
[0093] That is, the parsing priority of the first and second interface types is higher than that of the third and fourth interface types. When multiple interface types are included, the parsing requirements of the first and second interface types shall prevail.
[0094] For example, consider bus signal A and bus signal B, and service application 1 and service application 2. Service application 1 configures the interface type for bus signal A as the first interface type, and service application 2 configures the interface type for bus signal A as the third interface type. Service application 1 does not configure an interface type for bus signal B, and service application 2 configures the interface type for bus signal B as the third interface type. Since the corresponding interface type for bus signal A includes the first interface type, it is determined that bus signal A will be parsed. The corresponding interface type for bus signal B only includes the third interface type, therefore bus signal B will not be parsed.
[0095] In step S202 above, if it is determined that the bus signal needs to be parsed based on the interface type corresponding to a certain bus signal in the message to be parsed, then step S203 is executed; if it is determined that the bus signal does not need to be parsed based on the interface type corresponding to a certain bus signal in the message to be parsed, then step S204 is executed.
[0096] S203. Analyze the bus signals.
[0097] S204, No bus signal parsing is performed.
[0098] The information processing method provided in this embodiment of the invention, after parsing the message to be parsed, obtains the interface type corresponding to each bus signal in the message to be parsed, and determines whether to parse each bus signal in the message to be parsed based on the interface type of the bus signal. That is, when the interface type of the bus signal includes: a first interface type and / or a second interface type, the bus signal is parsed; when the interface type of the bus signal only includes: a third interface type and / or a fourth interface type, the bus signal is not parsed. Therefore, the information processing method provided in this embodiment of the invention further judges the bus signals, and only parses the bus signals that need to be parsed, and does not parse the bus signals that do not need to be parsed, thereby further saving computing resources and storage space.
[0099] As an extension and refinement of the above embodiments, this invention provides another information processing method, referred to... Figure 3 As shown, after step S104 is executed, the information processing method provided in this embodiment of the invention further includes the following steps:
[0100] S301. Obtain the interface type corresponding to each bus signal in the message to be parsed.
[0101] The interface type corresponding to any bus signal includes the interface type configured for that bus signal by each business application.
[0102] When the interface type corresponding to the first bus signal includes the first interface type (submit interface), the following steps S302 and S303 are performed on the first bus signal. The first bus signal can be any bus signal in the message to be parsed.
[0103] S302. Analyze the first bus signal.
[0104] S303. Send the parsed data obtained from parsing the first bus signal to the service application that has configured the first interface type for the first bus signal.
[0105] For example, if business application A in the business system configures a first interface type (submit interface) for configuring a first bus signal, wherein the first bus signal is a GPS signal, and the parsed data obtained after parsing the GPS signal is location information, then the GPS signal is parsed and the location information obtained after parsing the GPS signal is sent to business application A so that business application A can obtain the location information.
[0106] When the interface type corresponding to the first bus signal includes the second interface type (note interface), the following steps S304 and S305 are performed on the first bus signal. The first bus signal can be any bus signal in the message to be parsed.
[0107] S304. Analyze the first bus signal.
[0108] S305. Cache the parsed data obtained from parsing the first bus signal into the preset cache space.
[0109] After the parsed data obtained from parsing the first bus signal is cached in the preset cache space, the method provided in this embodiment of the invention may further include the following steps S306 to S308.
[0110] S306. Receive the first request information sent by the first service application.
[0111] The first request information is used to request the real-time return of the parsed data obtained from parsing the first bus signal.
[0112] S307. Read the parsed data obtained from parsing the first bus signal from the preset cache space.
[0113] S308. Send the parsed data obtained from parsing the first bus signal to the first service application.
[0114] In some embodiments, a business application can request parsed data obtained from parsing the first bus signal via the get interface to send the first request information. The get interface is an interface for real-time signal acquisition. The parsed data of a bus signal requested via the get interface needs to be marked in advance via the note interface so that when requesting the parsed data of this signal, the pre-parsed and cached parsed data of the bus signal can be quickly obtained.
[0115] For example, if a business application B needs to call the parsed data of the first bus signal through the get interface, it can first mark the first bus signal through the note interface so that the first bus signal can be parsed and the parsed data can be cached in the preset cache space. When the business application B requests the parsed data of the first bus signal through the get interface, the parsed data of the first bus signal is directly read from the preset cache space and returned to the business application B.
[0116] When the interface type corresponding to the second bus signal includes only the third interface type (unsubmit interface) and / or the fourth interface type (unnote interface), the following step S309 is performed on the second bus signal.
[0117] The second bus signal can be any bus signal in the message to be parsed. The interface type corresponding to the second bus signal includes only the third interface type and / or the fourth interface type, which can also be understood as the interface type corresponding to the second bus signal not including the first interface type or the second interface type.
[0118] S309, Do not parse the second bus signal.
[0119] After step S309, the method provided in this embodiment of the invention may further include the following steps S310 to S312:
[0120] S310, Receive the second request information sent by the second service application.
[0121] The second request information is used to request the return of the parsed data obtained by parsing the second bus signal.
[0122] S311. Analyze the second bus signal.
[0123] S312. Send the parsed data obtained from parsing the second bus signal to the second service application.
[0124] In some embodiments, a business application can use the get_wait interface to request parsed data obtained from parsing the second bus signal in order to send the second request information. The get_wait interface is a non-real-time signal acquisition interface; it does not require pre-marking of signals, but only waits to acquire the signal message and parses the returned result upon invocation.
[0125] For example, if a business application C needs to call the parsed data of the second bus signal through the get_wait interface, since the get_wait interface does not mark the second bus signal in advance, the second bus signal has not been parsed when the call is made. Therefore, when the call for parsing the second bus signal through the get_wait interface is received, the second bus signal needs to be parsed and the parsed data obtained from parsing the second bus signal needs to be sent to the business application C.
[0126] In one optional implementation, if it is determined that the bus signal does not need to be parsed, the bus signal is discarded, and after receiving the second request, the application waits for the next bus signal with the same name. For example, when a bus signal A is received for the first time, if the application does not need this bus signal, it discards the bus signal A to avoid wasting storage resources. After receiving the second request, the application waits for the next bus signal A. When the bus signal A is obtained again, it is parsed to obtain parsed data, and the parsed data obtained from parsing the bus signal A is sent to the application.
[0127] In one optional implementation, when it is determined that the bus signal does not need to be parsed, the bus signal is stored in a preset database. When a second request is received, the bus signal is retrieved from the preset database and parsed. For example, when a bus signal A is received for the first time, if the application does not need this bus signal, bus signal A is stored in the preset database. When the second request is received, bus signal A is retrieved from the preset database, parsed to obtain parsed data, and then the parsed data obtained from parsing bus signal A is sent to the application.
[0128] Based on the same inventive concept, as an implementation of the above method, this embodiment of the invention also provides an information processing device. This embodiment corresponds to the aforementioned method embodiment. For ease of reading, this embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the information processing device in this embodiment can implement all the contents of the aforementioned method embodiment.
[0129] This invention provides an information processing device. Figure 4 This is a schematic diagram of the information processing device, as shown below. Figure 4 As shown, the wheelchair control device 400 includes:
[0130] Acquisition unit 410 is used to acquire the message to be parsed from the bus;
[0131] The determining unit 420 is used to determine the bus signals and bus signals of each service call contained in the message to be parsed;
[0132] Judgment unit 430: used to determine whether at least one business application has invoked at least one bus signal in the message to be parsed;
[0133] Parsing unit 440: used to parse the message to be parsed when at least one business application invokes at least one bus signal in the message to be parsed.
[0134] As an optional implementation of this invention, after parsing the message to be parsed, the method further includes: obtaining the interface type corresponding to each bus signal in the message to be parsed; determining whether to parse each bus signal in the message to be parsed based on the interface type corresponding to each bus signal in the message to be parsed; wherein, the interface type corresponding to any bus signal includes the interface type configured for the bus signal by each service application.
[0135] As an optional implementation of this invention, the determining unit 410 is specifically used to parse the first bus signal when the interface type corresponding to the first bus signal in the message to be parsed includes: a first interface type and / or a second interface type; wherein, the first interface type is an interface type used to indicate parsing the corresponding bus signal and distributing the obtained parsed data to the corresponding business application; the second interface type is an interface type used to indicate parsing the corresponding bus signal and caching the obtained parsed data to a preset cache space.
[0136] As an optional implementation of the present invention, the determining unit 410 is further configured to, when the interface type corresponding to the first bus signal includes the first interface type, after parsing the first bus signal, send the parsed data obtained from parsing the first bus signal to the service application that has configured the first interface type for the first bus signal.
[0137] As an optional implementation of the present invention, the determining unit 410 is further configured to, when the interface type corresponding to the first bus signal includes the second interface type, cache the parsed data obtained from parsing the first bus signal into the preset cache space after parsing the first bus signal.
[0138] As an optional implementation of the present invention, the determining unit 410 is further configured to receive a first request information sent by a first service application, the first request information being used to request the real-time return of the parsed data obtained from parsing the first bus signal; read the parsed data obtained from parsing the first bus signal from the preset cache space, and send the parsed data obtained from parsing the first bus signal to the first service application.
[0139] As an optional implementation of this invention, the parsing unit 440 is configured to determine whether to parse each bus signal in the message to be parsed based on the interface type corresponding to each bus signal in the message to be parsed, including: when the interface type corresponding to the second bus signal in the message to be parsed only includes: a third interface type and / or a fourth interface type, the second bus signal is not parsed; wherein, the third interface type is an interface type used to indicate stopping the distribution of parsed data obtained from parsing the corresponding bus signal to the corresponding business application; and the fourth interface type is an interface type used to indicate stopping the caching of parsed data obtained from parsing the corresponding bus signal to a preset cache space.
[0140] As an optional implementation of this invention, the parsing unit 440 is further configured to determine whether to parse each bus signal in the message to be parsed according to the interface type corresponding to each bus signal in the message to be parsed, including: receiving a second request information sent by a second service application, the second request information being used to request the return of parsed data obtained from parsing the second bus signal; parsing the second bus signal, and sending the parsed data obtained from parsing the second bus signal to the second service application.
[0141] Based on the same inventive concept, embodiments of the present invention also provide an electronic device. Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 5As shown, the electronic device provided in this embodiment includes a memory 501 and a processor 502. The memory 501 is used to store computer programs; the processor 502 is used to execute the information processing method provided in the above embodiment when executing the computer programs.
[0142] Based on the same inventive concept, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the computing device to implement the information processing method provided in the above embodiments.
[0143] Based on the same inventive concept, this embodiment of the invention also provides a computer program product, which, when run on a computer, enables the computing device to implement the information processing method provided in the above embodiments.
[0144] Based on the same inventive concept, embodiments of the present invention also provide a vehicle, the vehicle including the information processing device or the electronic device provided in the above embodiments.
[0145] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0146] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0147] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0148] Computer-readable media include both permanent and non-permanent, removable and non-removable storage media. Storage media can store information using any method or technology; the information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An information processing method, characterized in that, include: Obtain the message to be parsed from the bus; Determine the bus signals contained in the message to be parsed and the bus signals invoked by each service application; If at least one business application invokes at least one bus signal in the message to be parsed, then the message to be parsed is parsed. If none of the business applications invoke the bus signal in the message to be parsed, the parsing of the message to be parsed will be terminated.
2. The method according to claim 1, characterized in that, After parsing the message to be parsed, the method further includes: Obtain the interface type corresponding to each bus signal in the message to be parsed; the interface type corresponding to any bus signal includes the interface type configured by each service application for that bus signal; Based on the interface type corresponding to each bus signal in the message to be parsed, determine whether to parse each bus signal in the message to be parsed.
3. The method according to claim 2, characterized in that, The step of determining whether to parse each bus signal in the message to be parsed based on the interface type corresponding to each bus signal in the message to be parsed includes: When the interface type corresponding to the first bus signal in the message to be parsed includes: a first interface type and / or a second interface type, the first bus signal is parsed. The first interface type is used to indicate the parsing of the corresponding bus signal and distribute the obtained parsed data to the corresponding business application; the second interface type is used to indicate the parsing of the corresponding bus signal and cache the obtained parsed data to a preset cache space.
4. The method according to claim 3, characterized in that, When the interface type corresponding to the first bus signal includes the first interface type, the method further includes: After parsing the first bus signal, the parsed data obtained from parsing the first bus signal is sent to the service application that has configured the first interface type for the first bus signal.
5. The method according to claim 3, characterized in that, When the interface type corresponding to the first bus signal includes the second interface type, the method further includes: After parsing the first bus signal, the parsed data obtained from parsing the first bus signal is cached in the preset cache space.
6. The method according to claim 5, characterized in that, The method further includes: Receive a first request information sent by a first business application, the first request information being used to request the real-time return of the parsed data obtained by parsing the first bus signal; The parsed data obtained from parsing the first bus signal is read from the preset cache space and sent to the first service application.
7. The method according to claim 2, characterized in that, The step of determining whether to parse each bus signal in the message to be parsed based on the interface type corresponding to each bus signal in the message to be parsed includes: When the interface type corresponding to the second bus signal in the message to be parsed only includes the third interface type and / or the fourth interface type, the second bus signal will not be parsed. The third interface type is used to indicate the cessation of distributing the parsed data obtained from parsing the corresponding bus signal to the corresponding business application; the fourth interface type is used to indicate the cessation of caching the parsed data obtained from parsing the corresponding bus signal to a preset cache space.
8. The method according to claim 7, characterized in that, The step of determining whether to parse each bus signal in the message to be parsed based on the interface type corresponding to each bus signal in the message to be parsed includes: Receive a second request message sent by a second service application, the second request message being used to request the return of parsed data obtained by parsing the second bus signal; The second bus signal is parsed, and the parsed data obtained from parsing the second bus signal is sent to the second service application.
9. An information processing device, characterized in that, include: The acquisition unit is used to acquire the message to be parsed from the bus; The determining unit is used to determine the bus signals and bus signals of each service call contained in the message to be parsed; Judgment unit: used to determine whether at least one business application has invoked at least one bus signal in the message to be parsed; Parsing unit: Used to parse the message to be parsed when at least one business application invokes at least one bus signal in the message to be parsed.
10. An electronic device, characterized in that, include: A memory and a processor, the memory being used to store a computer program; the processor being used to cause the electronic device to implement the information processing method according to any one of claims 1-8 when executing the computer program.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a computing device, causes the computing device to implement the information processing method according to any one of claims 1-8.
12. A vehicle, characterized in that, include: The signal processing apparatus of claim 9 or the electronic device of claim 10.