CN117608703A - Dictionary conversion method, dictionary conversion device, vehicle and storage medium - Google Patents

Dictionary conversion method, dictionary conversion device, vehicle and storage medium Download PDF

Info

Publication number
CN117608703A
CN117608703A CN202311272471.3A CN202311272471A CN117608703A CN 117608703 A CN117608703 A CN 117608703A CN 202311272471 A CN202311272471 A CN 202311272471A CN 117608703 A CN117608703 A CN 117608703A
Authority
CN
China
Prior art keywords
data
dictionary
json
target
object data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311272471.3A
Other languages
Chinese (zh)
Inventor
李亮
周茂井
张超英
张育松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chery New Energy Automobile Co Ltd
Original Assignee
Chery New Energy Automobile Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chery New Energy Automobile Co Ltd filed Critical Chery New Energy Automobile Co Ltd
Priority to CN202311272471.3A priority Critical patent/CN117608703A/en
Publication of CN117608703A publication Critical patent/CN117608703A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2452Query translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Machine Translation (AREA)

Abstract

The application relates to a dictionary conversion method, a dictionary conversion device, a vehicle and a storage medium, wherein the dictionary conversion method comprises the following steps: collecting initial object data of a current vehicle target application program, and carrying out serialization operation on the initial object data to generate first json data of the initial object data; based on the first json data, matching dictionary data in the cache, obtaining target dictionary data corresponding to the first json data, and translating the target dictionary data to obtain second json data of the initial object data; and performing deserialization operation on the second json data to obtain target object data of the target application program, and controlling the target application program to run according to the target object data. According to the method and the device, dictionary information in the database is loaded into the cache, dictionary fields in the object are serialized, and the serialized data are translated, so that repeated searching of the dictionary information of the database is avoided, the code structure is optimized, the data readability and the development efficiency are greatly improved, the CPU pressure is reduced, and the stability of the system is improved.

Description

Dictionary conversion method, dictionary conversion device, vehicle and storage medium
Technical Field
The present disclosure relates to the field of physical dictionary conversion technologies, and in particular, to a dictionary conversion method, device, vehicle, and storage medium.
Background
Dictionary data as an attribute for dynamically setting an object is data of a certain type within an enumerated data range, and dictionary types are used as unique identifiers of the type attribute, such as: user type: students, teachers, parents, school lines, etc. Dictionary data is generally composed of a dictionary type table subject_type and a dictionary type data table subject_data. When the data dictionary is not used, the enumeration class can be defined for service operation, namely, the enumeration class key is used for data storage in the code, after the data is queried, the Chinese name label corresponding to the conversion key is returned to the front end, but when a certain type is added, the code is required to be adjusted, or a certain type is input in a non-uniform mode, so that the data is not standard, and the system safety is seriously threatened.
When a technician uses a dictionary to perform related operation, the back-end service data stores a dictionary-type key value, when the Chinese name of the data represented by the key is changed, the back-end is not required to be subjected to code modification, when the data is newly added, the front-end can acquire the data from a database when the dictionary data is arranged, and the front-end is not required to care the content of a data set.
However, when the database is queried for many times to obtain dictionary information or a developer is required to manually translate, the traditional dictionary translation method is complicated, greatly influences the development efficiency and the stability of the system, and needs to be solved.
Disclosure of Invention
The application provides a dictionary conversion method, a dictionary conversion device, a vehicle and a storage medium, so as to solve the problems that the traditional dictionary translation method is complex, the development efficiency is low, the stability of a system is difficult to guarantee and the like.
An embodiment of a first aspect of the present application provides a dictionary converting method, including the steps of: collecting initial object data of a current vehicle target application program, and carrying out serialization operation on the initial object data to generate first json data of the initial object data; based on the first json data, matching dictionary data in a cache, obtaining target dictionary data corresponding to the first json data, and translating the target dictionary data to obtain second json data of the initial object data; and performing deserialization operation on the second json data to obtain target object data of the target application program, and controlling the target application program to run according to the target object data.
Optionally, in one embodiment of the present application, before performing the serialization operation on the initial object data, generating the first json data further includes: initializing at least one dictionary data in a preset database, and storing the at least one dictionary data in the cache.
Optionally, in one embodiment of the present application, the collecting initial object data of the current vehicle target application includes: calling a preset interface through the target application program to acquire initial data of the target application program; and packaging the initial data to obtain the initial object data.
Optionally, in an embodiment of the present application, the serializing the initial object data to generate first json data of the initial object data includes: and serializing the initial object data based on a fastjson serialization strategy or a jackson serialization strategy to obtain first json data of the initial object data.
Optionally, in an embodiment of the present application, the matching dictionary data in a cache based on the first json data, obtaining target dictionary data corresponding to the first json data, and translating the target dictionary data to obtain second json data of the initial object data, includes: analyzing the first json data to obtain a field to be translated; inquiring dictionary data in the cache to obtain key value pairs corresponding to the fields to be translated; and adding the key value pair into the first json data to obtain second json data of the initial object data.
Optionally, in an embodiment of the present application, the performing a deserialization operation on the second json data to obtain target object data of the target application program includes: and in a preset text filter, inversely sequencing the second json data to acquire target object data of the target application program.
Optionally, in one embodiment of the present application, the target application includes: at least one of white list configuration of the vehicle-mounted system, proper noun interpretation of the ERP system, mall navigation bar article display and connection configuration of the server.
An embodiment of a second aspect of the present application provides a dictionary converting apparatus, including: the serialization module is used for collecting initial object data of a current vehicle target application program, carrying out serialization operation on the initial object data and generating first json data of the initial object data; the translation module is used for matching dictionary data in a cache based on the first json data, acquiring target dictionary data corresponding to the first json data, and translating the target dictionary data to obtain second json data of the initial object data; and the deserializing module is used for carrying out deserializing operation on the second json data to obtain target object data of the target application program, and controlling the target application program to run according to the target object data.
Optionally, in one embodiment of the present application, further includes: and the storage module is used for initializing at least one dictionary data in a preset database before carrying out serialization operation on the initial object data and generating first json data, and storing the at least one dictionary data into the cache.
Optionally, in one embodiment of the present application, the serialization module includes: the acquisition unit is used for calling a preset interface through the target application program and acquiring initial data of the target application program; and the packaging unit is used for packaging the initial data to obtain the initial object data.
Optionally, in one embodiment of the present application, the serialization module further includes: the first processing unit is used for serializing the initial object data based on a fastjson serialization strategy or a jackson serialization strategy to obtain first json data of the initial object data.
Optionally, in one embodiment of the present application, the translation module includes: the analyzing unit is used for analyzing the first json data to obtain a field to be translated; the query unit is used for querying dictionary data in the cache to obtain key value pairs corresponding to the fields to be translated; and the adding unit is used for adding the key value pair into the first json data to obtain second json data of the initial object data.
Optionally, in one embodiment of the present application, the reverse serialization module includes: and the second processing unit is used for inversely sequencing the second json data in a preset text filter to acquire target object data of the target application program.
Optionally, in one embodiment of the present application, the target application includes: at least one of white list configuration of the vehicle-mounted system, proper noun interpretation of the ERP system, mall navigation bar article display and connection configuration of the server.
An embodiment of a third aspect of the present application provides a vehicle, including: the dictionary conversion method includes a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the dictionary conversion method as described in the above embodiments.
The fourth aspect of the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the dictionary conversion method as above.
Thus, embodiments of the present application have the following benefits:
according to the embodiment of the application, the initial object data of the current vehicle target application program can be collected, and the initial object data are subjected to serialization operation, so that first json data of the initial object data are generated; based on the first json data, matching dictionary data in the cache, obtaining target dictionary data corresponding to the first json data, and translating the target dictionary data to obtain second json data of the initial object data; and performing deserialization operation on the second json data to obtain target object data of the target application program, and controlling the target application program to run according to the target object data. According to the method and the device, dictionary information in the database is loaded into the cache, dictionary fields in the object are serialized, and the serialized data are translated, so that repeated searching of the dictionary information of the database is avoided, the code structure is optimized, the data readability and the development efficiency are greatly improved, the CPU pressure is reduced, and the stability of the system is improved. Therefore, the problems that the traditional dictionary translation method is complex, the development efficiency is low, the stability of the system is difficult to ensure and the like are solved.
Additional aspects and advantages of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flowchart of a dictionary translation method provided according to an embodiment of the present application;
FIG. 2 is a schematic diagram of execution logic of a dictionary translation method according to one embodiment of the present application;
FIG. 3 is an exemplary diagram of a dictionary conversion apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a vehicle according to an embodiment of the present application.
The system comprises a 10-dictionary conversion device, a 100-serialization module, a 200-translation module, a 300-deserialization module, a 401-memory, a 402-processor and a 403-communication interface.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and intended for the purpose of explaining the present application and are not to be construed as limiting the present application.
Dictionary conversion methods, apparatuses, vehicles, and storage media of the embodiments of the present application are described below with reference to the accompanying drawings. In view of the above-mentioned problems in the background art, the present application provides a dictionary converting method, in which, by collecting initial object data of a current vehicle target application program and performing a serialization operation on the initial object data, first json data of the initial object data is generated; based on the first json data, matching dictionary data in the cache, obtaining target dictionary data corresponding to the first json data, and translating the target dictionary data to obtain second json data of the initial object data; and performing deserialization operation on the second json data to obtain target object data of the target application program, and controlling the target application program to run according to the target object data. According to the method and the device, dictionary information in the database is loaded into the cache, dictionary fields in the object are serialized, and the serialized data are translated, so that repeated searching of the dictionary information of the database is avoided, the code structure is optimized, the data readability and the development efficiency are greatly improved, the CPU pressure is reduced, and the stability of the system is improved. Therefore, the problems that the traditional dictionary translation method is complex, the development efficiency is low, the stability of the system is difficult to ensure and the like are solved.
Specifically, fig. 1 is a flowchart of a dictionary conversion method provided in an embodiment of the present application.
As shown in fig. 1, the dictionary converting method includes the steps of:
in step S101, initial object data of a current vehicle target application program is collected, and a serialization operation is performed on the initial object data, so as to generate first json data of the initial object data.
After the jar item is started, the embodiment of the application program which needs dictionary conversion in the current vehicle can be determined so as to acquire the initial object data of the application program, and serialization operation is carried out on the object data to obtain first json data corresponding to the initial object data of the application program, namely the original json data, so that basis is provided for conversion of subsequent dictionary data.
Optionally, in one embodiment of the present application, collecting initial object data of a current vehicle target application includes: calling a preset interface through a target application program to acquire initial data of the target application program; and packaging the initial data to obtain initial object data.
It should be noted that, in the embodiment of the present application, when the front-end application completes the call of a certain interface, initial data of the application may be collected, and the data may be encapsulated into object data, so that implementation of subsequent data serialization operation is effectively ensured.
Optionally, in one embodiment of the present application, the target application includes: at least one of white list configuration of the vehicle-mounted system, proper noun interpretation of the ERP system, mall navigation bar article display and connection configuration of the server.
In the embodiment of the present application, a target application to which the dictionary conversion method can be applied is as follows:
1. the white list configuration of the system sets that the effective user can access the system;
2. proper noun interpretation of ERP system, which is used for selecting attribute of drop-down menu;
3. the navigation bar object display of the mall automatically updates SKU information when the product name is modified;
4. the connection configuration of the server does not need to manually update the IP address of the code, and the corresponding IP address is found according to the name of the server.
It should be noted that, in the actual implementation process, those skilled in the art may apply the dictionary conversion method proposed in the present application to other application programs, which is not limited herein.
Therefore, the dictionary conversion method is applied to various application program scenes, so that the execution efficiency of the application program is improved, and the safety and reliability of data transmission are improved.
Optionally, in one embodiment of the present application, before the serializing operation is performed on the initial object data, the method further includes: initializing at least one dictionary data in a preset database, and storing the at least one dictionary data in a cache.
Before the serialization operation is performed on the initial object data to generate the original json data, after the jar item is started, the embodiment of the application can initialize the dictionary information stored in the database to load the dictionary information into the redis cache, so that the dictionary data conversion efficiency is effectively improved.
Optionally, in one embodiment of the present application, performing a serialization operation on the initial object data to generate first json data of the initial object data includes: and serializing the initial object data based on the fastjson serialization strategy or the jackson serialization strategy to obtain first json data of the initial object data.
It should be noted that, in the embodiment of the present application, serializing operation may be performed on some encapsulated object data or value type data according to a fastjson or jackson mode serializing policy, so as to obtain original json data, and obtain dictionary fields to be translated according to the original json data, so as to provide data support for translation of the dictionary data.
In step S102, based on the first json data, dictionary data in the cache is matched, target dictionary data corresponding to the first json data is obtained, and the target dictionary data is translated, so as to obtain second json data of the initial object data.
After the original json data corresponding to the object data is obtained, further, according to the original json data, dictionary data in the redis cache can be matched, the dictionary data corresponding to the original json data is obtained, and the dictionary data is translated, so that second json data corresponding to the object data, namely the converted json data, can be obtained.
Optionally, in an embodiment of the present application, based on the first json data, matching dictionary data in the cache, obtaining target dictionary data corresponding to the first json data, and translating the target dictionary data to obtain second json data of the initial object data, including: analyzing the first json data to obtain a field to be translated; inquiring dictionary data in the cache to obtain key value pairs corresponding to fields to be translated; and adding the key value pair into the first json data to obtain second json data of the initial object data.
It should be noted that, in the embodiment of the present application, the redis cache may be circularly matched according to the first json data, that is, the original json data, so as to obtain the dictionary key value from the cache, translate the specified dictionary field, and obtain the second json data, that is, the json data after conversion.
According to the method and the device for translating the dictionary data, the original json data can be analyzed, dictionary fields needing to be translated are obtained, meanwhile, key-value corresponding to the fields is obtained according to redis buffering, the value is added to the original json data, new json data (converted json data) containing translation information is formed, and therefore translation of the dictionary data is completed efficiently.
It can be understood that the embodiment of the application translates the dictionary fields in the object through the serialization operation, thereby avoiding repeated searching of database dictionary information for many times, improving the data readability and the development efficiency, avoiding the pressure of the memory and the CPU caused by many times of searching, and improving the stability of the system.
In step S103, the second json data is subjected to a deserialization operation to obtain target object data of the target application program, and the target application program is controlled to run according to the target object data.
After the second json data of the initial object data is obtained, further, the embodiment of the application can perform deserialization operation on the second json data, namely the converted json data, to obtain the target object data of the application program, so that the data readability is improved, the running of the application program is controlled according to the converted object data, and the execution efficiency of the application program is improved.
Optionally, in an embodiment of the present application, performing a deserialization operation on the second json data to obtain target object data of the target application program, including: and in the preset text filter, the second json data is deserialized, and the target object data of the target application program is obtained.
It should be noted that, in the embodiment of the present application, the obtained converted json data may be subjected to a deserialization operation, so as to obtain object data corresponding to the converted json data, and the object data is returned to the front-end application program for use, thereby ensuring the execution efficiency of the application program, and improving the data readability and the stability of the system.
The execution logic of the dictionary conversion method of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a schematic diagram of execution logic of the dictionary converting method of the present application. As shown in fig. 2, the execution logic of the dictionary conversion method of the present application is as follows:
s201: starting jar items;
s202: initializing dictionary information stored in a database, and loading the dictionary data into a redis cache;
s203: serializing the object or value type data into first json data;
s204: according to the first json data, dictionary data in a redis cache are matched;
s205: and performing deserialization operation on the dictionary data to obtain second json data, and completing translation of the dictionary data.
According to the dictionary conversion method provided by the embodiment of the application, initial object data of a current vehicle target application program are collected, and serialization operation is carried out on the initial object data, so that first json data of the initial object data are generated; based on the first json data, matching dictionary data in the cache, obtaining target dictionary data corresponding to the first json data, and translating the target dictionary data to obtain second json data of the initial object data; and performing deserialization operation on the second json data to obtain target object data of the target application program, and controlling the target application program to run according to the target object data. According to the method and the device, dictionary information in the database is loaded into the cache, dictionary fields in the object are serialized, and the serialized data are translated, so that repeated searching of the dictionary information of the database is avoided, the code structure is optimized, the data readability and the development efficiency are greatly improved, the CPU pressure is reduced, and the stability of the system is improved.
Next, a dictionary converting apparatus proposed according to an embodiment of the present application is described with reference to the drawings.
Fig. 3 is a block diagram of a dictionary converting apparatus of an embodiment of the present application.
As shown in fig. 3, the dictionary converting apparatus 10 includes: serialization module 100, translation module 200, and anti-serialization module 300.
The serialization module 100 is configured to collect initial object data of a current vehicle target application program, and perform serialization operation on the initial object data to generate first json data of the initial object data.
The translation module 200 is configured to match dictionary data in the cache based on the first json data, obtain target dictionary data corresponding to the first json data, and translate the target dictionary data to obtain second json data of the initial object data.
And the deserializing module 300 is configured to perform deserializing operation on the second json data to obtain target object data of the target application program, and control the target application program to run according to the target object data.
Optionally, in an embodiment of the present application, the dictionary converting apparatus 10 of the embodiment of the present application further includes: the storage module is used for initializing at least one dictionary data in a preset database before carrying out serialization operation on the initial object data and generating first json data, and storing the at least one dictionary data into a cache.
Optionally, in one embodiment of the present application, the serialization module 100 includes: an acquisition unit and a packaging unit.
The acquisition unit is used for calling a preset interface through the target application program to acquire initial data of the target application program.
And the packaging unit is used for packaging the initial data to obtain initial object data.
Optionally, in one embodiment of the present application, the serialization module 100 further includes: the first processing unit is used for serializing the initial object data based on the fastjson serialization strategy or the jackson serialization strategy to obtain first json data of the initial object data.
Optionally, in one embodiment of the present application, the translation module 200 includes: the device comprises an analysis unit, a query unit and an adding unit.
The parsing unit is used for parsing the first json data to obtain a field to be translated.
And the query unit is used for querying dictionary data in the cache to obtain key value pairs corresponding to the fields to be translated.
And the adding unit is used for adding the key value pair into the first json data to obtain second json data of the initial object data.
Optionally, in one embodiment of the present application, the deserializing module 300 includes: and the second processing unit is used for deserializing the second json data in the preset text filter and acquiring target object data of the target application program.
Optionally, in one embodiment of the present application, the target application includes: at least one of white list configuration of the vehicle-mounted system, proper noun interpretation of the ERP system, mall navigation bar article display and connection configuration of the server.
It should be noted that the foregoing explanation of the dictionary converting method embodiment is also applicable to the dictionary converting apparatus of this embodiment, and will not be repeated here.
The dictionary conversion device provided by the embodiment of the application comprises a serialization module, a first processing module and a second processing module, wherein the serialization module is used for acquiring initial object data of a current vehicle target application program and carrying out serialization operation on the initial object data to generate first json data of the initial object data; the translation module is used for matching dictionary data in the cache based on the first json data, obtaining target dictionary data corresponding to the first json data, and translating the target dictionary data to obtain second json data of the initial object data; and the deserializing module is used for carrying out deserializing operation on the second json data to obtain target object data of the target application program, and controlling the target application program to run according to the target object data. According to the method and the device, dictionary information in the database is loaded into the cache, dictionary fields in the object are serialized, and the serialized data are translated, so that repeated searching of the dictionary information of the database is avoided, the code structure is optimized, the data readability and the development efficiency are greatly improved, the CPU pressure is reduced, and the stability of the system is improved.
Fig. 4 is a schematic structural diagram of a vehicle according to an embodiment of the present application. The vehicle may include:
memory 401, processor 402, and a computer program stored on memory 401 and executable on processor 402.
The dictionary conversion method provided in the above-described embodiment is implemented when the processor 402 executes a program.
Further, the vehicle further includes:
a communication interface 403 for communication between the memory 401 and the processor 402.
A memory 401 for storing a computer program executable on the processor 402.
Memory 401 may comprise high-speed RAM memory or may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
If the memory 401, the processor 402, and the communication interface 403 are implemented independently, the communication interface 403, the memory 401, and the processor 402 may be connected to each other by a bus and perform communication with each other. The bus may be an industry standard architecture (Industry Standard Architecture, abbreviated ISA) bus, an external device interconnect (Peripheral Component, abbreviated PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 4, but not only one bus or one type of bus.
Alternatively, in a specific implementation, if the memory 401, the processor 402, and the communication interface 403 are integrated on a chip, the memory 401, the processor 402, and the communication interface 403 may complete communication with each other through internal interfaces.
The processor 402 may be a central processing unit (Central Processing Unit, abbreviated as CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more integrated circuits configured to implement embodiments of the present application.
The present embodiment also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the dictionary conversion method as above.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or N embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "N" is at least two, such as two, three, etc., unless explicitly defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and additional implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order from that shown or discussed, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or N wires, a portable computer cartridge (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the N steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like. Although embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives, and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (10)

1. A dictionary converting method, comprising the steps of:
collecting initial object data of a current vehicle target application program, and carrying out serialization operation on the initial object data to generate first json data of the initial object data;
based on the first json data, matching dictionary data in a cache, obtaining target dictionary data corresponding to the first json data, translating the target dictionary data, obtaining second json data of the initial object data, and
and performing deserialization operation on the second json data to obtain target object data of the target application program, and controlling the target application program to run according to the target object data.
2. The method of claim 1, further comprising, prior to serializing the initial object data to generate the first json data:
initializing at least one dictionary data in a preset database, and storing the at least one dictionary data in the cache.
3. The method of claim 1, wherein the collecting initial object data for a current vehicle target application comprises:
calling a preset interface through the target application program to acquire initial data of the target application program;
and packaging the initial data to obtain the initial object data.
4. The method of claim 1, wherein the serializing the initial object data to generate the first json data for the initial object data comprises:
and serializing the initial object data based on a fastjson serialization strategy or a jackson serialization strategy to obtain first json data of the initial object data.
5. The method according to claim 1, wherein the matching dictionary data in the cache based on the first json data, obtaining target dictionary data corresponding to the first json data, and translating the target dictionary data to obtain second json data of the initial object data, includes:
analyzing the first json data to obtain a field to be translated;
inquiring dictionary data in the cache to obtain key value pairs corresponding to the fields to be translated;
and adding the key value pair into the first json data to obtain second json data of the initial object data.
6. The method according to claim 1, wherein the performing the deserializing operation on the second json data to obtain the target object data of the target application program includes:
and in a preset text filter, inversely sequencing the second json data to acquire target object data of the target application program.
7. The method of claim 1, wherein the target application comprises: at least one of white list configuration of the vehicle-mounted system, proper noun interpretation of the ERP system, mall navigation bar article display and connection configuration of the server.
8. A dictionary converting apparatus characterized by comprising:
the serialization module is used for collecting initial object data of a current vehicle target application program, carrying out serialization operation on the initial object data and generating first json data of the initial object data;
the translation module is used for obtaining target dictionary data corresponding to the first json data based on the first json data and matching dictionary data in the cache, translating the target dictionary data to obtain second json data of the initial object data, and
and the deserializing module is used for carrying out deserializing operation on the second json data to obtain target object data of the target application program, and controlling the target application program to run according to the target object data.
9. A vehicle, characterized by comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the dictionary conversion method of any one of claims 1-7.
10. A computer-readable storage medium having stored thereon a computer program, the program being executable by a processor for implementing the dictionary conversion method as claimed in any one of claims 1-7.
CN202311272471.3A 2023-09-27 2023-09-27 Dictionary conversion method, dictionary conversion device, vehicle and storage medium Pending CN117608703A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311272471.3A CN117608703A (en) 2023-09-27 2023-09-27 Dictionary conversion method, dictionary conversion device, vehicle and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311272471.3A CN117608703A (en) 2023-09-27 2023-09-27 Dictionary conversion method, dictionary conversion device, vehicle and storage medium

Publications (1)

Publication Number Publication Date
CN117608703A true CN117608703A (en) 2024-02-27

Family

ID=89956769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311272471.3A Pending CN117608703A (en) 2023-09-27 2023-09-27 Dictionary conversion method, dictionary conversion device, vehicle and storage medium

Country Status (1)

Country Link
CN (1) CN117608703A (en)

Similar Documents

Publication Publication Date Title
CN111552267B (en) Vehicle diagnosis method and device and vehicle diagnosis equipment
CN112083709B (en) Vehicle diagnosis method, system, terminal device and storage medium
CN112181924A (en) File conversion method, device, equipment and medium
CN113760839A (en) Log data compression processing method and device, electronic equipment and storage medium
CN111949513A (en) Configuration file loading method and device, electronic equipment and readable storage device
CN112181411A (en) Menu generation method, menu generation device and diagnosis equipment
CN111177089B (en) Log processing code generation method and device, computer system and storage medium
CN117608703A (en) Dictionary conversion method, dictionary conversion device, vehicle and storage medium
CN115840618B (en) Access method and device for virtual machine simulation equipment register in hypervisor
CN109324838B (en) Execution method and execution device of single chip microcomputer program and terminal
CN112905381B (en) Method, device, equipment and medium for acquiring stack frame information in call stack
CN114611500A (en) Expression processing method and device, electronic equipment and computer readable storage medium
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN113886302A (en) Serial port number obtaining method and device of application equipment, terminal equipment and storage medium
CN114116712A (en) Extended field processing method and device, electronic equipment and storage medium
CN109460255B (en) Memory address query method and device
CN113848862A (en) Diagnostic software acquisition method and device, communication equipment and storage medium
CN108958929B (en) Method and device for applying algorithm library, storage medium and electronic equipment
CN107479910B (en) Document repairing method, system, readable storage medium and computer equipment
CN112256252A (en) Interface generation method and device, storage medium and electronic equipment
CN112183116B (en) Information presentation method, device, equipment and medium
CN113704020B (en) Method and device for analyzing error field data of solid state disk
CN113722019B (en) Display method, device and equipment of platform program
CN113407460B (en) Page testing method, device, equipment and storage medium
CN112115346B (en) Clue data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination