Abnormal code positioning method and device, electronic equipment and storage medium

By obtaining the identification information of the target service registration event and using the mapping relationship library, the problem of low positioning efficiency of exception codes in the prior art is solved, and the location of exception codes is quickly positioned, and the positioning efficiency of exception codes is improved.

CN119065973APending Publication Date: 2024-12-03GUANGZHOU XIAOPENG MOTORS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411134563.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In the prior art, when inter-process communication is abnormal, the system call tracking provider can only parse the service encoding, and cannot determine the location of the exception code in time, resulting in low efficiency of exception code positioning.

Method used

By obtaining the identification information of the target service registration event, using the mapping relationship library to find the target attribute information, determine the target interface type, and find the target function in the target interface file, thereby positioning the code in the abnormal state.

Benefits of technology

It realizes the rapid and timely determination of the location of the exception code, improves the positioning efficiency of the exception code, and reduces the time-consuming cold start.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065973A_ABST
    Figure CN119065973A_ABST
Patent Text Reader

Abstract

The invention discloses an abnormal code positioning method and device, electronic equipment and a storage medium. The method can be at least applied to the field of AI designated driving, and the method can comprise the steps that in response to an abnormal communication state between multiple processes, first target identification information of at least one target service registration event occurring between the multiple processes is acquired, and the first target identification information is used for representing the target service registration event; based on the first target identification information, searching a mapping relation library to obtain target attribute information of the target service registration event; determining a target interface type corresponding to the target attribute information, and searching for a target function called by the target service registration event in an interface file meeting the target interface type; and positioning the code in the abnormal state from the target function. The technical problem of low abnormal code positioning efficiency is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for locating an abnormal code. Background Art

[0002] Currently, communication anomalies often occur during the communication between processes. In order to find out the cause of the communication anomaly, it is often necessary to check the functions in the service one by one.

[0003] However, in the related art, using a system call tracking provider (e.g., systrace tool), only the code (node_id) of the service and the code (code_id) of the function of the service can be parsed. The parsed codes cannot determine the location of the abnormal code in time, resulting in a technical problem of low efficiency in locating the abnormal code.

[0004] Currently, no effective solution has been proposed for the technical problem of low efficiency in locating the above-mentioned abnormal codes. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, electronic device and storage medium for locating an abnormal code, so as to at least solve the technical problem of low efficiency in locating an abnormal code.

[0006] According to one aspect of an embodiment of the present invention, a method for locating abnormal code is provided. The method may include: in response to a plurality of processes being in an abnormal communication state, obtaining the first target identification information of at least one target service registration event occurring between the plurality of processes, wherein the first target identification information is used to represent the target service registration event; based on the first target identification information, searching the mapping relationship library to obtain the target attribute information of the target service registration event, wherein the mapping relationship library is used to at least store the mapping relationship between the attribute information of different service registration events and different identification information, the identification information is used to represent the corresponding service registration event, and the attribute information of the service registration event is used to at least represent the name of the corresponding service registration event; determining the target interface type corresponding to the target attribute information, and searching for the target function called by the target service registration event in the interface file that meets the target interface type; locating the code in the abnormal state from the target function.

[0007] Optionally, based on the first target identification information, the mapping relationship library is searched to obtain target attribute information of the target service registration event, including: in response to multiple identification information including the first target identification information, the mapping relationship library is searched to obtain attribute information that matches the first target identification information; the attribute information that matches the first target identification information is determined as the target attribute information of the target service registration event.

[0008] Optionally, determining the target interface type corresponding to the target attribute information includes: in response to the attribute information including the target attribute information, searching a mapping relationship library to obtain the target interface type, wherein the mapping relationship library is also used to store the mapping relationship between different attribute information and different interface types, and the interface type is used to indicate the type of interface corresponding to the attribute information.

[0009] Optionally, in an interface file that satisfies the target interface type, searching for a target function called by a target service registration event, including: generating an interface file in response to a file generation command corresponding to the interface type, wherein the interface file is used to store at least a mapping relationship between a function called by the service registration event and the identification information of the function; and determining the target function based on the interface file and the identification information of the function.

[0010] Optionally, based on the identification information of the interface file and the function, the target function is determined, including: in response to the identification information of the function including second target identification information, the interface file is searched to obtain a function that matches the second target identification information, wherein the second target identification information is used to represent an identification code assigned to the target function; and the function that matches the second target identification information is determined as the target function.

[0011] Optionally, the method also includes: determining target data streams corresponding to multiple processes, wherein the target data streams are used to represent different service registration events occurring between the multiple processes; parsing the target data streams to obtain names of different service registration events; assigning different identification information to different service registration events based on the names of different service registration events; and establishing a mapping relationship library based on different identification information and different service registration events.

[0012] Optionally, determining the target data stream corresponding to multiple processes includes: monitoring the initial data stream to obtain a monitoring result, wherein the initial data stream is used to represent an event occurring between multiple processes, and the monitoring result is used to indicate whether the event is an event registered for different services; in response to the monitoring result being that the event is an event registered for different services, determining the initial data stream corresponding to the monitoring result as the target data stream.

[0013] Optionally, a mapping relationship library is established based on different identification information and different service registration events, including: determining the mapping relationship between different service registration events and different identification information; performing statistics on the mapping relationship to obtain statistical results; and establishing a mapping relationship library matching the statistical results.

[0014] According to another aspect of an embodiment of the present invention, a device for locating abnormal codes is also provided. The device may include: an acquisition unit, for acquiring first target identification information of at least one target service registration event occurring between multiple processes in response to multiple processes being in an abnormal communication state, wherein the first target identification information is used to represent the target service registration event; a first search unit, for searching a mapping relationship library based on the first target identification information to obtain target attribute information of the target service registration event, wherein the mapping relationship library is used to store at least the mapping relationship between the attribute information of different service registration events and different identification information, the identification information is used to represent the corresponding service registration event, and the attribute information of the service registration event is used to represent at least the name of the corresponding service registration event; a second search unit, for determining the target interface type corresponding to the target attribute information, and searching for the target function called by the target service registration event in the interface file that meets the target interface type; a positioning unit, for locating the code in the abnormal state from the target function.

[0015] Optionally, the first search unit includes: a first search module, used to search the mapping relationship library in response to multiple identification information including the first target identification information, to obtain attribute information that matches the first target identification information; a first determination module, used to determine the attribute information that matches the first target identification information as the target attribute information of the target service registration event.

[0016] Optionally, the second search unit includes: a second search module, used to search the mapping relationship library in response to the attribute information including the target attribute information, to obtain the target interface type, wherein the mapping relationship library is also used to store the mapping relationship between different attribute information and different interface types, and the interface type is used to indicate the type of interface corresponding to the attribute information.

[0017] Optionally, the second search unit also includes: a generation module, used to generate an interface file in response to a file generation command corresponding to the interface type, wherein the interface file is used to store at least a mapping relationship between a function called by a service registration event and the identification information of the function; a second determination module, used to determine the target function based on the interface file and the identification information of the function.

[0018] Optionally, the second determination module includes: a search submodule, used to search the interface file in response to the function's identification information including second target identification information, to obtain a function that matches the second target identification information, wherein the second target identification information is used to represent an identification code assigned to the target function; and a determination submodule, used to determine the function that matches the second target identification information as the target function.

[0019] Optionally, the device may also include: a determination unit, used to determine a target data stream corresponding to multiple processes, wherein the target data stream is used to represent different service registration events occurring between multiple processes; a parsing unit, used to parse the target data stream to obtain names of different service registration events; an allocation unit, used to allocate different identification information to different service registration events based on the names of different service registration events; and an establishment unit, used to establish a mapping relationship library based on different identification information and different service registration events.

[0020] Optionally, the determination unit may include: a monitoring module, used to monitor the initial data stream and obtain a monitoring result, wherein the initial data stream is used to represent an event occurring between multiple processes, and the monitoring result is used to indicate whether the event is an event registered for different services; a third determination module, used to determine the initial data stream corresponding to the monitoring result as the target data stream in response to the monitoring result being that the event is an event registered for different services.

[0021] Optionally, the establishing unit may include: a third determining module, used to determine the mapping relationship between different service registration events and different identification information; a statistical module, used to count the mapping relationship and obtain statistical results; and an establishing module, used to establish a mapping relationship library matching the statistical results.

[0022] According to another aspect of an embodiment of the present invention, a vehicle is provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes any one of the above methods when running.

[0023] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored executable program, wherein when the executable program runs, the device where the storage medium is located is controlled to execute any one of the above methods.

[0024] According to another aspect of an embodiment of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, any one of the above methods is implemented.

[0025] In an embodiment of the present invention, when locating abnormal code, in response to the abnormal communication state between multiple processes, the first target identification information of at least one target service registration event occurring between multiple processes can be obtained. According to the first target identification information obtained, the mapping relationship library is searched to obtain the target attribute information of the target service registration event. The target interface type corresponding to the obtained target attribute information is determined, and the target function called by the target service registration event is searched in the interface file that meets the target interface type, and the code in the abnormal state can be located from the found target function. Since the embodiment of the present application responds to the abnormal communication state between multiple processes, according to the first target identification information obtained, the mapping relationship library is searched to obtain the target attribute information, and then the target interface type corresponding to the target attribute information is determined, and the target function called in the interface file that meets the target interface type is searched, and the code in the abnormal state can be located from the found target function, thereby achieving the purpose of timely determining the location of the abnormal code, thereby solving the technical problem of low efficiency in locating the abnormal code, and then achieving the technical effect of improving the efficiency of locating the abnormal code. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0027] Figure 1 is a schematic diagram of an application scenario of a method for locating an abnormal code according to an embodiment of the present invention;

[0028] FIG. 2( a ) is a flow chart of a method for locating an abnormal code according to the related art;

[0029] FIG2( b ) is a flow chart of a method for establishing a mapping table according to an embodiment of the present invention;

[0030] FIG2( c ) is a flow chart of a method for locating an abnormal code according to an embodiment of the present invention;

[0031] FIG2( d ) is a schematic diagram of data interaction between a vehicle and a server according to an embodiment of the present invention;

[0032] Figure 3 is a structural block diagram of a device for locating an abnormal code according to an embodiment of the present invention;

[0033] Figure 4 is a structural block diagram of a vehicle according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0036] According to an embodiment of the present invention, a method for locating an abnormal code is provided.

[0037] As an optional implementation, the above abnormal code location method can be applied to, but not limited to, Figure 1 The application scenario shown. Figure 1 is a schematic diagram of an application scenario of a method for locating an abnormal code according to an embodiment of the present invention, such as Figure 1 As shown, in the application scenario, the terminal device 10 can communicate with the server 13 through the network 11, but is not limited to, and the server 13 can perform operations on the database, such as writing data operations or reading data operations. The terminal device 10 can include, but is not limited to, a human-computer interaction screen, a processor, and a memory. The human-computer interaction screen can be used to display a virtual machine on the terminal device 10, but is not limited to. The vehicle 12 can be used to respond to the human-computer interaction operation, perform a corresponding operation, or generate a corresponding instruction, and send the generated instruction to the server 13.

[0038] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0039] Figure 1is a schematic diagram of an application scenario of a method for locating an abnormal code according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0040] Step S102: in response to a plurality of processes being in an abnormal communication state, obtaining first target identification information of at least one target service registration event occurring between the plurality of processes.

[0041] In the technical solution provided in the above step S102 of the present invention, the above first target identification information can be used to represent a target service registration event. The target service registration event can be used to represent an event that occurs between multiple processes when a service registration data stream is monitored. For example, the above first target identification information can be represented by the code (node_id) of the target service registration event, and the target service registration event can be, but is not limited to, an activity service registration event, which is only used as an example here and is not specifically limited.

[0042] In this embodiment, the abnormal communication state can be used to indicate that the service (binder service) for implementing communication between processes is in an abnormal state, that is, the communication state between multiple processes is an abnormal communication state. For example, when the binder service is in an abnormal state, data sharing and function expansion through the binder service cannot be used normally, which is only used as an example and is not specifically limited.

[0043] In this embodiment, in response to the abnormal communication state between multiple processes, the first target identification information of at least one target service registration event occurring between the multiple processes is obtained. Optionally, this embodiment monitors the communication state between the multiple processes in real time. If the communication state between the multiple processes is detected to be an abnormal communication state, the first target identification information of at least one target service registration event occurring between the multiple processes is obtained. For example, the code of the activity service registration event occurring between the multiple processes may be obtained. This is only an example and is not specifically limited.

[0044] Optionally, if the multiple processes include: a first process, a second process, and a third process, the communication state between the first process and the second process is monitored in real time, the communication state between the second process and the third process is monitored in real time, and the communication state between the first process and the third process is also monitored in real time. If the communication state between the first process and the second process is monitored as an abnormal communication state, the first target identification information of at least one target service registration event occurring between the first process and the second process is obtained, for example, the code of the activity service registration event occurring between the first process and the second process can be obtained. If the communication state between the second process and the third process is monitored as an abnormal communication state, the first target identification information of at least one target service registration event occurring between the second process and the third process is obtained, for example, the code of the activity service registration event occurring between the second process and the third process can be obtained. If the communication state between the first process and the third process is monitored as an abnormal communication state, the first target identification information of at least one target service registration event occurring between the first process and the third process is obtained, for example, the code of the activity service registration event occurring between the first process and the third process can be obtained, which is only used as an example and is not specifically limited.

[0045] Optionally, if the communication status between the first process and the second process is monitored to be an abnormal communication status, and the communication status between the second process and the third process is monitored to be an abnormal communication status, then the first target identification information of at least one target service registration event occurring between the first process and the second process is obtained, and the first target identification information of at least one target service registration event occurring between the second process and the third process is obtained. This is only an example and is not specifically limited.

[0046] Optionally, if the communication status between the first process and the second process is monitored to be an abnormal communication status, and the communication status between the first process and the third process is monitored to be an abnormal communication status, then the first target identification information of at least one target service registration event occurring between the first process and the second process is obtained, and the first target identification information of at least one target service registration event occurring between the first process and the third process is obtained. This is only an example and is not specifically limited.

[0047] Step S104: Based on the first target identification information, a mapping relationship library is searched to obtain target attribute information of the target service registration event.

[0048] In the technical solution provided in the above step S104 of the present invention, the above mapping relationship library can be used to at least store the mapping relationship between the attribute information of different service registration events and different identification information. The attribute information of the service registration event can be used to at least represent the name of the corresponding service registration event. The identification information can be used to represent the corresponding service registration event. For example, if the service registration event is an activity service registration event, the attribute information of the service registration event can be the name of the activity service registration event, and the identification information can be the code of the activity service registration event, which is only used as an example here and is not specifically limited.

[0049] In this embodiment, the target attribute information of the target service registration event can be used to at least indicate the name of the corresponding target service registration event. For example, if the target service registration event is an activity service registration event, the target attribute information of the target service registration event can be the name of the activity service registration event, which is only used as an example and is not specifically limited.

[0050] In this embodiment, in response to the abnormal communication state between multiple processes, after obtaining the first target identification information of at least one target service registration event occurring between the multiple processes, the mapping relationship library is searched based on the first target identification information to obtain the target attribute information of the target service registration event. Optionally, on the basis of obtaining the first target identification information, this embodiment determines the relationship between the different identification information stored in the mapping relationship library and the obtained first target identification information. If it is determined that the different identification information stored in the mapping relationship library includes the obtained first target identification information, the attribute information of the different service registration events stored in the mapping relationship library is searched to obtain the target attribute information of the target service registration event.

[0051] It should be noted that the above method of searching the mapping relationship library based on the first target identification information to obtain the target attribute information of the target service registration event is only an example and is not specifically limited here. As long as the first target identification information can be used to search the mapping relationship library to obtain the target attribute information, the process and method are within the protection scope of the embodiments of the present application and will not be described one by one here.

[0052] Step S106, determining the target interface type corresponding to the target attribute information, and searching for the target function called by the target service registration event in the interface file that meets the target interface type.

[0053] In the technical solution provided in step S106 of the present invention, the target interface type can be used to represent the type of interface responsible for managing the start, pause, stop and destruction of an application, managing the task stack of an application, and processing the interaction between applications. The interface file can be used to represent a file for performing a remote service call in an application. The target function can be used to represent a service function called by a target service registration event.

[0054] In this embodiment, after searching the mapping relationship library based on the first target identification information and obtaining the target attribute information of the target service registration event, the target interface type corresponding to the target attribute information is determined, and the target function called by the target service registration event is searched in the interface file that meets the target interface type. Optionally, this embodiment, based on obtaining the target attribute information of the target service registration event, determines the relationship between the attribute information of different service registration events stored in the mapping relationship library and the target attribute information. If it is determined that the attribute information of different service registration events stored in the mapping relationship library includes the target attribute information, the target interface type corresponding to the target attribute information can be determined. Then, in the interface file that meets the target interface type, the target function called by the target service registration event can be found based on the identification information of the function.

[0055] Optionally, if the target attribute information of the target service registration event is the name of the activity service registration event, the target interface type can be the interface type corresponding to the activity service (IActivityManager), the interface file that meets the target interface type can be a remote service call interface file (IActivityManager.java file) that meets the IActivityManager interface type, and the target function can be the service function (getOption()) called by the activity service registration event. This is only an example and is not specifically limited.

[0056] Step S108, locating the code in the abnormal state from the target function.

[0057] In the technical solution provided in the above step S108 of the present invention, after determining the target interface type corresponding to the target attribute information and searching for the target function called by the target service registration event in the interface file that meets the target interface type, the code in the abnormal state is located from the target function. Optionally, this embodiment performs an abnormality detection on the found target function based on finding the target function called by the target service registration event. If it is detected that the found target function is in an abnormal state, the underlying code of the target function is determined as the code in the abnormal state, thereby achieving the purpose of completing the location of the abnormal code.

[0058] As an optional example, in the above steps S102 to S108 of the present application, when the same route as the last time you drove is chosen for this driving, the AI ​​driver can be activated to drive the vehicle according to the acquired navigation information. During the driving process of the vehicle, the driving scene of the vehicle is detected in real time. In response to the abnormal communication state between multiple processes, the AI ​​driver can obtain the first target identification information of at least one target service registration event occurring between multiple processes. The AI ​​driver searches the mapping relationship library based on the acquired first target identification information to obtain the target attribute information of the target service registration event. Therefore, the AI ​​driver determines the target interface type corresponding to the obtained target attribute information, and searches for the target function called by the target service registration event in the interface file that meets the target interface type, and from the found target function, the code in the abnormal state can be located.

[0059] It should be noted that the abnormal code positioning method in this application can also be applied to at least the following scenarios: assisted driving scenario and passive driving scenario (which can be referred to as human driving scenario). Among them, the assisted driving scenario can be used to indicate the scenario in which the vehicle's control system provides assistance during the driving process, but the driver still needs to maintain control and supervision of the driving, and the passive driving scenario can be used to indicate the scenario in which the driver controls the vehicle to complete the driving operation.

[0060] In the artificial intelligence AI driving of autonomous vehicles, commuting mode usually refers to a driving mode designed for commuting or daily commuting. Among them, the AI ​​driving can collect data by learning the user's driving route and driving behavior. When all the learning is completed, the collected data is screened and checked, and then the full segment of data after screening and checking is automatically transmitted back to the cloud server to execute the construction of the cloud map. The next time you drive and choose the same route, the AI ​​driving will be activated, and the vehicle will be driven to the destination of the route according to the constructed cloud map. Among them, matching and complementing the offline map with the constructed cloud map can improve the accuracy of the map.

[0061] In the above steps S102 to S108 of the present application, when locating the abnormal code, in response to the abnormal communication state between multiple processes, the first target identification information of at least one target service registration event occurring between multiple processes can be obtained. According to the first target identification information obtained, the mapping relationship library is searched to obtain the target attribute information of the target service registration event. The target interface type corresponding to the obtained target attribute information is determined, and the target function called by the target service registration event is searched in the interface file that meets the target interface type, and the code in the abnormal state can be located from the found target function. Since the embodiment of the present application responds to the abnormal communication state between multiple processes, according to the first target identification information obtained, the mapping relationship library is searched to obtain the target attribute information, and then the target interface type corresponding to the target attribute information is determined, and the target function called is searched in the interface file that meets the target interface type, and the code in the abnormal state can be located from the found target function, thereby achieving the purpose of timely determining the location of the abnormal code, thereby solving the technical problem of low efficiency in locating the abnormal code, and then achieving the technical effect of improving the efficiency of locating the abnormal code.

[0062] The above method of this embodiment is further introduced below.

[0063] As an optional implementation method, step S104, based on the first target identification information, searches the mapping relationship library to obtain target attribute information of the target service registration event, including: in response to multiple identification information including the first target identification information, searches the mapping relationship library to obtain attribute information that matches the first target identification information; and determines the attribute information that matches the first target identification information as the target attribute information of the target service registration event.

[0064] In this embodiment, the mapping relationship library can display the mapping relationship between the attribute information of different service registration events and different identification information in the form of a mapping relationship table. It should be noted that the above display form is only for example and is not specifically limited.

[0065] In this embodiment, in response to the abnormal communication state between multiple processes, after obtaining the first target identification information of at least one target service registration event occurring between the multiple processes, in response to the multiple identification information including the first target identification information, the mapping relationship library is searched to obtain the attribute information matching the first target identification information. Optionally, based on the acquisition of the first target identification information, this embodiment determines the relationship between the different identification information stored in the mapping relationship library and the acquired first target identification information. If it is determined that the different identification information stored in the mapping relationship library includes the acquired first target identification information, the attribute information of the different service registration events stored in the mapping relationship library is searched to obtain the attribute information matching the first target identification information.

[0066] In this embodiment, after obtaining the attribute information matching the first target identification information, the attribute information matching the first target identification information is determined as the target attribute information of the target service registration event. Optionally, on the basis of obtaining the attribute information matching the first target identification information, this embodiment determines the name of the service registration event matching the first target identification information as the name of the target service registration event, thereby achieving the purpose of determining the name of the target service registration event according to the encoding of the target service registration event, thereby achieving the technical effect of improving the cold start speed.

[0067] The method for determining the target interface type corresponding to the target attribute information of this embodiment is further described below.

[0068] As an optional implementation manner, step S106, determining the target interface type corresponding to the target attribute information, includes: in response to the attribute information including the target attribute information, searching a mapping relationship library to obtain the target interface type.

[0069] In this embodiment, the mapping relationship library can also be used to store mapping relationships between different attribute information and different interface types. The interface type can be used to indicate the type of interface corresponding to the attribute information, which is only used as an example and is not specifically limited.

[0070] In this embodiment, after searching the mapping relationship library based on the first target identification information to obtain the target attribute information of the target service registration event, in response to the attribute information including the target attribute information, searching the mapping relationship library to obtain the target interface type. Optionally, on the basis of obtaining the target attribute information of the target service registration event, this embodiment determines the relationship between the attribute information of different service registration events stored in the mapping relationship library and the target attribute information. If it is determined that the attribute information of different service registration events stored in the mapping relationship library includes the target attribute information, searching the different interface types stored in the mapping relationship library can obtain the target interface type corresponding to the target attribute information, thereby achieving the purpose of determining the interface type.

[0071] Optionally, if the target attribute information of the target service registration event is the name of the activity service registration event, the relationship between the names of different service registration events stored in the mapping relationship library and the name of the activity service registration event is judged. If it is judged that the names of different service registration events stored in the mapping relationship library include the name of the activity service registration event, the different interface types stored in the mapping relationship library are searched to obtain the interface type (IActivityManager) corresponding to the activity service. This is only an example and is not specifically limited.

[0072] The following further describes the method for searching for a target function called by a target service registration event in an interface file that meets the target interface type in this embodiment.

[0073] As an optional implementation method, step S106 searches for the target function called by the target service registration event in the interface file that meets the target interface type, including: generating an interface file in response to a file generation command corresponding to the interface type; and determining the target function based on the identification information of the interface file and the function.

[0074] In this embodiment, the interface file can be used to store at least the mapping relationship between the function called by the service registration event and the identification information of the function. The mapping relationship between the function called by the service registration event and the identification information of the function can be one-to-one. In other words, the function called by the service registration event can have unique identification information, and the identification information can be represented by the identification code (code_id) of the function, which is only used as an example here and is not specifically limited.

[0075] In this embodiment, after searching the mapping relationship library based on the first target identification information and obtaining the target attribute information of the target service registration event, an interface file is generated in response to a file generation command corresponding to the interface type. Optionally, based on determining the target interface type corresponding to the target attribute information, if the file generation command corresponding to the interface type is an Android Interface Definition Language (AIDL) command, an interface file that meets the target interface type can be generated. For example, a remote service call interface file (IActivityManager.java file) that meets the interface type (IActivityManager) corresponding to the activity service can be generated. This is only an example and is not specifically limited.

[0076] In this embodiment, after the interface file is generated in response to the file generation command corresponding to the interface type, the target function is determined based on the interface file and the identification information of the function. Optionally, this embodiment searches the generated interface file according to the identification information of the function on the basis of generating the interface file, and can obtain the target function called by the target service registration event, thereby achieving the purpose of finding the target function, and further achieving the technical effect of improving the efficiency of finding the target function.

[0077] Optionally, if the interface file that meets the target interface type is an IActivityManager.java file, the target function called by the activity service registration event can be obtained by searching the IActivityManager.java file according to the identification information of the function called by the service registration event. This is only an example and is not specifically limited.

[0078] The method for determining the target function based on the interface file and the identification information of the function in this embodiment is further described below.

[0079] As an optional implementation method, the target function is determined based on the identification information of the interface file and the function, including: in response to the function identification information including second target identification information, the interface file is searched to obtain a function that matches the second target identification information; and the function that matches the second target identification information is determined as the target function.

[0080] In this embodiment, the second target identification information can be used to represent the identification code assigned to the target function. For example, the second target identification information can be code_id(224) assigned to the target function (getOption()) called by the activity service registration event, which is only used as an example and is not specifically limited.

[0081] In this embodiment, after the interface file is generated in response to the file generation command corresponding to the interface type, the interface file is searched in response to the identification information of the function including the second target identification information to obtain the function matching the second target identification information. Optionally, this embodiment determines the relationship between the identification information of the function and the second target identification information on the basis of generating the interface file, and if it is determined that the identification information of the function includes the second target identification information, the function called by the service registration event stored in the interface file is searched to obtain the function matching the second target identification information.

[0082] In this embodiment, after obtaining the function matching the second target identification information, the function matching the second target identification information is determined as the target function. Optionally, on the basis of obtaining the function matching the second target identification information, this embodiment determines the function matching the identification code of the target function as the target function called by the target service registration event, thereby achieving the purpose of determining the target function called by the target service registration event, and further achieving the technical effect of improving the cold start speed.

[0083] Optionally, a function matching the identification code of the target function is determined as the target function called by the target service registration event. For example, a function (getOption()) matching the identification code (code_id=224) of the target function is determined as the target function called by the activity service registration event. This is only an example and is not specifically limited.

[0084] The method for locating the abnormal code of this embodiment is further described below.

[0085] As an optional implementation method, the method also includes: determining the target data stream corresponding to multiple processes; parsing the target data stream to obtain the names of different service registration events; assigning different identification information to different service registration events based on the names of different service registration events; and establishing a mapping relationship library based on different identification information and different service registration events.

[0086] In this embodiment, the above-mentioned target data stream can be used to represent different service registration events occurring between multiple processes, wherein the different service registration events may include at least one of the following events: activity service registration event, maintenance (service) service registration event and content provider (Content Provider) service registration event, etc., which are only given as examples here without specific limitations.

[0087] In this embodiment, target data streams corresponding to multiple processes are determined. Optionally, this embodiment monitors the underlying data stream of the binder in real time, and when the underlying data stream of the binder is monitored as the data stream of the service registration event, the monitored data stream of the service registration event is determined as the target data stream, thereby achieving the purpose of determining different service registration events occurring between multiple processes.

[0088] In this embodiment, after determining the target data streams corresponding to multiple processes, the target data streams are parsed to obtain the names of different service registration events. Optionally, based on the determination of the target data stream, this embodiment performs name parsing on the determined target data stream to obtain the names of different service registration events. For example, if the determined target data stream is the data stream of the activity service registration event, the name of the activity service registration event can be obtained by performing name parsing on the target data stream of the activity service registration event, thereby achieving the purpose of being able to parse the name of the service registration event.

[0089] In this embodiment, after obtaining the names of different service registration events, different identification information is assigned to the different service registration events based on the names of the different service registration events. Optionally, this embodiment can assign different codes to different service registration events based on the names of the different service registration events obtained. For example, if the names of the different service registration events obtained are the following names: the name of the activity service registration event, the name of the service service registration event, and the name of the Content Provider service registration event, then according to the above three names, different codes can be assigned to the activity service registration event, the service service registration event, and the Content Provider service registration event, respectively, thereby achieving the purpose of assigning unique identification information to different service registration events.

[0090] In this embodiment, after obtaining the names of different service registration events, a mapping relationship library is established based on different identification information and different service registration events. Optionally, this embodiment can determine the mapping relationship between different service registration events and different identification information based on the names of different service registration events, and can establish a mapping relationship library based on the determined mapping relationship, thereby achieving the purpose of being able to find the name of the target service registration event in the mapping relationship library.

[0091] The method for determining target data flows corresponding to multiple processes in this embodiment is further described below.

[0092] As an optional implementation method, determining the target data stream corresponding to multiple processes includes: monitoring the initial data stream to obtain the monitoring result; in response to the monitoring result being an event for registering events for different services, determining the initial data stream corresponding to the monitoring result as the target data stream.

[0093] In this embodiment, the initial data stream may be used to represent events occurring between multiple processes, wherein the events occurring between multiple processes may include at least one of the following events: service registration event, suspension event, and resumption event, etc., which are only given as examples and are not specifically limited.

[0094] In this embodiment, the above monitoring result can be used to indicate whether the event is a different service registration event. For example, the above monitoring result can be used to indicate that the event is a different service registration event, or it can be used to indicate that the event is not a different service registration event, which is only used as an example and is not specifically limited.

[0095] In this embodiment, the initial data stream is monitored to obtain the monitoring result. Optionally, this embodiment monitors the binder bottom layer data stream in real time to obtain the monitoring result.

[0096] In this embodiment, after the initial data stream is monitored and the monitoring result is obtained, in response to the monitoring result that the event is a different service registration event, the initial data stream corresponding to the monitoring result is determined as the target data stream. Optionally, this embodiment analyzes the obtained monitoring result on the basis of obtaining the monitoring result. If the obtained monitoring result is analyzed to be an event for different service registration events, the initial data stream corresponding to the monitoring result is determined as the target data stream. For example, if the obtained monitoring result is analyzed to be an event for the binder underlying data stream as a service registration event, the data stream of the service registration event corresponding to the monitoring result is determined as the target data stream, thereby achieving the purpose of determining different service registration events occurring between multiple processes.

[0097] The following further describes the method for establishing a mapping relationship library based on different identification information and different service registration events in this embodiment.

[0098] As an optional implementation method, a mapping relationship library is established based on different identification information and different service registration events, including: determining the mapping relationship between different service registration events and different identification information; performing statistics on the mapping relationship to obtain statistical results; and establishing a mapping relationship library that matches the statistical results.

[0099] In this embodiment, the above statistical results can be used to represent the record of the mapping relationship.

[0100] In this embodiment, after different identification information is assigned to different service registration events based on the names of different service registration events, the mapping relationship between different service registration events and different identification information is determined. Optionally, this embodiment can determine the mapping relationship between different service registration events and different identification information on the basis of assigning different identification information to different service registration events. For example, the mapping relationship between the activity service registration event and the encoding of the activity service registration event can be determined, the mapping relationship between the service service registration event and the encoding of the service service registration event can also be determined, and the mapping relationship between the Content Provider service registration event and the encoding of the Content Provider service registration event can also be determined. This is only an example for illustration and is not specifically limited.

[0101] In this embodiment, after determining the mapping relationship between different service registration events and different identification information, the mapping relationship is counted to obtain a statistical result. Optionally, this embodiment, based on determining the above mapping relationship, counts the determined mapping relationship to obtain a statistical result, that is, a record of the mapping relationship can be obtained.

[0102] In this embodiment, after obtaining the statistical results, a mapping relationship library matching the statistical results is established. Optionally, based on the above statistical results, this embodiment establishes a mapping relationship table matching the above statistical results, and converts the established mapping relationship table to obtain a mapping relationship library, thereby achieving the purpose of finding the name of the target service registration event in the mapping relationship library.

[0103] It should be noted that the above conversion can be at least one of the following conversion methods: conversion of storage format, conversion of storage form and conversion of storage space, etc., which are only given as examples here and are not specifically limited.

[0104] The technical solution of the embodiment of the present invention is illustrated below in conjunction with preferred implementation modes.

[0105] Currently, communication anomalies often occur during the communication between processes. In order to find out the cause of the communication anomaly, it is often necessary to check the functions in the service one by one.

[0106] However, in the related art, using the systrace tool, only node_id and code_id can be parsed. Through the parsed above code, the location of the abnormal code cannot be determined in time, resulting in a technical problem of low efficiency in locating the abnormal code. For example, FIG2(a) is a flow chart of a method for locating an abnormal code in the related art. As shown in FIG2(a), the method for locating the abnormal code may include the following steps:

[0107] Step S201, obtaining a system call tracing provider (systrace tool).

[0108] After obtaining the system call tracing provider, the process proceeds to step S202 to analyze the binder exception.

[0109] After the binder exception is analyzed, the process proceeds to step S203 to determine whether it is easy to locate the position of the code in the abnormal state.

[0110] If it is determined that it is not easy to locate the position of the code in the abnormal state, the process proceeds to step S204, where a large amount of time is spent to locate the position of the code in the abnormal state.

[0111] After spending a lot of time to locate the position of the code in the abnormal state, the process proceeds to step S205 to determine whether the position of the code in the abnormal state has been located.

[0112] If it is determined that the position of the code in the abnormal state is located, then the process proceeds to step S206 and step S207, and the abnormal code is found according to the position of the code in the abnormal state, and the problem of the abnormal code is repaired. If it is determined that the position of the code in the abnormal state is not located, then the process proceeds to step S208, and reports that the position of the code in the abnormal state is not located.

[0113] In the related art, the time required for locating the abnormal code by executing the above method is also difficult to guarantee. For example, in the related art, in response to the abnormal communication state between multiple processes, there are high-frequency binder calls, which often take too much time, for example, 191.3ms. That is to say, the time-consuming high-frequency binder call is to alternately query the activity service from the service manager, and then use the getOption() function of the activity service (whose location can be located in the path ( / FeatureFactory.java)), which causes the cold start to take 191.3ms, and thus there is a defect of low cold start speed, which leads to the technical problem of low efficiency in locating the abnormal code.

[0114] For example, within 89 ms, 139 synchronous binder calls occur. Among them, these 139 synchronous binder calls are periodic queries to the service manager for services. You can also use the service function code_id=224 with node_id=826, which is only used as an example and is not specifically limited.

[0115] However, the embodiment of the present invention proposes a method for locating an abnormal code. In the process of locating the abnormal code, the type of the target service registration event can be obtained by searching in the mapping relationship library according to the first target identification information of the target service registration event between the acquired processes. Then, the abnormal code can be located from the target function called by the target service registration event, thereby achieving the purpose of timely determining the location of the abnormal code, thereby solving the technical problem of low efficiency in locating the abnormal code, and further achieving the technical effect of improving the efficiency of locating the abnormal code.

[0116] In this embodiment, by establishing a mapping table, the name of the service registration event can be quickly found. For example, FIG2(b) is a flowchart of a method for establishing a mapping table according to an embodiment of the present invention. As shown in FIG2(b), the method for establishing a mapping table may include the following steps:

[0117] Step S211: Initiate a service registration request using the service process.

[0118] After the service registration request is initiated by the service process, the process proceeds to step S212, where the binder driver monitors and records the service name to be registered.

[0119] In the technical solution provided in the above step S212 of the present invention, the binder bottom layer data stream is monitored in real time, and when the binder bottom layer data stream is monitored as the data stream of the service registration event, the service name of the service registration event is recorded.

[0120] In the binder driver, after monitoring and recording the service name to be registered, the process proceeds to step S213, where a node_id is allocated when the service is registered.

[0121] After the node_id is allocated, the process proceeds to step S214 to establish a mapping relationship between the service name and the node_id.

[0122] In the technical solution provided in the above step S214 of the present invention, when creating a service to allocate a node_id, a mapping relationship is established between the service name and the node_id.

[0123] After the mapping relationship between the service name and the node_id is established, the process proceeds to step S215 to collect statistics of all the established mapping relationships into a mapping table.

[0124] After all established mapping relationships are counted into a mapping table, the process proceeds to step S216 to export the mapping table obtained by counting.

[0125] In the technical solution provided in the above step S216 of the present invention, the statistically obtained mapping table ( / proc / binder_assist) is exported through the file node.

[0126] Step S217, analyzing problems between multiple processes in abnormal communication states.

[0127] After analyzing the problems between the multiple processes in the abnormal communication state, proceed to step S218 to obtain the node_id and code_id from the systrace tool.

[0128] In the technical solution provided in the above step S218 of the present invention, according to the exported mapping table ( / proc / binder_assist), the obtained node_id and code_id are looked up in the table, and the mapping relationship between the node_id and the name of the service registration event, as well as the mapping relationship between the code_id and the function called by the service registration event can be obtained, thereby determining the target function called by the target service registration event.

[0129] After looking up the obtained node_id and code_id according to the derived mapping table, the process proceeds to step S219 to locate the position of the code in the abnormal state.

[0130] In this embodiment, on the basis of establishing a mapping table, the location of the abnormal code can be quickly located by using the abnormal code location method. For example, FIG2(c) is a flow chart of an abnormal code location method according to an embodiment of the present invention. As shown in FIG2(c), the abnormal code location method may include the following steps:

[0131] Step S221, obtaining a system call tracing provider (systrace tool).

[0132] After obtaining the system call tracing provider (systrace tool), proceed to step S222 to analyze the binder exception.

[0133] After the binder exception is analyzed, the process proceeds to step S223 to determine whether it is easy to locate the position of the code in the abnormal state.

[0134] If it is determined that the position of the code in the abnormal state is easy to locate, then proceed to step S224 and step S225 to find the abnormal code based on the position of the code in the abnormal state and to repair the problem of the abnormal code.

[0135] In this embodiment, the time required for locating the abnormal code by executing the above-mentioned abnormal code locating method can be less than the time required for locating the abnormal code by using the method in the related art. For example, in response to the abnormal communication state between multiple processes, there is no high-frequency binder call, and the cold start time can be 112.7ms. Compared with the 191.3ms cold start time required for locating the abnormal code by using the method in the related art, the abnormal code locating method in the present application can save 78.6ms of cold start time, thereby overcoming the defect of low cold start speed in the related art, thereby solving the technical problem of low efficiency of locating the abnormal code, and then achieving the technical effect of improving the efficiency of locating the abnormal code.

[0136] In this embodiment, by executing the above-mentioned abnormal code location method, it is possible to determine the identification code code_id=0xe0 of the target function called by the target service registration event, that is, code_id=224. The code node_id=826 of the target service registration event.

[0137] In this embodiment, the method for locating the abnormal code in this application can be used to obtain the exported mapping table. By looking up the exported mapping table, it can be obtained that node_id=826 corresponds to the activity service, and the interface class IActivityManager corresponding to the activity service can also be obtained. Then, in response to the file generation command corresponding to the interface type, an interface file (IActivityManager.java file) that meets the target interface type can be generated. According to code_id=224, a search is performed in the IActivityManager.java file, and it can be obtained that the service function of the activity service corresponding to code_id=224 is getOption().

[0138] In this embodiment, the navigation information of the vehicle can be obtained through the server, and the vehicle can be driven according to the obtained navigation information. In the process of driving the vehicle, in response to the abnormal communication state between multiple processes, the first target identification information of at least one target service registration event occurring between multiple processes can be obtained through the server. Through the server, according to the obtained first target identification information, the mapping relationship library is searched to obtain the target attribute information of the target service registration event. Through the server, the target interface type corresponding to the obtained target attribute information can be determined, and the target function called by the target service registration event can be searched in the interface file that meets the target interface type, and from the found target function, the code in the abnormal state can be located, and the code in the abnormal state can be repaired. After the code in the abnormal state is repaired, the server synchronizes the repaired code to the operating system of the vehicle. For example, Figure 2 (d) is a schematic diagram of data interaction between a vehicle and a server according to an embodiment of the present invention. As shown in Figure 2 (d), the server 231 can locate the code in the operating system of the vehicle 230 in the abnormal state, repair the code in the abnormal state, and synchronize the repaired code to the operating system of the vehicle 230.

[0139] In this embodiment, the method for locating the abnormal code in the present application is adopted to obtain the exported mapping table. By looking up the exported mapping table, the name of the target service registration event corresponding to the node_id can be obtained, and the target interface type corresponding to the target service registration event can also be obtained. Then, in response to the file generation command corresponding to the interface type, an interface file that meets the target interface type can be generated. According to code_id, a search is performed in the interface file, and the service function called by the service registration event corresponding to code_id can be obtained as getOption(), thereby achieving the purpose of timely determining the location of the abnormal code, thereby solving the technical problem of low efficiency in locating the abnormal code, and then achieving the technical effect of improving the efficiency of locating the abnormal code.

[0140] According to another aspect of the embodiment of the present invention, corresponding to the embodiment of the above-mentioned method for locating an abnormal code, this specification also provides an abnormal code locating device for executing the above-mentioned method for locating an abnormal code, Figure 3 is a structural block diagram of a device for locating an abnormal code according to an embodiment of the present invention, such as Figure 3 As shown, the abnormal code positioning device 300 may include: an acquisition unit 302 , a first search unit 304 , a second search unit 306 and a positioning unit 308 .

[0141] The acquisition unit 302 is used to acquire first target identification information of at least one target service registration event occurring between the multiple processes in response to the multiple processes being in an abnormal communication state, wherein the first target identification information is used to represent the target service registration event.

[0142] The first search unit 304 is used to search the mapping relationship library based on the first target identification information to obtain the target attribute information of the target service registration event, wherein the mapping relationship library is used to at least store the mapping relationship between the attribute information of different service registration events and the different identification information, the identification information is used to represent the corresponding service registration event, and the attribute information of the service registration event is used to at least represent the name of the corresponding service registration event.

[0143] The second searching unit 306 is used to determine the target interface type corresponding to the target attribute information, and to search for the target function called by the target service registration event in the interface file that meets the target interface type.

[0144] The positioning unit 308 is used to locate the code in the abnormal state from the target function.

[0145] Optionally, the first search unit 304 includes: a first search module, used to search the mapping relationship library in response to multiple identification information including the first target identification information, to obtain attribute information that matches the first target identification information; a first determination module, used to determine the attribute information that matches the first target identification information as the target attribute information of the target service registration event.

[0146] Optionally, the second search unit 306 includes: a second search module, used to search the mapping relationship library in response to the attribute information including the target attribute information, to obtain the target interface type, wherein the mapping relationship library is also used to store the mapping relationship between different attribute information and different interface types, and the interface type is used to indicate the type of interface corresponding to the attribute information.

[0147] Optionally, the second search unit 306 also includes: a generation module, used to generate an interface file in response to a file generation command corresponding to the interface type, wherein the interface file is used to store at least a mapping relationship between a function called by a service registration event and the identification information of the function; a second determination module, used to determine the target function based on the interface file and the identification information of the function.

[0148] Optionally, the second determination module includes: a search submodule, used to search the interface file in response to the function's identification information including second target identification information, to obtain a function that matches the second target identification information, wherein the second target identification information is used to represent an identification code assigned to the target function; and a determination submodule, used to determine the function that matches the second target identification information as the target function.

[0149] Optionally, the exception code locating device 300 may also include: a determination unit, used to determine a target data stream corresponding to multiple processes, wherein the target data stream is used to represent different service registration events occurring between multiple processes; a parsing unit, used to parse the target data stream to obtain the names of different service registration events; an allocation unit, used to allocate different identification information to different service registration events based on the names of different service registration events; and an establishment unit, used to establish a mapping relationship library based on different identification information and different service registration events.

[0150] Optionally, the determination unit may include: a monitoring module, used to monitor the initial data stream and obtain a monitoring result, wherein the initial data stream is used to represent an event occurring between multiple processes, and the monitoring result is used to indicate whether the event is an event registered for different services; a third determination module, used to determine the initial data stream corresponding to the monitoring result as the target data stream in response to the monitoring result being that the event is an event registered for different services.

[0151] Optionally, the establishing unit may include: a third determining module, used to determine the mapping relationship between different service registration events and different identification information; a statistical module, used to count the mapping relationship and obtain statistical results; and an establishing module, used to establish a mapping relationship library matching the statistical results.

[0152] In this embodiment, the following units are provided in the positioning device of the abnormal code: an acquisition unit, which is used to obtain first target identification information of at least one target service registration event occurring between the multiple processes in response to the multiple processes being in an abnormal communication state, wherein the first target identification information is used to represent the target service registration event; a first search unit, which is used to search the mapping relationship library based on the first target identification information to obtain target attribute information of the target service registration event, wherein the mapping relationship library is used to at least store the mapping relationship between the attribute information of different service registration events and different identification information, the identification information is used to represent the corresponding service registration event, and the attribute information of the service registration event is used to at least represent the name of the corresponding service registration event; a second search unit, which is used to determine the target interface type corresponding to the target attribute information, and to search for the target function called by the target service registration event in the interface file that meets the target interface type; a positioning unit, which is used to locate the code in the abnormal state from the target function, thereby achieving the purpose of timely determining the location of the abnormal code, thereby solving the technical problem of low efficiency in locating the abnormal code, and further achieving the technical effect of improving the efficiency of locating the abnormal code.

[0153] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored executable program, wherein when the executable program runs, the device where the storage medium is located is controlled to execute any one of the above methods.

[0154] According to another aspect of an embodiment of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, any one of the above methods is implemented.

[0155] According to another aspect of an embodiment of the present invention, a vehicle is provided, including: a memory storing an executable program; and a processor running the program, wherein the program executes any one of the above methods when running.

[0156] Figure 4 is a structural block diagram of a vehicle according to an embodiment of the present invention. Figure 4 As shown, the components of the vehicle 400 include but are not limited to a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and the database 450 is used to store data.

[0157] The vehicle 400 may also include an access device 440 that enables the vehicle 400 to communicate via one or more networks 460. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 440 may include one or more of any type of network interface (e.g., a network interface controller (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and the like.

[0158] In one embodiment of the present disclosure, the above components of the vehicle 400 and Figure 4 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 4 The vehicle structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present disclosure. Those skilled in the art may add or replace other components as needed.

[0159] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0160] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0161] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units can be a logical function division, and there can be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0162] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0163] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0164] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, referred to as Read-Only Memory), random access memory (RAM, referred to as Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc., which can store program code.

[0165] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for locating an abnormal code, characterized in that: include: In response to the abnormal communication state between the multiple processes, obtaining first target identification information of at least one target service registration event occurring between the multiple processes, wherein the first target identification information is used to represent the target service registration event; Based on the first target identification information, searching a mapping relationship library to obtain target attribute information of the target service registration event, wherein the mapping relationship library is used to store at least a mapping relationship between attribute information of different service registration events and different identification information, the identification information is used to represent the corresponding service registration event, and the attribute information of the service registration event is used to represent at least a name of the corresponding service registration event; Determine a target interface type corresponding to the target attribute information, and search for a target function called by the target service registration event in an interface file that meets the target interface type; From the target function, locate the code in the abnormal state.

2. The method according to claim 1, characterized in that Based on the first target identification information, a mapping relationship library is searched to obtain target attribute information of the target service registration event, including: In response to the plurality of identification information including the first target identification information, searching the mapping relationship library to obtain attribute information matching the first target identification information; The attribute information matching the first target identification information is determined as the target attribute information of the target service registration event.

3. The method according to claim 1, characterized in that: Determining a target interface type corresponding to the target attribute information includes: In response to the attribute information including the target attribute information, the mapping relationship library is searched to obtain the target interface type, wherein the mapping relationship library is also used to store the mapping relationship between different attribute information and different interface types, and the interface type is used to indicate the type of interface corresponding to the attribute information.

4. The method according to claim 3, characterized in that In the interface file that meets the target interface type, searching for the target function called by the target service registration event includes: In response to a file generation command corresponding to the interface type, generating the interface file, wherein the interface file is used to store at least a mapping relationship between a function called by the service registration event and identification information of the function; The target function is determined based on the interface file and the identification information of the function.

5. The method according to claim 4, characterized in that Determining the target function based on the interface file and the identification information of the function includes: In response to the identification information of the function including second target identification information, searching the interface file to obtain a function matching the second target identification information, wherein the second target identification information is used to represent an identification code allocated to the target function; A function matching the second target identification information is determined as the target function.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Determine target data streams corresponding to the multiple processes, wherein the target data streams are used to represent the different service registration events occurring between the multiple processes; Parsing the target data stream to obtain the names of the different service registration events; Based on the names of the different service registration events, assigning the different identification information to the different service registration events; The mapping relationship library is established based on the different identification information and the different service registration events.

7. The method according to claim 6, characterized in that Determining target data flows corresponding to the multiple processes includes: Monitoring the initial data stream to obtain a monitoring result, wherein the initial data stream is used to represent an event occurring between the multiple processes, and the monitoring result is used to represent whether the event is a registration event for the different services; In response to the monitoring result indicating that the event is the different service registration event, the initial data flow corresponding to the monitoring result is determined as the target data flow.

8. The method according to claim 6, characterized in that Based on the different identification information and the different service registration events, establishing the mapping relationship library includes: Determine a mapping relationship between the different service registration events and the different identification information; Performing statistics on the mapping relationship to obtain statistical results; The mapping relationship library matching the statistical results is established.

9. A device for locating an abnormal code, characterized in that: include: an acquiring unit, configured to acquire, in response to a plurality of processes being in an abnormal communication state, first target identification information of at least one target service registration event occurring between the plurality of processes, wherein the first target identification information is used to represent the target service registration event; a first search unit, configured to search a mapping relationship library based on the first target identification information to obtain target attribute information of the target service registration event, wherein the mapping relationship library is configured to store at least a mapping relationship between attribute information of different service registration events and different identification information, the identification information is configured to indicate the corresponding service registration event, and the attribute information of the service registration event is configured to indicate at least a name of the corresponding service registration event; The second search unit is used to determine the target interface type corresponding to the target attribute information, and to search for the target function locating unit called by the target service registration event in the interface file that meets the target interface type, and is used to locate the code in the abnormal state from the target function.

10. A vehicle, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 8 when running.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.

13. A computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.