Method and device for on-line remote debugging of vehicle machine, electronic equipment and storage medium

Real-time communication technology is used to realize the synchronous display of the vehicle screen and code between the client and the host computer, which solves the problem of scene constraints in remote debugging during vehicle debugging and improves debugging efficiency and convenience.

CN118708490APending Publication Date: 2024-09-27CHONGQING CHANGAN TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410829068.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

In the existing technology, it is difficult to achieve remote online debugging for vehicle and machine debugging, especially when the host computer and the vehicle and machine to be tested are not at the same location, resulting in limited debugging work.

Method used

Through real-time communication between the client and the host computer, the screen projection and code editing of the vehicle screen are realized, allowing testers to perform real-time debugging and code editing on the remote client interface, including obtaining screen projection images, monitoring operation events and performing operations. Instructions, parsing component information and other functions.

Benefits of technology

Real-time synchronized display of the car and machine screen and code is realized. Testers can debug the car and machine anytime and anywhere on the web page, which improves debugging efficiency and convenience and solves the problem of scene constraints in remote debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708490A
    Figure CN118708490A
Patent Text Reader

Abstract

The invention relates to a method and device for online remote debugging of a vehicle machine, electronic equipment and a storage medium, and the method comprises the steps: accessing a local code editor of an upper computer based on the address of a remote code editor after entering a debugging environment; selecting a to-be-tested vehicle machine connected with the upper computer and a target screen in the to-be-tested vehicle machine; and obtaining a screen projection image of the target screen transmitted by the upper computer in a real-time communication mode so as to simultaneously carry out vehicle machine screen projection and remote code editing and debugging on a client interface. According to the invention, vehicle debugging work can be carried out anytime and anywhere.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of vehicle computer debugging, and in particular to a method, device, electronic device and storage medium for online remote debugging of a vehicle computer. Background Art

[0002] At present, vehicle computer debugging has always been a very important part in the vehicle computer development and testing process of major automobile companies. Generally speaking, vehicle computer debugging requires the vehicle computer used to be connected to the host computer used by the tester, that is, the personal computer, with a wiring harness. In other words, the vehicle computer equipment and the host computer used to debug the vehicle computer must be in one place and physically bound.

[0003] However, there are still some problems. When the relevant vehicle computer testers in the enterprise are doing the docking work, it will be troublesome if the host computer or the vehicle computer equipment to be tested is not nearby. For example, it is necessary to remotely demonstrate the vehicle computer debugging effect, remotely write and debug the code online in an emergency, and remotely debug the vehicle computer equipment of the host computer outdoors. Obviously, it is difficult to carry out the vehicle computer debugging work in a timely manner under these circumstances. Summary of the invention

[0004] The present application provides a method, device, electronic device and storage medium for online remote debugging of a vehicle computer, so as to solve the problem that remote debugging of a vehicle computer is difficult.

[0005] In a first aspect, the present application provides a method for online remote debugging of a vehicle computer, which is applied to a client, and the method includes:

[0006] After entering the debugging environment, access the local code editor of the host computer based on the address of the remote code editor;

[0007] Selecting a vehicle computer to be tested connected to the host computer and a target screen in the vehicle computer to be tested;

[0008] The projection image of the target screen transmitted by the host computer through real-time communication is obtained, so as to simultaneously perform vehicle screen projection and remote code editing and debugging on the client interface.

[0009] Optionally, after acquiring the projection image of the target screen transmitted by the host computer in real-time communication, the method further includes:

[0010] Monitoring whether an operation event occurs on the screen projection interface of the client;

[0011] If an operation event is detected, the operation instruction corresponding to the operation event is transmitted to the host computer, so that the host computer executes the operation instruction on the vehicle computer to be tested through the automated testing framework;

[0012] The projection image of the target screen after the vehicle machine under test executes the operation instruction is updated in real time on the projection interface.

[0013] Optionally, after acquiring the projection image of the target screen transmitted by the host computer in real-time communication, the method further includes:

[0014] When an operation of calling the host computer interface is detected, a parsing instruction is sent to the host computer, and receiving the projection image is suspended, wherein the parsing instruction is used to instruct parsing component information of the target screen;

[0015] Obtaining the component hierarchy structure and current image frame in the target screen sent by the host computer;

[0016] Determine a positioning frame of each component in the current image frame by parsing the component hierarchy structure and the current image frame;

[0017] The positioning information of the target component is determined according to the positioning frame of the selected target component, so that the tester can use the positioning information to edit the code.

[0018] Optionally, determining a positioning frame of each component in the current image frame by parsing the component hierarchical structure and the current image frame includes:

[0019] Parsing the positioning information of each component in the component hierarchy structure in the current image frame;

[0020] Draw a positioning frame of the component in the current image frame according to the positioning information, and bind the positioning information and the positioning frame;

[0021] Mapping the positioning frames of the various components into the current image frame.

[0022] Optionally, determining the location information of the target component according to the location box of the selected target component includes:

[0023] After the target component is selected on the screen projection interface of the client, a positioning frame of the target component is displayed according to a mapping relationship between the component and the positioning frame;

[0024] According to the binding relationship between the positioning information and the positioning frame of the same component, the positioning information corresponding to the positioning frame is displayed in the screen projection interface.

[0025] Optionally, selecting the vehicle computer to be tested connected to the host computer and a target screen in the vehicle computer to be tested includes:

[0026] Call the interface for querying the vehicle equipment list to obtain multiple vehicle equipment numbers bound to the host computer;

[0027] Determine the vehicle computer to be tested in the vehicle computer equipment list according to the selected vehicle computer equipment number;

[0028] Query all screen numbers associated with the vehicle computer to be tested;

[0029] A target screen among the multiple screens of the vehicle computer to be tested is determined according to the selected screen number, wherein the selected vehicle computer device number and screen number are switchable.

[0030] Optionally, after entering the debugging environment, the method further includes:

[0031] Determine the host computer IP bound to the debugging environment;

[0032] Get the port number of the code editor in the local host computer corresponding to the host computer IP;

[0033] The address of the remote code editor is determined according to the host computer IP and the port number.

[0034] In a second aspect, the present application provides a method for online remote debugging of a vehicle computer, which is applied to a host computer, and the method includes:

[0035] After the client enters the debugging environment, a connection is established with the client through the address of the remote code editor, allowing the client to access the local code editor;

[0036] According to the target screen selected by the client, the projection image of the target screen is transmitted to the client via real-time communication, so that the vehicle screen projection and remote code editing and debugging can be performed simultaneously on the client interface.

[0037] Optionally, according to the target screen selected by the client, transmitting the projection image of the target screen to the client in real-time communication includes:

[0038] Obtaining a screen projection instruction sent by the client;

[0039] Determine the target screen to be projected according to the vehicle device number and screen number carried in the projection instruction;

[0040] Using a screen projection tool to obtain a projection image from the target screen, and taking a screenshot of the projection image at a set frame rate;

[0041] The screenshot is transmitted to the client using the real-time communication method.

[0042] Optionally, before transmitting the projection image of the target screen to the client via real-time communication, the method further includes:

[0043] Get the host computer IP carried in the screen projection instruction;

[0044] Determine the port of the preset transmission protocol;

[0045] The transmission channel of the real-time communication mode is created by using the host computer IP and the port as a splicing route.

[0046] In a third aspect, the present application provides an online remote debugging vehicle device, which is applied to a client, and the device includes:

[0047] The access module is used to access the local code editor of the host computer based on the address of the remote code editor after entering the debugging environment;

[0048] A selection module, used for selecting a vehicle computer to be tested connected to the host computer and a target screen in the vehicle computer to be tested;

[0049] The acquisition module is used to obtain the projection image of the target screen transmitted by the host computer through real-time communication, so as to simultaneously perform vehicle screen projection and remote code editing and debugging on the client interface.

[0050] In a fourth aspect, the present application provides an online remote debugging vehicle device, characterized in that the device comprises:

[0051] A connection module, used to establish a connection with the client through the address of the remote code editor after the client enters the debugging environment, allowing the client to access the local code editor;

[0052] The transmission module is used to transmit the projection image of the target screen to the client through real-time communication according to the target screen selected by the client, so as to simultaneously perform vehicle screen projection and remote code editing and debugging on the client interface.

[0053] In a fifth aspect, the present application provides an electronic device comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus.

[0054] In a sixth aspect, the present application further provides a computer storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the online remote debugging vehicle computer method described in any one of the above items of the present application.

[0055] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:

[0056] On the one hand, the client remotely accesses the local code editor of the host computer to realize remote code editing. On the other hand, it obtains the projection of the vehicle screen in real time through the host computer, and comprehensively displays the code and the vehicle screen on the client interface. This is conducive to testers to perform remote code editing and debugging directly on the web page according to the real-time projection of the vehicle screen. At the same time, the debugging status can be viewed in combination with the real-time projection information of the vehicle screen, freeing themselves from the constraints of the scene and facilitating vehicle debugging work anytime and anywhere. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0059] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0060] Figure 1 A schematic diagram of a system for online remote debugging of a vehicle computer provided in an embodiment of the present application;

[0061] Figure 2 A flow chart of a method for online remote debugging of a vehicle computer provided in an embodiment of the present application;

[0062] Figure 3 A schematic diagram of the platform access process for online remote debugging of a vehicle computer provided in an embodiment of the present application;

[0063] Figure 4 A schematic diagram of a flow chart of remotely accessing a code editor provided in an embodiment of the present application;

[0064] Figure 5 A flowchart of obtaining the projection of the vehicle screen and performing operations provided in an embodiment of the present application;

[0065] Figure 6 A flowchart for updating the vehicle projection screen in real time according to operation events provided in an embodiment of the present application;

[0066] Figure 7 A flowchart for determining the location information of a target component provided in an embodiment of the present application;

[0067] Figure 8 A schematic diagram of the structure of an online remote debugging vehicle device provided in an embodiment of the present application;

[0068] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0069] The following will describe the implementation methods of the present application with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for illustrating the present application, not for limiting the scope of protection of the present application.

[0070] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.

[0071] For ease of description, spatial relative terms may be used in the text to describe the relative position or movement of an element or feature as shown in the figure relative to another element or feature, such as "inside", "outside", "inner side", "outer side", "below", "below", "above", "above", "front", "back", etc. Such spatial relative terms are intended to include different orientations of the device in use or operation in addition to the orientation depicted in the figure. For example, if the device in the figure undergoes a position flip or a change in posture or a change in motion state, then these directional indications will also change accordingly, for example: an element described as "below other elements or features" or "below other elements or features" will subsequently be oriented as "above other elements or features" or "above other elements or features". Therefore, the example term "below..." can include both upper and lower orientations. The device can be oriented otherwise (rotated 90 degrees or in other directions) and the spatial relative descriptors used in the text are interpreted accordingly.

[0072] In order to solve the technical problem that the prior art cannot remotely debug the vehicle computer at any time and anywhere, the embodiment of the present application provides a system for online remote debugging of the vehicle computer, such as Figure 1As shown, the system includes a client, a host computer and a vehicle computer to be tested. The client accesses the host computer through the host computer IP. The host computer and the vehicle computer to be tested are connected through a USB interface or WiFi to implement ADB (Android Debug Bridge) debugging of the vehicle computer.

[0073] Based on the above system, the embodiment of the present application provides a method for online remote debugging of a vehicle computer, which can be applied to a client or a host computer. The embodiment of the present application is described by taking application to a client as an example. Figure 2 As shown, the method comprises the following steps:

[0074] Step 201: After entering the debugging environment, access the local code editor of the host computer based on the address of the remote code editor.

[0075] Based on the host computer IP address list, the client selects the host computer to be bound, then enters the debugging environment corresponding to the host computer, and uses the address of the code editor in the host computer to remotely access the code editor. Remote access to the code editor is a service that runs the code editor remotely online. No installation environment is required. Any client can start code writing as long as it logs in. It also supports access to all files in the remotely connected host computer, which is no different from the operation of the code editor in the actual host computer, making it convenient for testers to directly edit and debug scripts remotely.

[0076] Exemplarily, the code editor is VsCode (Visual Studio Code), and this application does not specifically limit the type of the code editor.

[0077] The client creates a debugging environment and binds it to the host computer, making it easy to enter the debugging environment of the host computer repeatedly and quickly.

[0078] Step 202: Select the vehicle computer to be tested connected to the host computer and the target screen in the vehicle computer to be tested.

[0079] The host computer is connected to multiple vehicle devices, each of which may have multiple display screens, such as a main screen, a secondary screen, a rear screen of the vehicle, a HUD (Heads Up Display) head-up display screen, etc.

[0080] The client obtains a list of vehicle computer devices from the host computer, then selects a vehicle computer to be tested from the list of vehicle computer devices, and then selects a target screen from multiple screens of the vehicle computer to be tested.

[0081] Step 203: Obtain the projection image of the target screen transmitted by the host computer through real-time communication, so as to simultaneously perform vehicle screen projection and remote code editing and debugging on the client interface.

[0082] The client provides the host computer with the device number of the selected vehicle to be tested and the screen number of the target screen. The host computer determines the target screen based on the device number and the screen number, and then obtains the projection image of the target screen through a screen projection tool such as Scrcpy Android screen projection technology, and then transmits the projection image to the client using real-time communication. The real-time communication method can ensure the real-time and efficiency of the client's screen projection. The real-time communication method can use long polling, WebRTC (WebReal-Time Communication, web real-time communication) and WebSocket (a full-duplex communication protocol based on TCP). The embodiment of the present application gives priority to WebSocket.

[0083] The client interface can display the car screen projection and remote code editing at the same time. Testers can debug the car and change the code in real time based on the car screen projection, realizing the integrated effect of remote online code editing, debugging and projection information display.

[0084] Among them, the interface of the car screen projection and the interface of the remote code editing are spliced ​​into the entire client interface. The car screen projection interface and the remote code editing interface can be arranged left and right, or up and down, or the remote code editing interface can occupy a small area in the corner of the client interface, and the car screen projection interface can occupy a large area of ​​the remaining client interface. This application does not limit the arrangement of the car screen projection interface and the remote code editing interface.

[0085] In this application, on the one hand, the client remotely accesses the local code editor of the host computer to realize remote code editing. On the other hand, it obtains the projection of the vehicle screen in real time through the host computer, and comprehensively displays the code and the vehicle screen on the client interface, which is conducive to testers to perform remote code editing and debugging directly on the web page according to the real-time projection of the vehicle screen. At the same time, the debugging status can be viewed in combination with the real-time projection information of the vehicle screen, freeing themselves from the constraints of the scene and facilitating vehicle debugging work anytime and anywhere.

[0086] As an optional implementation method, the user of the client needs to perform relevant login authentication when entering the debugging platform system, specifically, to authenticate whether the user is a tenant recognized by the enterprise. After the authentication is passed, a new car computer debugging environment is created. The main purpose of the new debugging environment is to bind the host computer, so as to facilitate the subsequent quick entry into the car computer debugging interface of the host computer from the created debugging environment.

[0087] Figure 3 This is a schematic diagram of the platform access process for online remote debugging of vehicle computers provided by this application, including the following steps:

[0088] Step 301: User login authentication.

[0089] Step 302: Identify the tenant to which the user belongs.

[0090] Step 303: Create a debugging environment (bind to the host computer).

[0091] This application logs into the debugging platform system through user verification, which can realize multi-person sharing of the debugging platform system. According to tenant permissions, it ensures that multiple people can access the same set of online code editors and car screen projection on the web page at the same time, thereby improving the testing efficiency of testers.

[0092] As an optional implementation method, before the client accesses the local code editor of the host computer, it also needs to know the address of the remote code editor. The method includes: after the client selects the debugging environment, it enters the corresponding debugging environment, then determines the host computer IP bound to the debugging environment, and obtains the port number of the code editor from the local host computer based on the host computer IP. Taking VsCode as an example, the port number is 8080. The client concatenates the host computer IP and the port number to obtain the address of the remote code editor. If the address of the remote code editor is correct, the client can successfully remotely access the local code editor of the host computer, and support online remote viewing of the file directory of the host computer.

[0093] Figure 4 This is a flowchart of remotely accessing the local code editor of the host computer provided by this application, including the following steps:

[0094] Step 401: The client selects a debugging environment and enters the debugging environment.

[0095] Step 402: Determine the host computer IP bound to the debugging environment.

[0096] Step 403: Obtain the port number of the code editor in the local host computer.

[0097] Step 404: Concatenate the host computer IP and port number to obtain the address of the remote code editor.

[0098] Step 405: the address is verified, and the client displays the interface of the code editor of the host computer.

[0099] As an optional implementation, the process of the client obtaining the projection of the vehicle screen and performing operations is as follows: Figure 5 shown.

[0100] Step 501: The client selects the vehicle computer to be tested connected to the host computer and the target screen in the vehicle computer to be tested.

[0101] Step 502: Continuously acquire the projection image of the target screen in real-time communication in combination with the projection tool.

[0102] Step 503: Monitor three control instructions of the client's screen projection interface in real time.

[0103] Step 504: If a "turn off screen projection" instruction is received, stop receiving the screen projection of the target screen.

[0104] Step 505: The operation events such as clicks and drags occurring on the projection interface are transmitted to the host computer in real-time communication mode, and the host computer feeds back the projection image updated after the operation events are executed on the vehicle under test to the client.

[0105] Step 506: the client sends a parsing instruction and pauses real-time screen projection. The host computer parses the component information of the target screen and transmits it to the client. The client uses the component information to conveniently edit the component location information in the test script.

[0106] Among them, only one of step 504, step 505 and step 506 can be executed at the same time.

[0107] In step 501, the steps of selecting the vehicle computer to be tested and the target screen include the following contents: calling the interface for querying the vehicle computer equipment list to obtain multiple vehicle computer equipment numbers bound to the upper computer; determining the vehicle computer to be tested in the vehicle computer equipment list according to the selected vehicle computer equipment number; querying all screen numbers associated with the vehicle computer to be tested; determining the target screen among the multiple screens of the vehicle computer to be tested according to the selected screen number, wherein the selected vehicle computer equipment number and screen number are switchable.

[0108] The client calls the interface for querying the vehicle machine device list, obtains multiple vehicle machine device numbers bound to the host computer, stores the relevant information of multiple vehicle machine devices such as device numbers in the database, and automatically allocates corresponding PUB / SUB (Publish-Subscribe) access ports for these vehicle machine devices. The access ports are used to send and receive data during screen projection operations. The client selects the vehicle machine to be tested from multiple vehicle machine devices according to the vehicle machine device number selected by the user, and records the device number of the vehicle machine to be tested.

[0109] The vehicle machine to be tested is associated with multiple screen numbers, each screen number corresponds to a screen of the vehicle machine to be tested, such as the main screen, the secondary screen or the rear screen of the vehicle. The client stores all screen information of the vehicle machine to be tested in the database and selects the screen to be projected according to the screen number.

[0110] During the entire vehicle computer debugging process, the client can call the interface to query the vehicle computer device list to check whether there is a new vehicle computer device connected, and arbitrarily change the vehicle computer device number and screen number to realize the switching function of multiple devices and multiple screens.

[0111] In the prior art, the process of switching vehicle-mounted computer devices is rather cumbersome and requires reconfiguration of the debugging environment. However, in the embodiment of the present application, after the debugging environment bound to the host computer is determined, the switching of the vehicle-mounted computer devices and the vehicle-mounted computer screen does not affect the host computer, so there is no need to reconfigure the debugging environment, thereby improving the convenience of switching vehicle-mounted computer devices and screens.

[0112] In step 502, the process in which the client continuously obtains the projection of the target screen includes: the client sends a projection command of "start", and after the projection command is sent, the client is ready to receive the projection of the vehicle screen. The projection command carries the host computer IP, the device number of the vehicle to be tested, and the screen number of the target screen. The host computer determines the target screen of the vehicle to be tested according to the device number and the screen number, and uses the projection tool to obtain the projection image from the target screen, and then takes a screenshot of the projection image according to the set frame rate, such as 20 frames per second, and then transmits the screenshot to the client using real-time communication. After the client renders the screenshot, it displays the projection image of the target screen in real time.

[0113] After receiving the screen projection command, the host computer starts to create a transmission channel for the communication method. In the embodiment of the present application, the real-time communication method gives priority to the Websocket communication method. The WebSocket communication uses the PUB / SUB communication protocol in the message queue NanoMsg. The host computer generates a splicing route based on the host computer IP carried in the screen projection command and the port of the preset transmission protocol, such as the SUB port, thereby creating a transmission channel for the Websocket communication method. The transmission channels of other communication methods are also generated by splicing routes using the host computer IP and protocol port, but the protocol port will be different.

[0114] In this application, screen projection tools and real-time communication methods are used to realize real-time projection of the vehicle screen on the client interface. The real-time communication method ensures the efficiency of transmitting screenshot data between the client and the host computer, ensures that testers can perceive the interface changes of the vehicle screen in time, improves the efficiency of code editing and debugging, and thus improves the efficiency of vehicle debugging.

[0115] In step 505, the flowchart of updating the vehicle screen projection in real time according to the operation event is as follows: Figure 6 As shown, the method includes:

[0116] Step 601: Monitor whether an operation event occurs on the client's projection interface.

[0117] Step 602: If an operation event is detected, an operation instruction corresponding to the operation event is transmitted to the host computer, so that the host computer executes the operation instruction on the vehicle computer to be tested through the automated testing framework.

[0118] Step 603: updating the projection image of the target screen after the vehicle computer to be tested executes the operation instruction in real time on the projection interface.

[0119] While the host computer is continuously transmitting the projection image to the client, it starts a new process to detect operation events such as clicks and slides generated on the client's projection interface. Specifically, the client monitors in real time whether operation events such as clicks and slides occur on the projection interface. Operation events can be generated by mouse, keyboard, touch screen, etc. If an operation event is detected, the client transmits the operation instruction corresponding to the operation event to the host computer through real-time communication. The host computer performs logical processing through the automated testing framework and executes operation instructions such as clicks and slides on the actual car screen. The screen image of the car screen will change when it receives these operation instructions. The host computer then transmits the changed image to the client through real-time communication to realize real-time update of the client's projection interface.

[0120] Operation events generally include action classification (press, lift, slide, etc.) and location information (current screen size such as length and width, click coordinates, etc.).

[0121] The automated testing framework can use uiautomator2, which is an Android automated testing framework that provides methods such as click, long press, text input, slide, drag, screenshot, etc., which can simulate various user actions. Users can locate the control through the control's id or text (used to set or return the text of the control) and other attributes, and then perform the above operations on the control.

[0122] For example, if a mouse click or slide event occurs on the client's projection interface, the client will transmit the operation instruction to the host computer in real time. The host computer uses uiautomator2 to perform logical processing, so as to execute the received click or slide instruction on the actual vehicle screen interface. Correspondingly, the image of the vehicle screen after the click or slide instruction is executed will be updated in the client's projection interface.

[0123] The embodiment of the present application can not only project the car computer screen, but also enable the client to remotely control the car computer screen, thereby realizing remote debugging of the car computer, and subsequently code editing can be performed based on the debugging results.

[0124] In step 506, the positioning information of the target component on the vehicle screen is determined as follows: Figure 7 As shown, the method includes:

[0125] Step 701: When an operation of calling an upper computer interface is detected, a parsing instruction is sent to the upper computer, and receiving the projection image is suspended, wherein the parsing instruction is used to indicate the component information of the parsed target screen.

[0126] Step 702: Obtain the component hierarchy structure and current image frame in the target screen sent by the host computer.

[0127] Step 703: Determine the positioning frame of each component in the current image frame by parsing the component hierarchy structure and the current image frame.

[0128] Step 704: determining the location information of the target component according to the location box of the selected target component, so that the tester can edit the code using the location information.

[0129] When the setting button on the client interface is clicked, it will automatically trigger the operation of calling the host computer interface. At this time, the client sends a parsing instruction to the host computer and suspends receiving the projection image. The purpose of suspending the reception of the projection image is to subsequently locate the components of the image frame displayed on the client, avoid conflicts between the projection image and the image frame, and maintain the image stability of the image frame.

[0130] The host computer parses the component hierarchy structure and the current image frame in the target screen according to the parsing instructions. The component hierarchy structure refers to the hierarchy structure of the components included in the current image frame. The hierarchy structure includes nested, parallel and other structures. The host computer transmits the component hierarchy structure and the current image frame to the client in the form of Base64 encoding. The client decodes the received encoded data into JSON format.

[0131] The client parses the positioning information of each component in the current image frame according to the component hierarchy structure, and then uses the positioning information to draw the positioning frame of the component in the current image frame, and then maps the positioning frame of each component to the current image frame, and saves the mapping relationship between the component and the positioning frame.

[0132] In addition, the client displays the image frame and the components in the image frame. If the tester selects one of the components, namely the target component, on the client's screen projection interface, the client will display the positioning box of the target component on the screen projection interface according to the above mapping relationship.

[0133] In addition, there is a binding relationship between the positioning information and the positioning frame of the same component. When the positioning frame is displayed on the projection interface, the positioning information of the component will also be displayed on the projection interface according to the binding relationship. The positioning information can be displayed in the area near the component, but this may block part of the image frame. Preferably, the positioning information can be displayed in the information area of ​​the projection interface. For example, the image frame is displayed above the projection interface and the information area is below. The image frame and the information area are distinguished to avoid the display of the positioning information blocking the image frame.

[0134] Testers can quickly and easily use this positioning information in the code to improve code editing efficiency. The positioning information can be Xpath positioning information, coordinates and other information.

[0135] Conversely, the tester can select any positioning information in the information area, and the positioning box corresponding to the positioning information will be displayed in the image frame above the projection interface.

[0136] Exemplarily, the image frame is an interface image of a song playing on the main screen. When a user selects a song display icon in the image frame, a positioning box of the song display icon is displayed in the projection interface, and the positioning information of the song display box is displayed in the information area of ​​the projection interface.

[0137] This application provides a schematic diagram of the overall process of online remote debugging of a vehicle computer, including the following contents:

[0138] Step 1. The client enters the debugging environment bound to the host computer.

[0139] Step 2. The client determines the address of the remote code editor according to the host computer IP and the port number of the code editor, and accesses the code editor in the host computer based on the address.

[0140] Step 3. The client sends a screen projection command to the host computer. The screen projection command includes the host computer IP, vehicle device number and screen number.

[0141] Step 4. The host computer determines the target screen of the vehicle computer to be tested according to the vehicle computer device number and screen number, and establishes a real-time communication channel according to the host computer IP and protocol port.

[0142] Step 5. The host computer obtains the projection image from the target screen through the projection tool, and uses real-time communication to transmit the screenshot of the projection image to the client in real time.

[0143] Step 6. Monitor the three control commands of the client's screen projection interface in real time.

[0144] Step 7. If a "turn off screen projection" command is received, stop receiving the projection of the target screen.

[0145] Step 8. The click, drag and other operation events occurring on the projection interface are transmitted to the host computer in real-time communication mode. The host computer feeds back the updated projection image after the operation event is executed on the vehicle under test to the client.

[0146] Step 9. The client sends a parsing instruction and pauses real-time screen projection. The host computer parses the component information of the target screen and transmits it to the client. The client uses the component information to conveniently write component location information in the test script.

[0147] Among them, step 2 and steps 3-5 are executed in parallel. Based on step 2 and step 3-5, the client interface simultaneously performs car screen projection and remote code editing and debugging.

[0148] Only one of steps 7-9 can be implemented at a time.

[0149] Based on the same technical concept, the present application provides an online remote debugging vehicle device, which is applied to the client, such as Figure 8 As shown, the device comprises:

[0150] The access module 801 is used to access the local code editor of the host computer based on the address of the remote code editor after entering the debugging environment;

[0151] A selection module 802 is used to select the vehicle computer to be tested connected to the host computer and the target screen in the vehicle computer to be tested;

[0152] The acquisition module 803 is used to obtain the projection image of the target screen transmitted by the host computer through real-time communication, so as to simultaneously perform vehicle screen projection and remote code editing and debugging on the client interface.

[0153] Optionally, the device is also used for:

[0154] Monitor whether any operation events occur on the client's projection interface;

[0155] If an operation event is detected, the operation instruction corresponding to the operation event is transmitted to the host computer, so that the host computer executes the operation instruction on the vehicle under test through the automated test framework;

[0156] The projection image of the target screen after the vehicle under test executes the operation command is updated in real time on the projection interface.

[0157] Optionally, the device is also used for:

[0158] When an operation of calling the host computer interface is detected, a parsing instruction is sent to the host computer, and receiving the projection image is suspended, wherein the parsing instruction is used to indicate parsing component information of the target screen;

[0159] Get the component hierarchy structure and current image frame in the target screen sent by the host computer;

[0160] By parsing the component hierarchy structure and the current image frame, determining the positioning frame of each component in the current image frame;

[0161] The positioning information of the target component is determined according to the positioning box of the selected target component, so that the tester can use the positioning information to edit the code.

[0162] Optionally, the device is also used for:

[0163] Parse the positioning information of each component in the component hierarchy in the current image frame;

[0164] Draw the positioning frame of the component in the current image frame according to the positioning information, and bind the positioning information and the positioning frame;

[0165] Map the positioning boxes of each component to the current image frame.

[0166] Optionally, the device is also used for:

[0167] After selecting the target component on the client's screen projection interface, the positioning frame of the target component is displayed according to the mapping relationship between the component and the positioning frame;

[0168] According to the binding relationship between the positioning information and positioning frames of the same component, the positioning information corresponding to the positioning frame is displayed in the projection interface.

[0169] Optionally, the selection module 802 is used to:

[0170] Call the interface for querying the vehicle equipment list to obtain multiple vehicle equipment numbers bound to the host computer;

[0171] Determine the vehicle computer to be tested in the vehicle computer equipment list according to the selected vehicle computer equipment number;

[0172] Query all screen numbers associated with the vehicle to be tested;

[0173] A target screen among multiple screens of the vehicle computer to be tested is determined according to the selected screen number, wherein the selected vehicle computer device number and screen number are switchable.

[0174] Optionally, the device is also used for:

[0175] Determine the host computer IP bound to the debugging environment;

[0176] Get the port number of the code editor in the local host computer corresponding to the host computer IP;

[0177] Determine the address of the remote code editor based on the host computer IP and port number.

[0178] Based on the same technical concept, the present application also provides an online remote debugging vehicle device, which is applied to a host computer and includes:

[0179] The connection module is used to establish a connection with the client through the address of the remote code editor after the client enters the debugging environment, allowing the client to access the local code editor;

[0180] The transmission module is used to transmit the projection image of the target screen to the client through real-time communication according to the target screen selected by the client, so as to simultaneously perform vehicle screen projection and remote code editing and debugging on the client interface.

[0181] Optionally, the transmission module is used to:

[0182] Get the screen projection command sent by the client;

[0183] Determine the target screen to be projected based on the vehicle device number and screen number carried in the projection command;

[0184] Use the screen projection tool to obtain the projection image from the target screen, and take a screenshot of the projection image at the set frame rate;

[0185] The screenshots are transmitted to the client using real-time communication.

[0186] Optionally, the device is also used for:

[0187] Get the host computer IP carried in the screen projection command;

[0188] Determine the port of the preset transmission protocol;

[0189] Use the host computer IP and port to create a transmission channel for real-time communication.

[0190] like Fig. 9 As shown, an embodiment of the present application provides an electronic device, including a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.

[0191] The memory 903 is used to store computer programs.

[0192] In one embodiment of the present application, the processor 901 is used to implement the online remote debugging vehicle computer method provided by any one of the aforementioned method embodiments when executing the program stored in the memory 903.

[0193] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the online remote debugging vehicle computer method provided in any of the aforementioned method embodiments are implemented.

[0194] The device embodiments described above are merely illustrative, wherein 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, i.e., they may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0195] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.

[0196] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive and therefore specify the presence of stated features, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0197] The above is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features applied herein.

Claims

1. A method for online remote debugging of a vehicle computer, characterized in that: Applied to a client, the method comprises: After entering the debugging environment, access the local code editor of the host computer based on the address of the remote code editor; Selecting a vehicle computer to be tested connected to the host computer and a target screen in the vehicle computer to be tested; The projection image of the target screen transmitted by the host computer through real-time communication is obtained, so as to simultaneously perform vehicle screen projection and remote code editing and debugging on the client interface.

2. The method according to claim 1, characterized in that After acquiring the projection image of the target screen transmitted by the host computer in real-time communication, the method further includes: Monitoring whether an operation event occurs on the screen projection interface of the client; If an operation event is detected, the operation instruction corresponding to the operation event is transmitted to the host computer, so that the host computer executes the operation instruction on the vehicle computer to be tested through the automated testing framework; The projection image of the target screen after the vehicle machine under test executes the operation instruction is updated in real time on the projection interface.

3. The method according to claim 1, characterized in that After acquiring the projection image of the target screen transmitted by the host computer in real-time communication, the method further includes: When an operation of calling the host computer interface is detected, a parsing instruction is sent to the host computer, and receiving the projection image is suspended, wherein the parsing instruction is used to instruct parsing component information in the target screen; Obtaining the component hierarchy structure and current image frame in the target screen sent by the host computer; Determine a positioning frame of each component in the current image frame by parsing the component hierarchy structure and the current image frame; The positioning information of the target component is determined according to the positioning frame of the selected target component, so that the tester can use the positioning information to edit the code.

4. The method according to claim 3, characterized in that: Determining the positioning frame of each component in the current image frame by parsing the component hierarchical structure and the current image frame includes: Parsing the positioning information of each component in the component hierarchy structure in the current image frame; Draw a positioning frame of the component in the current image frame according to the positioning information, and bind the positioning information and the positioning frame; Mapping the positioning frames of the various components into the current image frame.

5. The method according to claim 4, characterized in that Determining the location information of the target component according to the location box of the selected target component includes: After the target component is selected on the screen projection interface of the client, a positioning frame of the target component is displayed according to a mapping relationship between the component and the positioning frame; According to the binding relationship between the positioning information and the positioning frame of the same component, the positioning information corresponding to the positioning frame is displayed in the screen projection interface.

6. The method according to claim 1, characterized in that Selecting the vehicle computer to be tested connected to the host computer and the target screen in the vehicle computer to be tested includes: Call the interface for querying the vehicle equipment list to obtain multiple vehicle equipment numbers bound to the host computer; Determine the vehicle computer to be tested in the vehicle computer equipment list according to the selected vehicle computer equipment number; Query all screen numbers associated with the vehicle computer to be tested; The target screen among the multiple screens of the vehicle computer to be tested is determined according to the selected screen number, wherein the selected vehicle computer device number and screen number are switchable.

7. The method according to claim 1, characterized in that After entering the debugging environment, the method further includes: Determine the host computer IP bound to the debugging environment; Get the port number of the code editor in the local host computer corresponding to the IP address of the host computer; The address of the remote code editor is determined according to the host computer IP and the port number.

8. A method for online remote debugging of a vehicle computer, characterized in that: Applied to a host computer, the method includes: After the client enters the debugging environment, a connection is established with the client through the address of the remote code editor, allowing the client to access the local code editor; According to the target screen selected by the client, the projection image of the target screen is transmitted to the client via real-time communication, so that the vehicle screen projection and remote code editing and debugging can be performed simultaneously on the client interface.

9. The method according to claim 8, characterized in that According to the target screen selected by the client, transmitting the projection image of the target screen to the client through real-time communication includes: Obtaining a screen projection instruction sent by the client; Determine the target screen to be projected according to the vehicle device number and screen number carried in the projection instruction; Using a screen projection tool to obtain a projection image from the target screen, and taking a screenshot of the projection image at a set frame rate; The screenshot is transmitted to the client using the real-time communication method.

10. The method according to claim 9, characterized in that Before transmitting the projection image of the target screen to the client via real-time communication, the method further includes: Get the host computer IP carried in the screen projection instruction; Determine the port of the preset transmission protocol; The transmission channel of the real-time communication mode is created by using the host computer IP and the port as a splicing route.

11. An online remote debugging vehicle device, characterized in that: Applied to a client, the device comprises: The access module is used to access the local code editor of the host computer based on the address of the remote code editor after entering the debugging environment; A selection module, used for selecting a vehicle computer to be tested connected to the host computer and a target screen in the vehicle computer to be tested; The acquisition module is used to obtain the projection image of the target screen transmitted by the host computer through real-time communication, so as to simultaneously perform vehicle screen projection and remote code editing and debugging on the client interface.

12. An online remote debugging vehicle device, characterized in that: Applied to a host computer, the device comprises: A connection module, used to establish a connection with the client through the address of the remote code editor after the client enters the debugging environment, allowing the client to access the local code editor; The transmission module is used to transmit the projection image of the target screen to the client through real-time communication according to the target screen selected by the client, so as to simultaneously perform vehicle screen projection and remote code editing and debugging on the client interface.

13. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method described in any one of claims 1-7 or 8-10 when executing a program stored in a memory.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1-7 or 8-10 is implemented.

Citation Information

Cited By

  • On-board interconnection method and apparatus, and electronic device and storage medium

    WO2026091601A1