CN111124554A - Data processing method and related product - Google Patents

Data processing method and related product Download PDF

Info

Publication number
CN111124554A
CN111124554A CN201911336893.6A CN201911336893A CN111124554A CN 111124554 A CN111124554 A CN 111124554A CN 201911336893 A CN201911336893 A CN 201911336893A CN 111124554 A CN111124554 A CN 111124554A
Authority
CN
China
Prior art keywords
data stream
class object
data
processed
model
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
CN201911336893.6A
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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN201911336893.6A priority Critical patent/CN111124554A/en
Publication of CN111124554A publication Critical patent/CN111124554A/en
Pending legal-status Critical Current

Links

Images

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/4488Object-oriented
    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions

Abstract

The application discloses a data processing method and a related product. The method comprises the following steps: acquiring a target identifier of a computational model of a data stream to be processed; determining a target pointer of a class object of a computation model of the data stream to be processed according to a mapping relation between an identifier of a data stream computation model and a pointer of the class object of the data stream computation model and the target identifier; the class object of the data flow calculation model is used for storing data information of the data flow calculation model; and calling the content in the class object of the calculation model of the data stream to be processed through the target pointer to perform calculation processing, so as to obtain the value of the data stream to be processed. By adopting the scheme, the calculation model can be efficiently retrieved and called to calculate the data flow value, and the calculation efficiency of the data flow value in the automobile fault diagnosis process is improved.

Description

Data processing method and related product
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method and a related product.
Background
The early automobile fault diagnosis method is mainly a manual diagnosis method, and the manual diagnosis refers to that the practical experience of a diagnostician is relied on, and the examination, the test, the analysis and the like are carried out by using sensory means such as eye sight, ear hearing, hand touch and the like by means of simple tools, so as to judge the automobile fault condition. With the technical development in the automobile field, the instrument and equipment diagnosis method is gradually applied to automobile fault diagnosis. In diagnostic practice, the two methods are often used in combination, and the specific process is as follows: the diagnostic personnel inquire the fault condition of the driver firstly, then visually inspect the vehicle and preliminarily judge the fault according to experience, and then further screen and identify by using diagnostic instruments and equipment to finally confirm the fault.
The diagnostic personnel can accurately acquire the values of data streams such as oil temperature, battery voltage, engine running time and the like by using diagnostic instrument equipment. However, in the link of calculating the data stream value, the conventional method usually calls the analysis interface to retrieve the algorithm expression from the algorithm library file, then completes the calling of the algorithm through the algorithm expression, and finally calculates the value of the corresponding data stream, so that the calculation efficiency is low.
Disclosure of Invention
The application provides a data processing method and a related product, so as to improve the calculation efficiency of a data stream value in the automobile fault diagnosis process.
In a first aspect, a data processing method is provided, including: acquiring a target identifier of a computational model of a data stream to be processed; determining a target pointer of a class object of a computation model of the data stream to be processed according to a mapping relation between an identifier of a data stream computation model and a pointer of the class object of the data stream computation model and the target identifier; the class object of the data flow calculation model is used for storing data information of the data flow calculation model; and calling the content in the class object of the calculation model of the data stream to be processed through the target pointer to perform calculation processing, so as to obtain the value of the data stream to be processed.
In one possible implementation manner, before obtaining the target identifier of the computation model of the data stream to be processed, the method further includes: acquiring an automobile source file, wherein the automobile source file comprises a plurality of data flow calculation models; analyzing the automobile source file to obtain data information and identifiers of the multiple data stream calculation models; respectively storing data information of the data stream calculation models into a plurality of class objects, wherein the class objects are created aiming at the data stream calculation models, and the data stream calculation models and the class objects are in one-to-one correspondence; and establishing a mapping relation between the identifier of the data flow calculation model and the pointer of the class object.
In another possible implementation manner, the establishing a mapping relationship between an identifier of the data flow computation model and a pointer of the class object includes: creating a mapping class object, wherein the mapping class object comprises key-value pair elements; storing an identifier of the data stream computation model as a key to an element in the mapping class object and a pointer to the class object as a value of the element in the mapping class object.
In another possible implementation manner, the determining, according to the mapping relationship between the identifier of the data stream computation model and the pointer of the class object of the data stream computation model, and the target identifier, the target pointer of the class object of the computation model of the data stream to be processed includes: and performing retrieval processing on elements in the mapping class object, and determining the value of the element taking the target identifier as a key as the target pointer.
In yet another possible implementation manner, the data type of the mapping class object is an association container, and the association container is a data structure in a standard template library.
In another possible implementation manner, the obtaining of the target identifier of the computation model of the data stream to be processed includes: receiving an instruction for calculating the value of the data stream to be processed; determining a target data stream class object corresponding to a data stream to be processed according to a mapping relation between the data stream and a data stream class object and the data stream to be processed, wherein the data stream class object is a class object created aiming at the data stream; and calling the content in the target data stream class object to acquire the target identifier.
In a second aspect, there is provided a data processing apparatus comprising: an acquisition unit for acquiring a target identifier of a computational model of a data stream to be processed; the determining unit is used for determining a target pointer of a class object of the computation model of the data stream to be processed according to the target identifier and a mapping relation between the identifier of the data stream computation model and the pointer of the class object of the data stream computation model; the class object of the data flow calculation model is used for storing data information of the data flow calculation model; and the computing unit is used for calling the content in the class object of the computing model of the data stream to be processed through the target pointer to perform computing processing so as to obtain the value of the data stream to be processed.
In one possible implementation, the apparatus further includes: the device comprises an analysis unit, a storage unit and a mapping establishing unit; before the obtaining of the target identifier of the computation model of the data stream to be processed, the obtaining unit is further configured to obtain an automobile source file, where the automobile source file includes a plurality of data stream computation models; the analysis unit is used for analyzing the automobile source file to obtain data information and identifiers of the multiple data stream calculation models; the storage unit is configured to store data information of the data stream computation models into a plurality of class objects respectively, where the class objects are created for the data stream computation models, and the data stream computation models and the class objects are in one-to-one correspondence; and the mapping establishing unit is used for establishing a mapping relation between the identifier of the data stream calculation model and the pointer of the class object.
In another possible implementation manner, the establishing a mapping unit is specifically configured to: creating a mapping class object, wherein the mapping class object comprises key-value pair elements; storing an identifier of the data stream computation model as a key to an element in the mapping class object and a pointer to the class object as a value of the element in the mapping class object.
In another possible implementation manner, the determining unit is specifically configured to: and performing retrieval processing on elements in the mapping class object, and determining the value of the element taking the target identifier as a key as the target pointer.
In yet another possible implementation manner, the data type of the mapping class object is an association container, and the association container is a data structure in a standard template library.
In another possible implementation manner, the obtaining unit is specifically configured to: receiving an instruction for calculating the value of the data stream to be processed; determining a target data stream class object corresponding to a data stream to be processed according to a mapping relation between the data stream and a data stream class object and the data stream to be processed, wherein the data stream class object is a class object created aiming at the data stream; and calling the content in the target data stream class object to acquire the target identifier.
In a third aspect, an electronic device is provided, including: a processor, a memory; the processor is configured to support the electronic device to perform corresponding functions in the method of the first aspect and any possible implementation manner thereof. The memory stores programs (instructions) and data necessary for the electronic device. Optionally, the electronic device may further include an input/output interface for supporting communication between the electronic device and other devices.
In a fourth aspect, there is provided a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the method of the first aspect and any possible implementation thereof.
In a fifth aspect, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of the first aspect and any of its possible implementations.
The method comprises the steps of firstly obtaining a target identifier of a calculation model of the data stream to be processed; then, determining a target pointer corresponding to the target identifier according to the mapping relation between the identifier of the data stream calculation model and the pointer of the class object of the data stream calculation model; and finally, directly calling the content in the class object of the calculation model of the data stream to be processed through the target pointer to perform calculation processing, and obtaining the value of the data stream to be processed. By adopting the scheme, the calculation model can be efficiently retrieved and called to calculate the data flow value, and the calculation efficiency of the data flow value in the automobile fault diagnosis process is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present application, the drawings required to be used in the embodiments or the background art of the present application will be described below.
Fig. 1 is a schematic flowchart of a data processing method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of another data processing method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another data processing method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a menu of a data flow list according to an embodiment of the present application;
fig. 5 is a schematic diagram of a menu of a data flow value list according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
fig. 7 is a schematic hardware structure diagram of a data processing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The embodiments of the present application will be described below with reference to the drawings.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a data processing method according to an embodiment of the present disclosure.
101. A target identifier of a computational model of a data stream to be processed is obtained.
In this embodiment of the present application, a to-be-processed data stream refers to a data stream that is selected by a user on a menu interface and requests to acquire numerical information, where the to-be-processed data stream may only include one data stream or may include multiple data streams, and the number of the data streams specifically included in the to-be-processed data stream is determined according to the selection of the user. The calculation model of the data stream to be processed refers to an algorithm for calculating a value of the data stream to be processed, the algorithm includes data information such as a binary system information, a variable, a function and the like, and each data stream has a corresponding calculation model. The target identifier of the computation model of the data stream to be processed refers to a distinctive identifier that distinguishes the computation model of the data stream to be processed from the computation models of other data streams, and may alternatively be a character string of a combination of numbers and letters, such as "guzhangma 0", "guzhangma 9", "guzhangma 52", and the like. For example, a diagnostician in the automobile fault diagnosis may want to accurately obtain values of data streams such as oil temperature, battery voltage, and engine running time by using a diagnostic instrument, and accordingly, the diagnostician may select data stream options such as oil temperature, battery voltage, and engine running time from a data stream list displayed on a data stream menu interface, and according to the selection of the diagnostician, the data stream to be processed may include three data streams in total, namely, oil temperature, battery voltage, and engine running time.
102. And determining a target pointer of the class object of the computation model of the data stream to be processed according to the mapping relation between the identifier of the data stream computation model and the pointer of the class object of the data stream computation model and the target identifier.
The class object of the data flow calculation model is used for storing data information of the data flow calculation model.
In the embodiment of the present application, as described above, the data stream calculation model refers to an algorithm including data information such as binary information, variables, and functions, a class object is created for each data stream calculation model, the data information of the data stream calculation model is stored in a corresponding class object, that is, the class object is a class object of the data stream calculation model, and a pointer of the class object of each data stream calculation model is uniquely determined. Each data stream has a corresponding calculation model, and the identifier of the calculation model of the data stream is used for distinguishing different calculation models corresponding to different data streams. Each data flow calculation model has a unique distinguishing identifier, and the pointer of the class object of each data flow calculation model is uniquely determined, so that the mapping relationship between the identifier of the data flow calculation model and the pointer of the class object of the data flow calculation model is the one-to-one correspondence relationship between the identifier and the pointer. Alternatively, the identifier may be a string and the pointer is an object pointing to a storage address in the memory. According to the one-to-one correspondence relationship between the identifiers and the pointers, when the target identifier is obtained, the target pointer corresponding to the target identifier can be determined, that is, according to the mapping relationship and the obtained target identifier of the calculation model of the data stream to be processed, the target pointer of the class object of the calculation model of the data stream to be processed can be determined.
103. And calling the content in the class object of the calculation model of the data stream to be processed through the target pointer to perform calculation processing, so as to obtain the value of the data stream to be processed.
In the embodiment of the present application, the content in the class object of the calculation model of the data stream to be processed is essentially data stored in a certain memory block, and the memory can be accessed through the pointer, that is, the memory is subjected to data reading and writing operations. The content in the class object of the computation model of the data stream to be processed is called by the target pointer, that is, the data in the memory block pointed by the pointer is read by the target pointer, as described above, the class object of the data stream computation model is used for storing data information of the data stream computation model, and it can be understood that the content in the class object of the computation model of the data stream to be processed is essentially an algorithm for computing a value of the data stream to be processed, and the value of the data stream to be processed can be obtained by calling the algorithm to perform a specific computation.
The method comprises the steps of firstly obtaining a target identifier of a calculation model of the data stream to be processed; then, determining a target pointer corresponding to the target identifier according to the mapping relation between the identifier of the data stream calculation model and the pointer of the class object of the data stream calculation model; and finally, directly calling the content in the class object of the calculation model of the data stream to be processed through the target pointer to perform calculation processing, and obtaining the value of the data stream to be processed. By adopting the scheme, the calculation model can be efficiently retrieved and called to calculate the data flow value, and the calculation efficiency of the data flow value in the automobile fault diagnosis process is improved.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating another data processing method according to an embodiment of the present disclosure.
201. And acquiring an automobile source file, wherein the automobile source file comprises a plurality of data flow calculation models.
In the embodiment of the application, the automobile source file is a source file provided by an automobile manufacturer, and the automobile manufacturer defines a data stream calculation model in the automobile source file, which is used for calculating data stream values of various electronic control units (such as systems of an engine, a gateway, a platform diagnosis instrument, a body control, a telematics controller, and the like) of an automobile in an automobile diagnosis process. The automobile source files correspond to automobile models one by one. One possible implementation manner is that the automobile source file is stored in a designated storage path in advance, and the diagnostician can obtain the automobile source file from the designated storage path by means of the automobile diagnostic software, for example, the diagnostician inputs an automobile type to be diagnosed on an automobile diagnostic software display interface, or a vehicle type list is provided on the automobile diagnostic software display interface, and the diagnostician selects the automobile type to be diagnosed in the vehicle type list; then, the automobile diagnosis software retrieves an automobile source file matched with the automobile type to be diagnosed from a preset automobile source file storage path, so as to obtain a corresponding automobile source file.
202. And analyzing the automobile source file to obtain the data information and the identifiers of the plurality of data stream calculation models.
In the embodiment of the present application, as described above, the automobile manufacturer defines the data stream calculation model in the automobile source file, specifically, the automobile source file includes not only the data content of the data stream calculation model but also an identifier of the data stream calculation model, and the automobile manufacturer distinguishes different calculation models of different data streams when manufacturing the automobile source file, and a specific distinguishing manner is to assign a unique distinguishing identifier to each data stream calculation model. Parsing the automotive source file can obtain the data content and identifiers of the data stream computational model defined in the file.
203. And respectively storing the data information of the data flow calculation models into a plurality of class objects.
The class object is a class object created for the data stream computation model, and the data stream computation model and the class object are in one-to-one correspondence.
In the embodiment of the present application, after obtaining the data information of the data stream calculation model, the data information is stored in the class object created for the data stream calculation model, each data stream calculation model corresponds to the class object created for the data stream calculation model one to one, and the class object correspondingly stores the data information of the data stream calculation model corresponding to the class object.
204. And establishing a mapping relation between the identifier of the data flow calculation model and the pointer of the class object.
In the embodiment of the present application, as described above, the automobile manufacturer assigns a unique discriminative identifier to each data stream computation model in the automobile source file, and in 203, the data information of each data stream computation model is stored in a dedicated class object created for the data stream computation model, and the class object is created and then has a unique discriminative pointer. Thus, for each data flow computation model, a one-to-one mapping between an identifier of the data flow computation model and a pointer of a class object of the data flow computation model may be established.
In the embodiment of the application, an automobile source file is acquired first, then the automobile source file is analyzed to obtain data information and an identifier of a data stream calculation model defined in the automobile source file, further, the data information of the data stream calculation model is stored in a class object created for the data stream calculation model, and finally, a one-to-one mapping relationship between the identifier of the data stream calculation model and a pointer of the class object of the data stream calculation model can be established. By adopting the scheme, the corresponding algorithm data can be called to perform calculation processing in the calculation link of the data stream value directly according to the mapping relation and the identifier of the calculation model of the data stream to be processed, so that the calculation efficiency of the data stream value in the automobile fault diagnosis process is improved.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating another data processing method according to an embodiment of the present disclosure.
301. And creating a mapping class object, wherein the mapping class object comprises key-value pair elements.
In this embodiment of the present application, the mapping class object may be an instantiated class object of an existing data structure in a Standard Template Library (STL), or may be an instantiated class object of a custom data structure, where the mapping class object includes a key-value pair element. Taking an existing data structure in the standard template library as an example, one possible implementation manner is that the data type of the mapping class object is an association container, that is, the mapping class object is an association container object. The association container is also called an association array, is an abstract data structure, and comprises a non-repeated ordered pair of (key, value), and a very efficient balanced retrieval binary tree is adopted inside, so that data can be efficiently retrieved through a numeric operator.
302. And storing the identifier of the data flow calculation model as a key of an element in the mapping class object and the pointer of the class object as a value of the element in the mapping class object.
In this embodiment of the application, the identifier of the data stream calculation model is an identifier of the data stream calculation model defined in the automobile source file as described in 204, and the pointer of the class object is a pointer of the class object of the data stream calculation model. And storing the identifier of the data flow calculation model as a key of an element in the mapping class object and the pointer of the class object as a value of the element in the mapping class object, that is, each element in the mapping class object correspondingly comprises an identifier of the data flow calculation model and a pointer of a class object of the data flow calculation model, for example, the mapping class object comprises element a, element B and element C, and accordingly, the key value pair in element a is (identifier a, pointer a), the key value pair in element B is (identifier B, pointer B), and the key value pair in element C is (identifier C, pointer C). Therefore, storing the identifier of the data flow calculation model as a key of the element in the mapping class object and the pointer of the class object as a value of the element in the mapping class object corresponds to establishing a one-to-one mapping relationship between the identifier of the data flow calculation model and the pointer of the class object of the data flow calculation model.
303. An instruction to calculate a value of a data stream to be processed is received.
In the embodiment of the present application, as shown in fig. 4, fig. 4 is a schematic menu diagram of a data flow list. When a user selects a data stream option needing to calculate a data stream value in the menu, taking the automobile diagnosis device as an example, the diagnosis device correspondingly receives an instruction for receiving a value of a data stream to be processed, wherein the data stream to be processed is the data stream corresponding to the data stream option selected by the user.
304. And determining a target data stream class object corresponding to the data stream to be processed according to the mapping relation between the data stream and the data stream class object and the data stream to be processed.
The data stream class object is a class object created for a data stream.
In this embodiment of the present application, as shown in the menu schematic diagram of the data stream list shown in fig. 4, text contents of a plurality of data streams are displayed on a menu interface, and one possible implementation manner is that a mapping relationship between a data stream and a data stream class object is expressed as: the data stream options in the text content list have a one-to-one correspondence with an index of a container storing data stream class objects, the data stream class objects are class objects created for the data streams, and each data stream class object in the container is accessible through the index of the container. When an instruction for calculating the value of the data stream to be processed is received, according to the option index of the data stream to be processed in the text content list of the data stream, the target index of the container corresponding to the option index can be determined, and then according to the target index, the target data stream class object corresponding to the data stream to be processed can be determined from the container.
305. And calling the content in the target data stream class object to obtain a target identifier of the calculation model of the data stream to be processed.
In the embodiment of the present application, as described above, the data stream class object is a class object created for a data stream, and the data stream class object stores data information related to the data stream, where the data stream class object includes an identifier of a computation model of the data stream, and specifically, the identifier is stored in a variable of the data stream class object. Calling the content in the target data stream class object, namely accessing a target variable storing the identifier of the data stream calculation model in the target data stream class object through a variable name, and acquiring the value in the target variable, namely the target identifier of the calculation model of the data stream to be processed.
306. And searching the elements in the mapping class object, and determining the value of the element taking the target identifier as a key as a target pointer.
As indicated in 302, each element in the mapping class object correspondingly includes an identifier of the data flow calculation model and a pointer of the class object of the data flow calculation model, specifically, the identifier of the data flow calculation model is a key, and the pointer of the class object of the data flow calculation model is a value. Then, the search processing is performed on the element in the mapping class object, the value of the element with the target identifier as a key is determined as a target pointer, that is, the target identifier is used as a key, the element in the mapping class object is searched by using a search operator, the element with the target identifier as a key is determined, and then the value of the element is determined as a target pointer.
307. And calling the content in the class object of the calculation model of the data stream to be processed through the target pointer to perform calculation processing, so as to obtain the value of the data stream to be processed.
The specific process in the embodiment of the present application is the same as the process in 103, and is not described here again. Taking a scenario of vehicle fault diagnosis as an example, a value of a data stream obtained by the present solution is illustrated, as shown in fig. 5, fig. 5 is a menu diagram of a data stream value list.
The method comprises the steps that a mapping relation between an identifier of a data stream calculation model and a pointer of a class object of the data stream calculation model is established by mapping the class object, when a data stream value is calculated, a key value relation of elements in the mapping class object is utilized, a target identifier is used as a key, and a corresponding value is quickly retrieved and used as a target pointer; and then, directly calling the content in the class object of the calculation model of the data stream to be processed through the target pointer to perform calculation processing, and obtaining the value of the data stream to be processed. By adopting the scheme, the calculation model can be efficiently retrieved and called to calculate the data flow value, and the calculation efficiency of the data flow value in the automobile fault diagnosis process is improved.
The method of the embodiments of the present application is set forth above in detail and the apparatus of the embodiments of the present application is provided below.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application, where the apparatus 1 includes: an acquisition unit 11, a determination unit 12, and a calculation unit 13. Wherein:
an obtaining unit 11, configured to obtain a target identifier of a computational model of a data stream to be processed;
a determining unit 12, configured to determine, according to a mapping relationship between an identifier of a data stream computation model and a pointer of a class object of the data stream computation model, and the target identifier, a target pointer of the class object of the computation model of the data stream to be processed; the class object of the data flow calculation model is used for storing data information of the data flow calculation model;
and the calculating unit 13 is configured to call, through the target pointer, content in a class object of a calculation model of the data stream to be processed to perform calculation processing, so as to obtain a value of the data stream to be processed.
In one possible implementation, the apparatus further includes: the device comprises an analysis unit 14, a storage unit 15 and a mapping establishing unit 16; before the obtaining of the target identifier of the calculation model of the data stream to be processed, the obtaining unit 11 is further configured to obtain an automobile source file, where the automobile source file includes a plurality of data stream calculation models; the parsing unit 14 is configured to parse the automobile source file to obtain data information and identifiers of the multiple data stream calculation models; the storage unit 15 is configured to store the data information of the multiple data stream calculation models into multiple class objects respectively, where the class objects are created for the data stream calculation models, and the data stream calculation models and the class objects are in one-to-one correspondence; the mapping unit 16 is configured to establish a mapping relationship between an identifier of the data stream computation model and a pointer of the class object.
In another possible implementation manner, the establishing mapping unit 16 is specifically configured to: creating a mapping class object, wherein the mapping class object comprises key-value pair elements; storing an identifier of the data stream computation model as a key to an element in the mapping class object and a pointer to the class object as a value of the element in the mapping class object.
In another possible implementation manner, the determining unit 12 is specifically configured to: and performing retrieval processing on elements in the mapping class object, and determining the value of the element taking the target identifier as a key as the target pointer.
In yet another possible implementation manner, the data type of the mapping class object is an association container, and the association container is a data structure in a standard template library.
In another possible implementation manner, the obtaining unit 11 is specifically configured to: receiving an instruction for calculating the value of the data stream to be processed; determining a target data stream class object corresponding to a data stream to be processed according to a mapping relation between the data stream and a data stream class object and the data stream to be processed, wherein the data stream class object is a class object created aiming at the data stream; and calling the content in the target data stream class object to acquire the target identifier.
Fig. 7 is a schematic hardware structure diagram of a data processing apparatus according to an embodiment of the present application. The data processing device 2 comprises a processor 21 and may further comprise an input device 22, an output device 23 and a memory 24. The input device 22, the output device 23, the memory 24 and the processor 21 are connected to each other via a bus.
The memory includes, but is not limited to, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a portable read-only memory (CD-ROM), which is used for storing instructions and data.
The input means are for inputting data and/or signals and the output means are for outputting data and/or signals. The output means and the input means may be separate devices or may be an integral device.
The processor may include one or more processors, for example, one or more Central Processing Units (CPUs), and in the case of one CPU, the CPU may be a single-core CPU or a multi-core CPU.
The memory is used to store program codes and data of the network device.
The processor is used for calling the program codes and data in the memory and executing the following steps: acquiring a target identifier of a computational model of a data stream to be processed; determining a target pointer of a class object of a computation model of the data stream to be processed according to a mapping relation between an identifier of a data stream computation model and a pointer of the class object of the data stream computation model and the target identifier; the class object of the data flow calculation model is used for storing data information of the data flow calculation model; and calling the content in the class object of the calculation model of the data stream to be processed through the target pointer to perform calculation processing, so as to obtain the value of the data stream to be processed.
In one implementation, the processor is configured to perform the steps of: before obtaining the target identifier of the computational model of the data stream to be processed, the steps further include: acquiring an automobile source file, wherein the automobile source file comprises a plurality of data flow calculation models; analyzing the automobile source file to obtain data information and identifiers of the multiple data stream calculation models; respectively storing data information of the data stream calculation models into a plurality of class objects, wherein the class objects are created aiming at the data stream calculation models, and the data stream calculation models and the class objects are in one-to-one correspondence; and establishing a mapping relation between the identifier of the data flow calculation model and the pointer of the class object.
In another implementation, the processor is configured to perform the steps of: the establishing a mapping relationship between the identifier of the data stream computation model and the pointer of the class object comprises: creating a mapping class object, wherein the mapping class object comprises key-value pair elements; storing an identifier of the data stream computation model as a key to an element in the mapping class object and a pointer to the class object as a value of the element in the mapping class object.
In yet another implementation, the processor is configured to perform the steps of: determining a target pointer of a class object of the computation model of the data stream to be processed according to the mapping relationship between the identifier of the data stream computation model and the pointer of the class object of the data stream computation model and the target identifier, including: and performing retrieval processing on elements in the mapping class object, and determining the value of the element taking the target identifier as a key as the target pointer.
In yet another implementation, the data type of the mapping class object is an association container, and the association container is a data structure in a standard template library.
In yet another implementation, the processor is configured to perform the steps of: the obtaining of the target identifier of the computational model of the data stream to be processed includes: receiving an instruction for calculating the value of the data stream to be processed; determining a target data stream class object corresponding to a data stream to be processed according to a mapping relation between the data stream and a data stream class object and the data stream to be processed, wherein the data stream class object is a class object created aiming at the data stream; and calling the content in the target data stream class object to acquire the target identifier.
It will be appreciated that fig. 7 only shows a simplified design of a data processing apparatus. In practical applications, the data processing apparatus may further include other necessary components, including but not limited to any number of input/output devices, processors, controllers, memories, etc., and all data processing apparatuses that may implement the embodiments of the present application are within the protection scope of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)), or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), among others.
One of ordinary skill in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the above method embodiments. And the aforementioned storage medium includes: various media that can store program codes, such as a read-only memory (ROM) or a Random Access Memory (RAM), a magnetic disk, or an optical disk.

Claims (10)

1. A data processing method, comprising:
acquiring a target identifier of a computational model of a data stream to be processed;
determining a target pointer of a class object of a computation model of the data stream to be processed according to a mapping relation between an identifier of a data stream computation model and a pointer of the class object of the data stream computation model and the target identifier; the class object of the data flow calculation model is used for storing data information of the data flow calculation model;
and calling the content in the class object of the calculation model of the data stream to be processed through the target pointer to perform calculation processing, so as to obtain the value of the data stream to be processed.
2. The method of claim 1, wherein prior to obtaining the target identifier of the computational model of the data stream to be processed, the method further comprises:
acquiring an automobile source file, wherein the automobile source file comprises a plurality of data flow calculation models;
analyzing the automobile source file to obtain data information and identifiers of the multiple data stream calculation models;
respectively storing data information of the data stream calculation models into a plurality of class objects, wherein the class objects are created aiming at the data stream calculation models, and the data stream calculation models and the class objects are in one-to-one correspondence;
and establishing a mapping relation between the identifier of the data flow calculation model and the pointer of the class object.
3. The method of claim 2, wherein the establishing a mapping between an identifier of the data flow computation model and a pointer of the class object comprises:
creating a mapping class object, wherein the mapping class object comprises key-value pair elements;
storing an identifier of the data stream computation model as a key to an element in the mapping class object and a pointer to the class object as a value of the element in the mapping class object.
4. The method according to claim 3, wherein determining the target pointer of the class object of the computation model of the data stream to be processed according to the mapping relationship between the identifier of the data stream computation model and the pointer of the class object of the data stream computation model and the target identifier comprises:
and performing retrieval processing on elements in the mapping class object, and determining the value of the element taking the target identifier as a key as the target pointer.
5. The method of claim 4, wherein the data type of the mapping class object is an association container, and the association container is a data structure in a standard template library.
6. The method according to any one of claims 1 to 5, wherein the obtaining of the target identifier of the computational model of the data stream to be processed comprises:
receiving an instruction for calculating the value of the data stream to be processed;
determining a target data stream class object corresponding to a data stream to be processed according to a mapping relation between the data stream and a data stream class object and the data stream to be processed, wherein the data stream class object is a class object created aiming at the data stream;
and calling the content in the target data stream class object to acquire the target identifier.
7. A data processing apparatus, comprising:
an acquisition unit for acquiring a target identifier of a computational model of a data stream to be processed;
the determining unit is used for determining a target pointer of a class object of the computation model of the data stream to be processed according to the target identifier and a mapping relation between the identifier of the data stream computation model and the pointer of the class object of the data stream computation model; the class object of the data flow calculation model is used for storing data information of the data flow calculation model;
and the computing unit is used for calling the content in the class object of the computing model of the data stream to be processed through the target pointer to perform computing processing so as to obtain the value of the data stream to be processed.
8. The apparatus of claim 7, further comprising: the device comprises an analysis unit, a storage unit and a mapping establishing unit; before said obtaining of the target identifier of the computational model of the data stream to be processed,
the acquisition unit is further used for acquiring an automobile source file, wherein the automobile source file comprises a plurality of data flow calculation models; the analysis unit is used for analyzing the automobile source file to obtain data information and identifiers of the multiple data stream calculation models;
the storage unit is configured to store data information of the data stream computation models into a plurality of class objects respectively, where the class objects are created for the data stream computation models, and the data stream computation models and the class objects are in one-to-one correspondence;
and the mapping establishing unit is used for establishing a mapping relation between the identifier of the data stream calculation model and the pointer of the class object.
9. An electronic device, comprising: a processor and a memory, wherein the memory stores program instructions that, when executed by the processor, cause the processor to perform the method of any of claims 1 to 6.
10. A computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 6.
CN201911336893.6A 2019-12-23 2019-12-23 Data processing method and related product Pending CN111124554A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911336893.6A CN111124554A (en) 2019-12-23 2019-12-23 Data processing method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911336893.6A CN111124554A (en) 2019-12-23 2019-12-23 Data processing method and related product

Publications (1)

Publication Number Publication Date
CN111124554A true CN111124554A (en) 2020-05-08

Family

ID=70501211

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911336893.6A Pending CN111124554A (en) 2019-12-23 2019-12-23 Data processing method and related product

Country Status (1)

Country Link
CN (1) CN111124554A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111930097A (en) * 2020-07-28 2020-11-13 深圳市元征科技股份有限公司 Vehicle diagnostic data analysis method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5893108A (en) * 1994-12-29 1999-04-06 International Business Machines Corporation System, method, and computer program product for efficiently translating relational tuples to object-oriented objects
CN107209666A (en) * 2014-12-12 2017-09-26 微软技术许可有限责任公司 Computer system
WO2019014592A1 (en) * 2017-07-14 2019-01-17 Alibaba Group Holding Limited Blockchain based data processing method and device
CN109710185A (en) * 2018-12-19 2019-05-03 麒麟合盛网络技术股份有限公司 Data processing method and device
CN110019004A (en) * 2017-09-08 2019-07-16 华为技术有限公司 A kind of data processing method, apparatus and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5893108A (en) * 1994-12-29 1999-04-06 International Business Machines Corporation System, method, and computer program product for efficiently translating relational tuples to object-oriented objects
CN107209666A (en) * 2014-12-12 2017-09-26 微软技术许可有限责任公司 Computer system
WO2019014592A1 (en) * 2017-07-14 2019-01-17 Alibaba Group Holding Limited Blockchain based data processing method and device
CN110019004A (en) * 2017-09-08 2019-07-16 华为技术有限公司 A kind of data processing method, apparatus and system
CN109710185A (en) * 2018-12-19 2019-05-03 麒麟合盛网络技术股份有限公司 Data processing method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111930097A (en) * 2020-07-28 2020-11-13 深圳市元征科技股份有限公司 Vehicle diagnostic data analysis method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US8752043B2 (en) Providing guidance for software installation
CN109656815B (en) Test statement writing method, device and medium with configuration file and electronic equipment
CN107783786B (en) Method and device for creating equipment resources
CN110334816B (en) Industrial equipment detection method, device, equipment and readable storage medium
US9658834B2 (en) Program visualization device, program visualization method, and program visualization program
CN111176695A (en) Vehicle ECU configuration method, server and terminal
CN110046081A (en) Performance test methods, performance testing device, electronic equipment and storage medium
CN111694572A (en) Code format conversion method, device, computer equipment and storage medium
CN107291835B (en) Search term recommendation method and device
CN111796578A (en) Vehicle controller testing method, device and system and storage medium
CN111124554A (en) Data processing method and related product
US9760933B1 (en) Interactive shopping advisor for refinancing product queries
CN108647284A (en) Record method and device, medium and the computing device of user behavior
CN109828902B (en) Interface parameter determining method and device, electronic equipment and storage medium
CN110751227A (en) Data processing method, device, equipment and storage medium
CN112306041A (en) Vehicle configuration information writing method and device and electronic equipment
CN114500334B (en) Diagnosis method and device for server application architecture
CN115408034A (en) Vehicle-mounted controller upgrading method and device, electronic equipment and storage medium
CN109460001B (en) Method and device for associating fault code with accessory
CN114116480A (en) Method, device, medium and equipment for determining application program test coverage rate
CN114444776A (en) Neural network-based hazard source analysis method and device
CN109697141B (en) Method and device for visual testing
CN109284328B (en) Relational data processing method, device, server and medium
CN111222739A (en) Task allocation method and task allocation system of nuclear power station
CN106547847B (en) Electronic reading material tracing and updating method and equipment

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