Vehicle-mounted alarm loading method and device, electronic equipment, vehicle and program product
Controlling the alarm text loading of vehicle-mounted instruments through JSON files, solving the complexity and response speed problems of state machine during multilingual switching in the prior art, and achieving more efficient alarm text display and maintenance.
Patent Information
- Application Number
- CN202411808237.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-05-06
AI Technical Summary
Existing on-board instruments require reloading and configuring the state machine during multilingual switching, resulting in reduced system response speed and poor user experience, while increasing state machine complexity and difficulty in development and maintenance.
The loading of alarm text is controlled through JSON files, the alarm trigger information is detected and the alarm identifier is obtained is retrieved. Based on the identifier, the text resource ID is found in the alarm mapping table, the alarm text is extracted from the resource dictionary and passed to the target component to display.
It realizes display control of alarm text without using a state machine, reduces development difficulty, and improves the system's response speed and user experience.
Smart Images

Figure CN119928560A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle alarm technology, and in particular to a vehicle-mounted alarm loading method, device, electronic equipment, vehicle and program product. Background Art
[0002] In vehicle-mounted instruments, in order to meet the needs of different regions for language display, the instrument interface needs to support multi-language switching. In display applications made with Kanzi, the text resource ID is generally loaded through the state machine to control the text node. The way to use the state machine to control the text node to load the text resource ID requires a complete set of state machine logic to be defined in each language, which not only increases the complexity of the system, but also requires reloading and configuring the state machine when switching languages, thereby reducing the system's response speed and user experience. In addition, if the number of alarm texts exceeds 200, the state machine design becomes extremely complex, resulting in difficulties in development and maintenance, cumbersome alarm text updates, and poor system scalability, which increases development costs, reduces development efficiency, and limits the system's ability to adapt to future needs. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to propose a vehicle-mounted alarm loading method, device, electronic device, vehicle and program product, aiming to control the loading of alarm text through a JSON file to facilitate the maintenance of the alarm text.
[0004] In a first aspect, the present application provides a vehicle alarm loading method, the method comprising:
[0005] Detecting alarm trigger information, parsing the alarm trigger information, and obtaining an alarm identifier corresponding to the alarm trigger information;
[0006] Searching for a corresponding text resource ID in an alarm mapping table according to the alarm identifier;
[0007] Based on the text resource ID, extracting the alarm text corresponding to the text resource ID from the resource dictionary;
[0008] The alarm text is transferred to the target component by means of property setting, and the alarm text is displayed on the target component.
[0009] In a possible implementation, before the step of, when the plug-in detects the alarm trigger information, parsing the alarm trigger information, and obtaining the alarm identifier corresponding to the alarm trigger information, the step further includes:
[0010] Read and parse JSON files;
[0011] Generate an alarm mapping table based on the alarm identifier and the text resource ID in the JSON file;
[0012] The JSON file stores the correspondence between the alarm identifier of the alarm object and the text resource ID of the alarm object.
[0013] In a possible implementation, before the step of, when the plug-in detects the alarm trigger information, parsing the alarm trigger information, and obtaining the alarm identifier corresponding to the alarm trigger information, the step further includes:
[0014] Get the region information corresponding to the vehicle's current location and extract the resource path corresponding to the region package;
[0015] Based on the resource path and the region information, construct a region package URL pointing to the region package stored therein;
[0016] Get the Kanzi resource manager, and use the Kanzi resource manager to get the corresponding resource dictionary through the region pack URL.
[0017] In a possible implementation, the vehicle alarm loading method further includes the following steps:
[0018] Detecting new alarm triggering information, and obtaining new alarm information corresponding to the new alarm triggering information;
[0019] Extracting a new alarm identifier and a new text resource ID corresponding to the new alarm information;
[0020] The JSON file is updated based on the newly added alarm identifier and the newly added text resource ID.
[0021] In a possible implementation, the vehicle alarm loading method further includes the following steps:
[0022] Detect the language setting update trigger, obtain the region information corresponding to the vehicle's current location, and extract the resource path corresponding to the region package;
[0023] Based on the resource path and the region information, construct a region package URL pointing to the region package stored therein;
[0024] Get the Kanzi resource manager, and use the Kanzi resource manager to get the corresponding resource dictionary through the region pack URL.
[0025] In a possible implementation, the vehicle alarm loading method further includes the following steps:
[0026] The language setting change trigger is detected, and the changed language setting is obtained;
[0027] Obtaining the region information corresponding to the language setting, and extracting the resource path corresponding to the region package;
[0028] Based on the resource path and the region information, construct a region package URL pointing to the region package stored therein;
[0029] Get the Kanzi resource manager, and use the Kanzi resource manager to get the corresponding resource dictionary through the region pack URL.
[0030] In a second aspect, the present application provides a vehicle-mounted alarm loading device, the device comprising:
[0031] An alarm detection module, used to detect alarm trigger information, parse the alarm trigger information, and obtain an alarm identifier corresponding to the alarm trigger information;
[0032] An alarm mapping module, used for searching a corresponding text resource ID in an alarm mapping table according to the alarm identifier;
[0033] A text extraction module, used for extracting the alarm text corresponding to the text resource ID from the resource dictionary based on the text resource ID;
[0034] The alarm display module is used to transfer the alarm text to the target component by setting properties, and display the alarm text on the target component.
[0035] In a third aspect, the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the vehicle alarm loading method as described in the first aspect or any possible implementation method of the first aspect.
[0036] In a fourth aspect, the present application provides a vehicle, comprising the vehicle-mounted alarm loading device described in the second aspect or the electronic device described in the third aspect.
[0037] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the vehicle-mounted alarm loading method described in the above-mentioned first aspect or any possible implementation method of the first aspect.
[0038] The vehicle alarm loading method, device, electronic device, vehicle and program product proposed in this application obtain the corresponding alarm identifier by detecting and parsing the alarm trigger information; use the identifier to find the matching text resource ID in the alarm mapping table, extract the corresponding alarm text from the resource dictionary according to the text resource ID, and pass the alarm text to the target component for display by setting attributes. This method realizes the display control of the alarm text without using the state machine to create the state, which greatly reduces the development difficulty of the alarm system developers. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A schematic diagram of a process flow of a vehicle alarm loading method provided in an embodiment of the present application;
[0040] Figure 2 A diagram of the execution steps of a vehicle alarm loading method provided in an embodiment of the present application;
[0041] Figure 3 A schematic diagram of the structure of a vehicle-mounted alarm loading device provided in an embodiment of the present application;
[0042] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0046] First, some nouns involved in this application are analyzed:
[0047] State machine: A state machine is a mathematical model used to describe the transition behavior of a system between different states. In a vehicle alarm system, the state machine can trigger the corresponding alarm action and jump to the corresponding state according to the vehicle state and input events (such as sensor signals, user operations, etc.). The implementation of a state machine usually involves the definition of a state table and the implementation of state transition logic. The state table lists the various states of the system and the corresponding transition conditions, while the state transition logic triggers the corresponding action and jumps to a new state according to the current state and input events. In actual applications, the state machine of the vehicle alarm system involves more states and transition conditions. The state machine design of the vehicle alarm system is an important means to ensure vehicle safety and respond to abnormal situations in a timely manner.
[0048] JSON: JSON (JavaScript Object Notation) is a lightweight data exchange format. It is based on a subset of ECMAScript (js specification developed by the European Computer Association) and uses a completely language-independent text format to store and represent data. Simply put, JSON is a data format, not a programming language. Although it has the same grammatical form, it does not follow the grammatical rules of JavaScript. JSON is easy for people to read and write, and it is also easy for machines to parse and generate.
[0049] URL: URL (Uniform Resource Locator) is a concise representation of the location and access method of resources available on the Internet. It is the address of standard resources on the Internet. Every file on the Internet has a unique URL, which contains information indicating the location of the file and how the browser should handle it.
[0050] Kanzi: Kanzi is a graphical user interface (GUI) framework developed by Thundersoft (part of Thundersoft Software Co., Ltd., formerly Rightware). It is designed for cross-platform development and is particularly suitable for in-vehicle applications. Kanzi is particularly popular in the automotive field and is widely used in the development of in-vehicle infotainment systems (IVI), instrument panels, HUDs (head-up displays), etc. Its 3D engine is one of its main selling points, which can provide realistic 3D rendering effects. As the demand for advanced user interfaces in the automotive industry continues to grow, the application scope of Kanzi is also expanding. Kanzi is a comprehensive UI solution designed for embedded and mobile devices. It helps developers create beautiful and practical user interfaces by providing high-performance rendering, flexible development tools and cross-platform support.
[0051] Currently, in vehicle-mounted instruments, the instrument interface usually needs to display different languages in different regions. In display applications made with Kanzi, the state machine in Kanzi is usually used to control the text node to load the text resource ID.
[0052] Therefore, in the vehicle instrument project using Kanzi, the number of text alarms that need to be displayed on the instrument exceeds 200, and more than 200 states need to be created in the state machine to control the display of classical Chinese. This requires developers to modify the state machine when the classical Chinese changes. Kanzi projects are not convenient for other developers to review and maintain, which is relatively troublesome. If you want to add new text alarms, you need to modify Kanzi and add states to the state machine, which is also not convenient for other developers to review.
[0053] In view of the low efficiency of the existing vehicle-mounted instrument using state machines for classical Chinese display, this application implements a method for controlling classical Chinese loading through JSON files and is easy to maintain, and adds an alarm state without modifying Kanzi.
[0054] The vehicle alarm loading method provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a vehicle terminal, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the vehicle alarm loading method, etc., but is not limited to the above forms.
[0055] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0056] It should be noted that in each specific implementation of the present application, when it is necessary to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0057] Figure 1 A schematic diagram of a vehicle alarm loading method provided in an embodiment of the present application, Figure 1 The method may include but is not limited to steps S101 to S104.
[0058] S101, detecting alarm triggering information, parsing the alarm triggering information, and obtaining an alarm identifier corresponding to the alarm triggering information;
[0059] S102, searching for a corresponding text resource ID in an alarm mapping table according to the alarm identifier;
[0060] S103, extracting the alarm text corresponding to the text resource ID from the resource dictionary based on the text resource ID;
[0061] S104: Transfer the alarm text to the target component by setting properties, and display the alarm text on the target component.
[0062] Specifically, the vehicle-mounted system detects the vehicle's operating status and external environment in real time through various sensors (such as temperature sensors, pressure sensors, etc.) or external signals (such as GPS data, radar detection, etc.). When an abnormal situation or a specific event is detected, an alarm trigger information is generated. The system parses the detected alarm trigger information to identify the specific type of alarm. The parsing process includes decoding, formatting, screening and other steps to ensure the accuracy and readability of the information. In the process of parsing the alarm trigger information, the system extracts one or more alarm identifiers (Alarm ID), which are unique and are used to identify different types of alarm events. The system maintains an alarm mapping table, which records the correspondence between the alarm identifier and the text resource ID. The text resource ID is a unique identifier pointing to a specific alarm text stored in the resource dictionary. According to the alarm identifier obtained in step S101, the system searches for the corresponding text resource ID in the alarm mapping table. The search process involves efficient algorithms such as index query and hash table retrieval to ensure the search speed. The resource dictionary is a database or file that stores multiple resources (such as text, pictures, audio, etc.). In the vehicle-mounted system, the resource dictionary usually contains all possible alarm texts and their corresponding text resource IDs. Based on the text resource ID found in step S102, the system searches for and extracts the corresponding alarm text in the resource dictionary. The extraction process involves file reading, database query and other operations. The target component refers to the user interface element (such as display screen, instrument panel, etc.) in the vehicle system that is responsible for displaying the alarm information. These components receive and display the alarm text through specific properties and methods. The system passes the alarm text extracted in step S103 to the target component by setting properties. Property setting involves operations such as calling the component's API and modifying the component's property values. After receiving the alarm text, the target component displays the alarm text on the user interface according to its own display logic and style. The display process involves steps such as text rendering and layout adjustment to ensure the clarity and readability of the alarm information.
[0063] The vehicle alarm loading method realizes the rapid loading and accurate display of vehicle alarm information by detecting alarm trigger information, parsing and obtaining alarm identifiers, searching for corresponding text resource IDs in the alarm mapping table, extracting alarm text from the resource dictionary, and transferring the alarm text to the target component for display. This method improves the safety and user experience of the vehicle system.
[0064] In some embodiments, before the step S101, the following steps are further included:
[0065] Read and parse JSON files;
[0066] Generate an alarm mapping table based on the alarm identifier and the text resource ID in the JSON file;
[0067] The JSON file stores the correspondence between the alarm identifier of the alarm object and the text resource ID of the alarm object.
[0068] Specifically, refer to Figure 2 Before loading the vehicle alarm, the system needs to obtain an alarm mapping table including an alarm identifier and a text resource ID. The alarm mapping table is a data structure used to store the correspondence between the alarm identifier and the text resource ID. In the vehicle system, the table is used to quickly find the text resource corresponding to a specific alarm event. The system loads the JSON file from the specified storage location through a file reading operation, and uses a JSON parser to parse the loaded JSON file and convert it into an easy-to-process data structure (such as a dictionary, list, etc.). The system dynamically generates an alarm mapping table based on the parsed JSON file content. After generating the alarm mapping table, the system may store it in memory for quick access. As needed, the system may also persist the alarm mapping table to disk so that it can be quickly loaded at the next startup.
[0069] After completing the above preprocessing steps, the system already has an alarm mapping table, which is a prerequisite for executing step S101 (detecting alarm trigger information, parsing and obtaining alarm identifiers). When alarm trigger information is detected, the system can immediately search for the corresponding text resource ID in the alarm mapping table, and then continue to execute subsequent steps S102, S103 and S104. By reading and parsing the JSON file, and generating an alarm mapping table based on the file, the vehicle-mounted system can establish a correspondence between the alarm identifier and the text resource ID. This provides the necessary data support for the subsequent detection of alarm trigger information, extraction and display of alarm text. These preprocessing steps ensure the accuracy and efficiency of the vehicle-mounted alarm loading method.
[0070] In some embodiments, before the step S101, the following steps are further included:
[0071] Get the region information corresponding to the vehicle's current location and extract the resource path corresponding to the region package;
[0072] Based on the resource path and the region information, construct a region package URL pointing to the region package stored therein;
[0073] Get the Kanzi resource manager, and use the Kanzi resource manager to get the corresponding resource dictionary through the region pack URL.
[0074] Specifically, refer to Figure 2Before loading the vehicle alarm, the system also needs to load the resource dictionary, which includes all possible alarm texts in the region and their corresponding text resource IDs. By obtaining the region information corresponding to the vehicle's current location, extracting the resource path corresponding to the region package, constructing the region package URL, and using the Kanzi resource manager to load the resource dictionary, the vehicle system can dynamically load appropriate alarm text resources according to the region where the vehicle is located. These preprocessing steps ensure the regional adaptability and flexibility of the vehicle alarm loading method.
[0075] More specifically, the vehicle system obtains the current location information of the vehicle through GPS or other positioning technologies. The location information includes detailed information such as longitude, latitude, country, and city. The system determines the region where the vehicle is located based on the current location information of the vehicle. The region information is one or more levels of geographical division, such as country, province, city, etc. At the same time, the system extracts the path of the resource package corresponding to the region. The resource path can be a path in the file system or a URL on the network. The system combines the resource path and region information through string concatenation, format verification and other operations to construct a complete region package URL. The region package URL is a uniform resource locator that points to a network location or local location where region-specific resources are stored. It contains all the information required to access the resource, such as protocol, server address, resource path, etc. The system obtains an instance of the Kanzi resource manager by calling the API or other mechanisms of the Kanzi framework. Using the Kanzi resource manager, the system loads the corresponding resource dictionary through the regional package URL. Kanzi is a framework for the development of automotive HMI (Human-Machine Interface), which provides a wealth of UI components and resource management functions; the Kanzi resource manager is a component in the Kanzi framework, which is used to load and manage UI resources; the resource dictionary contains all possible alarm texts in the region and their corresponding text resource IDs. After completing the above preprocessing steps, the system has loaded the resource dictionary suitable for the region according to the current location of the vehicle. When the alarm trigger information is detected (step S101), the system can immediately search for the corresponding text resource ID in the loaded resource dictionary, and then continue to execute the subsequent steps S102, S103 and S104.
[0076] In some embodiments, the vehicle alarm loading method further includes the following steps:
[0077] Detecting new alarm triggering information, and obtaining new alarm information corresponding to the new alarm triggering information;
[0078] Extracting a new alarm identifier and a new text resource ID corresponding to the new alarm information;
[0079] The JSON file is updated based on the newly added alarm identifier and the newly added text resource ID.
[0080] Specifically, after the system detects the new alarm trigger information, it will obtain the new alarm identifier and new text resource ID corresponding to the new alarm information. The system will add the new alarm identifier and new text resource ID to the JSON file and insert new key-value pairs at the appropriate position of the JSON file to ensure the correct format of the file and the integrity of the data. The updated JSON file is persistently stored on the disk so that the latest alarm information can be loaded the next time the system starts.
[0081] When new alarm trigger information is detected, the system will follow these new steps and update the JSON file to reflect the latest alarm information. The updated JSON file is used to regenerate the alarm mapping table or loaded as new initial data the next time the system starts. By detecting new alarm trigger information, obtaining new alarm identifiers and new text resource IDs, and updating the JSON file, the vehicle system can dynamically manage and update alarm information and its corresponding text resources. These new steps ensure the flexibility and scalability of the vehicle alarm loading method, enabling it to adapt to changing vehicle conditions and user needs.
[0082] In some embodiments, the vehicle alarm loading method further includes the following steps:
[0083] Detect the language setting update trigger, obtain the region information corresponding to the vehicle's current location, and extract the resource path corresponding to the region package;
[0084] Based on the resource path and the region information, construct a region package URL pointing to the region package stored therein;
[0085] Get the Kanzi resource manager, and use the Kanzi resource manager to get the corresponding resource dictionary through the region pack URL.
[0086] Specifically, the vehicle system may detect an update to the language settings through user interaction (such as touch screen menu selection, voice commands, etc.) or external signals (such as changes in vehicle configuration files). Once an update is detected, the system triggers a series of steps to load new language resources. Similar to the steps mentioned previously, the system first obtains the current location information of the vehicle. Then, the region where the vehicle is located is determined based on the location information. Based on the region information and the new language settings, the system extracts the path to the resource package corresponding to the region and the language. Using the extracted resource path and region information, the system constructs a region package URL pointing to the new language resource package. The system obtains an instance of the Kanzi resource manager by calling the Kanzi framework's API or other mechanisms. Using the Kanzi resource manager, the system loads the corresponding resource dictionary through the previously constructed region package URL.
[0087] These new steps are logically similar to the previous steps, but they are triggered by an update to the language settings rather than an initialization detection. Once a new resource dictionary is loaded, the system may need to update its internal alarm mapping table to ensure that the alarm text matches the new language settings. By detecting the language setting update trigger, obtaining the region information corresponding to the vehicle's current location, extracting the resource path, building the region package URL, and loading the new resource dictionary using the Kanzi resource manager, the vehicle system can dynamically adapt to changes in language settings and provide users with alarm prompts in the correct language. These steps ensure flexibility and multi-language support for the vehicle alarm loading method.
[0088] In some embodiments, the vehicle alarm loading method further includes the following steps:
[0089] The language setting change trigger is detected, and the changed language setting is obtained;
[0090] Obtaining the region information corresponding to the language setting, and extracting the resource path corresponding to the region package;
[0091] Based on the resource path and the region information, construct a region package URL pointing to the region package stored therein;
[0092] Get the Kanzi resource manager, and use the Kanzi resource manager to get the corresponding resource dictionary through the region pack URL.
[0093] Specifically, the in-vehicle system is able to recognize language setting changes made by the user through interface operations (for example, clicking on the language selection menu) or external configuration (such as updating the vehicle settings file). Once the change is detected, the system will trigger a series of subsequent steps to load new language resources. The system captures the new language setting selected by the user, which is usually a language code (for example, "en" for English and "zh" for Chinese). Based on the new language setting, the system further determines the corresponding region or cultural area. Based on the regional information and the new language setting, the system extracts the corresponding resource package path from the predefined resource path list or configuration file. Using the extracted resource path and regional information, the system constructs a URL that points to the regional package where the new language resource package is stored. The system obtains an instance of the Kanzi resource manager by calling the API provided by the Kanzi framework. Using the Kanzi resource manager, the system loads and parses the resource dictionary through the previously constructed regional package URL.
[0094] By detecting the language setting change trigger, obtaining the new language setting, determining the corresponding region information, extracting the resource path, building the region package URL, and loading the resource dictionary using the Kanzi resource manager, the vehicle system can flexibly adapt to the change of language settings and provide users with multi-language support. These steps ensure the robustness and user-friendliness of the vehicle alarm loading method.
[0095] Figure 3 The schematic diagram of the structure of a vehicle alarm loading device provided in an embodiment of the present application is as follows. The vehicle alarm loading device 300 includes:
[0096] The alarm detection module 301 is used to detect alarm trigger information, parse the alarm trigger information, and obtain an alarm identifier corresponding to the alarm trigger information;
[0097] An alarm mapping module 302 is used to search for a corresponding text resource ID in an alarm mapping table according to the alarm identifier;
[0098] A text extraction module 303, used for extracting the alarm text corresponding to the text resource ID from the resource dictionary based on the text resource ID;
[0099] The alarm display module 304 is used to transfer the alarm text to the target component by setting properties, and display the alarm text on the target component.
[0100] The specific implementation of the vehicle-mounted alarm loading device is basically the same as the specific implementation of the above-mentioned vehicle-mounted alarm loading method, and will not be repeated here.
[0101] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned vehicle alarm loading method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.
[0102] See also Figure 4 , Figure 4 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0103] The processor 401 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0104] The memory 402 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 402 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 402, and the processor 401 calls and executes the vehicle alarm loading method of the embodiment of this application;
[0105] Input / output interface 403, used to implement information input and output;
[0106] Communication interface 404, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0107] Bus 405 , which transmits information between various components of the device (e.g., processor 401 , memory 402 , input / output interface 403 , and communication interface 404 );
[0108] The processor 401 , the memory 402 , the input / output interface 403 and the communication interface 404 are connected to each other in communication within the device via the bus 405 .
[0109] An embodiment of the present application also provides a vehicle, which includes the above-mentioned vehicle-mounted alarm loading device or the above-mentioned electronic device.
[0110] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned vehicle alarm loading method when executed by a processor.
[0111] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0112] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0113] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on 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.
[0114] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0115] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application 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 interchangeable where appropriate, so that the embodiments of the present application 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.
[0116] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0117] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may 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 is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0118] The units described above 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 on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0119] In addition, each functional unit in each embodiment of the present application 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.
[0120] 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 application, 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, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0121] The preferred embodiments of the present application are described above with reference to the accompanying drawings, but the scope of the rights of the present application is not limited thereto. Any modification, equivalent substitution and improvement made by those skilled in the art without departing from the scope and essence of the present application should be within the scope of the rights of the present application.
Claims
1. A vehicle alarm loading method, characterized in that: The method comprises: Detecting alarm trigger information, parsing the alarm trigger information, and obtaining an alarm identifier corresponding to the alarm trigger information; Searching for a corresponding text resource ID in an alarm mapping table according to the alarm identifier; Based on the text resource ID, extracting the alarm text corresponding to the text resource ID from the resource dictionary; The alarm text is transferred to the target component by means of property setting, and the alarm text is displayed on the target component.
2. The vehicle alarm loading method according to claim 1, characterized in that: Before the step of, when the plug-in detects the alarm trigger information, parsing the alarm trigger information, and obtaining the alarm identifier corresponding to the alarm trigger information, the method further includes: Read and parse JSON files; Generate an alarm mapping table based on the alarm identifier and the text resource ID in the JSON file; The JSON file stores the correspondence between the alarm identifier of the alarm object and the text resource ID of the alarm object.
3. The vehicle alarm loading method according to claim 1, characterized in that: Before the step of, when the plug-in detects the alarm trigger information, parsing the alarm trigger information, and obtaining the alarm identifier corresponding to the alarm trigger information, the method further includes: Get the region information corresponding to the vehicle's current location and extract the resource path corresponding to the region package; Based on the resource path and the region information, construct a region package URL pointing to the region package stored therein; Get the Kanzi resource manager, and use the Kanzi resource manager to get the corresponding resource dictionary through the region pack URL.
4. The vehicle alarm loading method according to claim 1, characterized in that: The vehicle-mounted alarm loading method also includes the following steps: Detecting new alarm triggering information, and obtaining new alarm information corresponding to the new alarm triggering information; Extracting a new alarm identifier and a new text resource ID corresponding to the new alarm information; The JSON file is updated based on the newly added alarm identifier and the newly added text resource ID.
5. The vehicle alarm loading method according to claim 1, characterized in that: The vehicle-mounted alarm loading method also includes the following steps: Detect the language setting update trigger, obtain the region information corresponding to the vehicle's current location, and extract the resource path corresponding to the region package; Based on the resource path and the region information, construct a region package URL pointing to the region package stored therein; Get the Kanzi resource manager, and use the Kanzi resource manager to get the corresponding resource dictionary through the region pack URL.
6. The vehicle alarm loading method according to claim 1, characterized in that: The vehicle-mounted alarm loading method also includes the following steps: The language setting change trigger is detected, and the changed language setting is obtained; Obtaining the region information corresponding to the language setting, and extracting the resource path corresponding to the region package; Based on the resource path and the region information, construct a region package URL pointing to the region package stored therein; Get the Kanzi resource manager, and use the Kanzi resource manager to get the corresponding resource dictionary through the region pack URL.
7. A vehicle-mounted alarm loading device, characterized in that: The device comprises: An alarm detection module, used to detect alarm trigger information, parse the alarm trigger information, and obtain an alarm identifier corresponding to the alarm trigger information; An alarm mapping module, used for searching a corresponding text resource ID in an alarm mapping table according to the alarm identifier; A text extraction module, used for extracting the alarm text corresponding to the text resource ID from the resource dictionary based on the text resource ID; The alarm display module is used to transfer the alarm text to the target component by setting properties, and display the alarm text on the target component.
8. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the vehicle alarm loading method according to any one of claims 1 to 6 when executing the computer program.
9. A vehicle, characterized in that: The vehicle includes the vehicle-mounted alarm loading device as claimed in claim 7 or the electronic device as claimed in claim 8.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the vehicle alarm loading method according to any one of claims 1 to 6 is implemented.