CN116737126A - Data processing method, device, electronic equipment and storage medium - Google Patents

Data processing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116737126A
CN116737126A CN202310559149.2A CN202310559149A CN116737126A CN 116737126 A CN116737126 A CN 116737126A CN 202310559149 A CN202310559149 A CN 202310559149A CN 116737126 A CN116737126 A CN 116737126A
Authority
CN
China
Prior art keywords
diagnosis
response
linked list
request
target
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
CN202310559149.2A
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.)
Beijing Rockwell Technology Co Ltd
Original Assignee
Beijing Rockwell 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 Beijing Rockwell Technology Co Ltd filed Critical Beijing Rockwell Technology Co Ltd
Priority to CN202310559149.2A priority Critical patent/CN116737126A/en
Publication of CN116737126A publication Critical patent/CN116737126A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/72Code refactoring

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The disclosure provides a data method, a data device, electronic equipment and a storage medium. The method comprises the following steps: receiving a diagnosis request sent by a client, wherein the diagnosis request is used for acquiring a corresponding diagnosis response; determining, in response to the diagnostic request, a single cyclic chain table (SCL) of the diagnostic request from at least one SCL of a data source, resulting in a target chain table; the target linked list comprises at least one diagnosis response corresponding to the diagnosis request; wherein, different diagnosis responses corresponding to the diagnosis requests are stored in different nodes of the target linked list; and executing the operation of pointing the pointer to the next node on the target linked list, and acquiring a target diagnosis response from the node pointed by the pointer. According to the scheme provided by the disclosure, when one-to-many response logic is realized, the development difficulty of a response model can be reduced, and the fault tolerance and the readability in the development process can be improved.

Description

Data processing method, device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of data processing, and in particular relates to a data processing method, a data processing device, electronic equipment and a storage medium.
Background
In development of the vehicle client software application, it is required to diagnose and upgrade the electronic control unit (ECU, electronic Control Unit) of the vehicle service end based on the transmission control protocol (TCP, transmission Control Protocol), for example, to perform the unified diagnostic service (UDS, unified Diagnostic Services) on the ECU using the diagnosis protocol (DOIP, diagnostic communication over Internet Protocol) based on the on-board ethernet. In order to realize diagnosis and upgrade of the ECU, a response model of the ECU can be built, and a data source of the response model is formulated according to an utilized communication protocol (such as DOIP), so that the response model is utilized to simulate the ECU to respond to the diagnosis request of the client. However, in the mainstream response model (for example, the mainstream bus transceiver response model), the processing relationship between the request and the response is mostly a one-to-one relationship, that is, for the same request of the client, the server only replies one response, and the response logic is simpler; when the processing relationship of one to many is faced, namely, when the same request of the client needs to reply to different responses, the server often creates a new counting and mapping relationship by re-referencing the original data source, in the process, response logic needing to be written is complex, development difficulty is high, and fault tolerance and readability of the written response logic are low.
Disclosure of Invention
In order to overcome the defects in the prior art, the present disclosure provides a data processing method, a data processing device, an electronic device and a storage medium.
According to a first aspect of the present disclosure, there is provided an information method, the method comprising:
receiving a diagnosis request sent by a client, wherein the diagnosis request is used for acquiring a corresponding diagnosis response;
determining, in response to the diagnostic request, an SCL of the diagnostic request from at least one single circularly linked list (SCL, single Circle Linked List) of the data source, resulting in a target linked list; the target linked list comprises at least one diagnosis response corresponding to the diagnosis request; wherein, different diagnosis responses corresponding to the diagnosis requests are stored in different nodes of the target linked list;
and executing the operation of pointing the pointer to the next node on the target linked list, and acquiring a target diagnosis response from the node pointed by the pointer.
In some embodiments of the disclosure, the performing the operation of pointing the pointer to the next node on the target linked list, and obtaining the target diagnostic response from the node pointed to by the pointer, includes:
judging whether the diagnosis request is sent for the first time;
and in the case that the diagnosis request is not sent for the first time, executing the operation of pointing the pointer to the next node on the target linked list, and acquiring a target diagnosis response from the node pointed by the pointer.
In some embodiments of the present disclosure, the method further comprises:
and under the condition that the diagnosis request is sent for the first time, acquiring a target diagnosis response from the head node of the target linked list.
In some embodiments of the present disclosure, the determining, in response to the diagnosis request, the SCL of the diagnosis request from at least one SCL of a data source, to obtain a target linked list, includes:
judging whether the data type of the diagnosis response is a linked list or not;
and under the condition that the data type of the diagnosis response is a linked list, determining SCL of the diagnosis request from at least one SCL of a data source in response to the diagnosis request, and obtaining a target linked list.
In some embodiments of the present disclosure, the method further comprises:
and under the condition that the data type of the diagnosis response is not a linked list, responding to the diagnosis request, and directly acquiring a target diagnosis response corresponding to the diagnosis request from a data source.
In some embodiments of the disclosure, the determining whether the data type of the diagnostic response is a linked list includes:
acquiring a key value pair of the diagnosis request in the data source; a key in the key-value pair representing the diagnostic request, a value in the key-value pair representing the diagnostic response;
Judging whether the data type of the median value of the key value pair is a preset type or not;
determining that the data type of the diagnostic response is a linked list if the data type of the value is a preset type;
and in the case that the data type of the value is not the preset type, determining that the data type of the diagnosis response is not a linked list.
In some embodiments of the present disclosure, the method further comprises:
and storing all diagnostic responses corresponding to the diagnostic requests to different nodes according to a preset sequence to obtain the target linked list.
According to a second aspect of the present disclosure, there is provided a data processing apparatus, the apparatus comprising:
the receiving module is used for receiving a diagnosis request sent by the client, and the diagnosis request is used for acquiring a corresponding diagnosis response;
the response module is used for responding to the diagnosis request, determining SCL of the diagnosis request from at least one SCL of a data source and obtaining a target linked list; the target linked list comprises at least one diagnosis response corresponding to the diagnosis request; wherein, different diagnosis responses corresponding to the diagnosis requests are stored in different nodes of the target linked list;
a processing module for executing the operation of pointing the pointer to the next node on the target linked list and obtaining the target diagnosis response from the node pointed by the pointer
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of the preceding first aspect.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of the first aspect described above.
The data processing method, the data processing device, the electronic equipment and the storage medium are used for receiving a diagnosis request sent by a client, wherein the diagnosis request is used for acquiring a corresponding diagnosis response; responding to the diagnosis request, determining SCL of the diagnosis request from at least one unidirectional circular chain table SCL of a data source, and obtaining a target chain table; the target linked list comprises at least one diagnosis response corresponding to the diagnosis request; wherein, different diagnosis responses corresponding to the diagnosis requests are stored in different nodes of the target linked list; and executing the operation of pointing the pointer to the next node on the target linked list, and acquiring a target diagnosis response from the node pointed by the pointer. According to the scheme provided by the disclosure, different response data corresponding to the diagnosis request are stored in different nodes of the SCL, when the response data are acquired each time, the operation of pointing the pointer to the next node is executed on the SCL, and then the response data are acquired from the nodes pointed by the pointer, so that the response data can be sequentially acquired from the different nodes, a pair of response logics with multiprocessing relations is realized, and new counting and mapping relations are not required to be re-created by writing complex response logics, so that the development difficulty of a response model can be reduced, and the fault tolerance and the readability in the development process are improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of a process flow of diagnostic request data in the related art;
FIG. 2 is a flow chart of a data processing method according to an embodiment of the disclosure;
FIG. 3 is a flowchart illustrating another data processing method according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a structure of a list in the related art;
fig. 5 is a schematic diagram of an SCL structure in a data processing method according to an embodiment of the disclosure;
FIG. 6 is a block diagram schematically illustrating a structure of a data processing apparatus according to an embodiment of the present disclosure;
fig. 7 is a block diagram illustrating a schematic structure of an example electronic device 700 provided by an embodiment of the disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Data processing methods, apparatuses, electronic devices, and storage media of embodiments of the present disclosure are described below with reference to the accompanying drawings.
The existing ECU response model can simulate the response of the ECU to the diagnosis request reply sent by the client, but the response logic is simpler, and only one-to-one relation of single request and single response can be processed. Illustratively, as shown in FIG. 1, the requests and response relationships contained in the data sources are stored by way of key-value pairs, where the key of each key-value pair ("22 f193" etc.) represents the request data and the value of each key-value pair ("62 f1930105" etc.) represents the response data for the corresponding request; when the DOIP server receives a request sent by the DOIP client, a corresponding key value pair is found from the data source according to the request content 22f195, the value 62f1950010 of the key value pair, namely a response corresponding to the request 22f195, is obtained, and the obtained value is sent to the DOIP client as a response. When facing a pair of multiprocessing relations of single request multi-response, the original data source needs to be re-referenced by writing complex response logic so as to create a new counting and mapping relation, so that the development difficulty is high, and the fault tolerance and the readability are low.
In order to solve the problems in the related art, in the embodiments of the present disclosure, different response data corresponding to a diagnosis request are stored in different nodes of an SCL, and when each time response data is acquired, an operation of pointing a pointer to a next node is performed on the SCL, and then the response data is acquired from the node pointed by the pointer, so that the response data can be sequentially acquired from different nodes, a pair of response logics with multiple processing relationships is implemented, and since a new count and mapping relationship do not need to be re-created by writing complex response logics, development difficulty of a response model can be reduced, and fault tolerance and readability in a development process can be improved.
Fig. 2 is a flow chart of a data processing method provided by an embodiment of the present disclosure, which is applied to a server, and in particular, may be applied to a server device capable of running a response model. As shown in fig. 2, the method includes:
step 201: and receiving a diagnosis request sent by the client, wherein the diagnosis request is used for acquiring a corresponding diagnosis response.
In an embodiment, the diagnostic request and the corresponding diagnostic response may be in a one-to-one relationship, i.e., a single request corresponds to a single response, or the diagnostic request and the diagnostic response may be in a one-to-many relationship, i.e., a single request corresponds to multiple responses.
Step 202: responding to the diagnosis request, determining SCL of the diagnosis request from at least one SCL of a data source, and obtaining a target linked list; the target linked list comprises at least one diagnosis response corresponding to the diagnosis request; wherein, different diagnosis responses corresponding to the diagnosis requests are stored in different nodes of the target linked list.
In some embodiments, the target linked list includes at least one diagnostic response corresponding to the diagnostic request, where the target linked list stores at least one diagnostic response data corresponding to the diagnostic request, and different diagnostic response data of the same diagnostic request is stored on different nodes of the SCL corresponding to the diagnostic request.
In an embodiment, the diagnostic response may be stored in the data source by means of characters when the diagnostic request is in a one-to-one processing relationship with the corresponding diagnostic response, and the diagnostic response may be stored in the data source by means of SCL when the diagnostic request is in a one-to-many processing relationship with the corresponding diagnostic response; after receiving a diagnosis request sent by a client, the data type of a corresponding diagnosis response can be judged first, namely whether the diagnosis response is stored in a linked list mode or not; when the data type of the diagnosis response is a linked list, the acquisition mode of the target diagnosis response is as follows: firstly, responding to the diagnosis request, determining SCL of the diagnosis request from at least one SCL of a data source to obtain a target linked list, and then obtaining a target diagnosis response from the target linked list; when the data type of the diagnosis response is not a linked list, the acquisition mode of the target diagnosis response is as follows: and directly acquiring a target diagnosis response from the data source.
It should be noted that the correspondence between the diagnostic request and the diagnostic response may be referred to as an element, and each element may be stored in the data source in a key-value pair, where a key in the key-value pair represents the diagnostic request and a value in the key-value pair represents the corresponding diagnostic response.
In some embodiments, to distinguish between different storage modes, that is, to distinguish between diagnostic responses stored in a linked list manner and diagnostic responses not stored in a linked list manner, different data types may be set for key value pair values for different storage modes, so that after the diagnostic request is received, a corresponding key value pair may be determined according to the content of the diagnostic request, and a storage mode of the diagnostic response may be determined according to a data type of a median value of the corresponding key value pair, so as to determine how to obtain the diagnostic response according to different storage modes.
It should be noted that the requests may be in a one-to-one correspondence with SCLs in the data source, each SCL having stored therein all diagnostic responses to the corresponding request; as each SCL is constructed, the requested diagnostic responses may be stored in a preset order in different nodes of one SCL.
Step 203: and executing the operation of pointing the pointer to the next node on the target linked list, and acquiring a target diagnosis response from the node pointed by the pointer.
It should be noted that, in the process of acquiring the diagnostic response from the target linked list is a cyclic process, that is, according to the node sequence of the target linked list, the corresponding diagnostic response is acquired from each node in turn; when the client side sends a diagnosis request for the first time, namely the client side requests to acquire a diagnosis response for the first time, the head node of the target linked list is a cyclic initial bit, and the diagnosis response stored in the initial bit of the target linked list, namely the diagnosis response stored in the head node of the target linked list, is acquired; for the diagnosis request sent after the first sending, a next operation may be performed, that is, an operation of pointing the pointer to the next node is performed, so that the current pointer moves to the next node, so as to implement cyclic acquisition of data in different nodes.
In summary, according to the data processing method provided by the embodiment of the present disclosure, different response data corresponding to a diagnosis request are stored in different nodes of an SCL, and when each response data is acquired, an operation of pointing a pointer to a next node is performed on the SCL, and then the response data is acquired from the node pointed by the pointer, so that the response data can be sequentially acquired from different nodes, a pair of response logics with multiple processing relationships is implemented, and since a new count and mapping relationship does not need to be recreated by writing a complex response logic, development difficulty of a response model can be reduced, and fault tolerance and readability in a development process can be improved.
Fig. 3 is a flowchart of another data processing method provided in an embodiment of the present disclosure, which is applied to a server, and may specifically be applied to a server device capable of running a response model. As shown in fig. 3, the method may include:
step 301: and receiving a diagnosis request sent by the client, wherein the diagnosis request is used for acquiring a corresponding diagnosis response.
In an embodiment, the diagnostic request and the corresponding diagnostic response may be in a one-to-one relationship, i.e., a single request corresponds to a single response, or the diagnostic request and the diagnostic response may be in a one-to-many relationship, i.e., a single request corresponds to multiple responses.
It should be noted that the diagnostic request sent by the client may be received based on a TCP communication protocol; for example, in an application scenario in which a vehicle ECU performs UDS diagnosis and upgrade based on the DOIP protocol, the DOIP server as shown in fig. 1 may receive a diagnosis request sent by the DOIP client based on the DOIP protocol.
Step 302: and judging whether the data type of the diagnosis response is a linked list or not.
It should be noted that, the lower layer of application layer protocols such as DOIP used in the embodiments of the present disclosure is essentially a transmission control protocol/internet protocol (TCP/IP, transmission Control Protocol/Internet Protocol), which belongs to a protocol that a client side and a server side implement duplex communication, so a language capable of providing a well-packaged and mature library based on the TCP protocol may be adopted when constructing a response model; in the embodiments of the present disclosure, python may be used to implement the response model.
It should be noted that Python is a high-level computer programming language, and built-in data types (which may also be referred to as data structures) include integers (int), strings (string), dictionaries (direct), lists (list), tuples (tuple), etc., and each data type may be regarded as a container for storing data.
In one embodiment, when storing the diagnostic responses to the data source, different storage modes may be used for diagnostic responses of different processing relationships; specifically, when the diagnostic request and the diagnostic response are in a one-to-one processing relationship, i.e., a single diagnostic request corresponds to a single diagnostic response, the diagnostic response may be deposited in a string data type; when the processing relationship between the diagnosis request and the diagnosis response is one-to-many, that is, a single diagnosis request corresponds to a plurality of diagnosis responses, the diagnosis responses can be stored in an SCL mode; on the basis, after the diagnosis request is received, the storage mode of the corresponding diagnosis response in the data source, that is, whether the diagnosis response is stored in a list mode or a SCL mode, can be determined according to the processing relation between the diagnosis request and the diagnosis response, that is, whether the diagnosis request and the diagnosis response are in a one-to-one processing relation or a one-to-multiple processing relation, so as to determine how to reply to the diagnosis response.
In actual application, the request and response data sets can be stored in a subject mode, and each element in the subject consists of unordered key value pairs and is used for storing the corresponding relation between the request and the response; in practical application, different key value pair formats can be set for different processing relationships so as to distinguish different diagnosis response types.
Based on this, in an embodiment, the determining whether the data type of the diagnostic response is a linked list may specifically include:
judging whether the data type of the median value of the key value pair is a preset type or not;
determining that the data type of the diagnostic response is a linked list if the data type of the value is a preset type;
and in the case that the data type of the value is not the preset type, determining that the data type of the diagnosis response is not a linked list.
In an embodiment, the key-value pair may be represented in the form of a key-value, wherein the key represents a key in the key-value pair, i.e. the diagnostic request, and the value represents a value in the key-value pair, i.e. the diagnostic response; for diagnostic responses in different processing relationships, the corresponding value data types are also different, for example, for a one-to-one processing relationship, the key value pair may be denoted as "22": "62", wherein the value data type is "62", for a pair of multiprocessing relationships, the key value pair may be denoted as "22": SCL ([ '62') ], wherein the value data type is SCL ([ '62') ], and in the embodiment of the present disclosure, by utilizing the value of different data types, the diagnostic responses of different data types are distinguished, so that it is possible to decide how to obtain the diagnostic response according to the diagnostic response data type.
In an embodiment, the preset type may be a preset value data type corresponding to a diagnostic response stored in the form of SCL, for example, SCL ([ '62' ].
It should be noted that, although the list data type may be regarded as a variable container, it can support operations of adding, deleting, modifying and checking data, including indexing, slicing, adding, traversing and the like, so that a plurality of character strings (i.e. a plurality of values of diagnostic responses) can be stored, when the values are taken in the list by using the response model, an index, i.e. a number representing the position of the data in the list, needs to be obtained in advance, so that it can be determined from which position in the list the value is taken according to the index, for example, the index is n representing the n+1st data in the list; however, the list data structure in the related art cannot provide an index, so that it is unclear which diagnostic response should be returned to the server side running the response model, or it is necessary to determine which diagnostic response should be returned through complex arithmetic logic.
Illustratively, in the data source for storing the diagnosis response in the list data type, the corresponding relation between the diagnosis request and the diagnosis response is expressed in the form of key: value, namely, the content of the value is replied according to the content in the received key; wherein, the value is a single character type, that is, for the received key, no matter how many times the key is received, the value content is replied after each time of the reception; when the software is upgraded, the DOIP client side sends the same diagnosis request 22f195 to obtain the current software version twice before and after the upgrade, and the DOIP server side needs to simulate different responses, the first response is executed before the software upgrade, the response content is 62f1950010, the current software version is 0010, and the current software version needs to be updated; the second reply is executed after the software is upgraded, the reply content is 62f1950020, the software version after the upgrade is finished is 0020, the version is consistent with the upgrade package, the upgrade is successful, if the list data type is used for storing the diagnosis response, the second reply is still replied to 0010, and the upgrade is unsuccessful, and the test simulation scene of the response cannot be satisfied. To meet the test simulation scenario of response, a response logic for responding based on count can be designed, specifically, when initializing list, a global initial response count of 0 is allocated to each diagnosis request; when the diagnosis request is received and the response type is list, then the value is taken according to a counting index (0), the counting index (0) represents the first response of the reply list, and the response count of the request is increased by one each time the diagnosis request is received later; when the response count number is greater than the number of elements in the current list, judging and designing new cyclic integer division logic, namely resetting the count index to (0) after judging that the response count can be divided, and restarting the response count; however, the response logic for responding based on counting is complex to write and high in development difficulty, and meanwhile, a new technology and a mapping relation need to be created by referring to a data source, so that the written response logic is low in fault tolerance and poor in readability.
In the embodiment of the disclosure, the diagnostic response is stored by using the SCL data structure, and when the diagnostic request is received each time, next is called to enable the current pointer to move to the next node, so that the diagnostic response can be sequentially obtained from different nodes of the SCL, and one-to-many response logic is realized.
In an embodiment, all diagnostic responses corresponding to the diagnostic request may be stored in different nodes according to a preset sequence, so as to obtain the target linked list, that is, the target linked list is created.
Specifically, when the target linked list is created, a node class may be created first, that is, a data structure of a node is created; the node class has the attribute of data and next, wherein the data represents the value of the node, namely the diagnosis response stored in the node, and the next represents the pointer of the node to the next node; then, initializing the existing list according to the created node class to obtain an SCL class; wherein, the SCL class has a head attribute, the head represents a head node in the SCL, and the next of a tail node in the SCL points to the head; the SCL class supports two operations, namely an add_node and a form, wherein the add_node is used for adding a new node into the SCL, and the form is used for traversing data in a list and executing the add_node operation; illustratively, a form operation is performed on the list shown in FIG. 4, resulting in an SCL data structure as shown in FIG. 5, according to the order in which the diagnostic responses are stored in the list.
It should be noted that, when performing the add_node operation, it may be first determined whether the SCL is empty, and if the SCL is empty, the node is directly added at the head position; if SCL is not null, locating the next node as head circularly, directing the next of the node to be added, and directing the next of the node to be added to the head.
In an embodiment, in order to enable the response model of the server to directly obtain related variables and variable data types in the data source, no additional data conversion is required, and a storage format of data in the data source may use Python.
Step 303: and under the condition that the data type of the diagnosis response is not a linked list, responding to the diagnosis request, and directly acquiring a target diagnosis response corresponding to the diagnosis request from a data source.
Illustratively, when the value in the key pair corresponding to the diagnostic request is denoted as [ "62f1950010" ], it indicates that the diagnostic response is stored in string form, i.e., the data type of the diagnostic response is string, at which time "62f1950010" is directly obtained from the data source.
Step 304: and under the condition that the data type of the diagnosis response is a linked list, determining SCL of the diagnosis request from at least one SCL of a data source in response to the diagnosis request, and obtaining a target linked list.
Illustratively, when the value in the key pair corresponding to the diagnostic request is represented as SCL ([ "62f1950010", "62f1950020" ]), it is represented that the diagnostic response is stored in the form of SCL, i.e., the data type of the diagnostic response is a linked list, at which time the corresponding SCL, i.e., the target linked list, is obtained.
Step 305: it is determined whether the diagnostic request is a first transmission.
It should be noted that the process of obtaining diagnostic responses from different nodes of an SCL is a cyclic process, wherein the head node of the SCL is the initial bit of the cycle; when the client side sends a diagnosis request for the first time, namely the client side requests to acquire a diagnosis response for the first time, the diagnosis response stored in the initial bit of the target linked list, namely the diagnosis response stored in the head node of the target linked list, is acquired; in the embodiment of the disclosure, the acquisition mode of the diagnosis response can be determined by judging whether the diagnosis request is sent for the first time.
Step 306: and under the condition that the diagnosis request is sent for the first time, acquiring a target diagnosis response from the head node of the target linked list.
In an embodiment, it may be determined whether the current pointer points to a head node, and if the current pointer points to the head node, determining that the diagnostic request is a first transmitted request, and acquiring a target diagnostic response from the head node; correspondingly, in the event that the current pointer does not point to the head node, it is determined that the diagnostic request is not the first transmitted request.
Step 307: and in the case that the diagnosis request is not sent for the first time, executing the operation of pointing the pointer to the next node on the target linked list, and acquiring a target diagnosis response from the node pointed by the pointer.
In an embodiment, for the diagnostic request sent after the first sending, a next operation may be performed, that is, an operation that the pointer points to the next node is performed, so that the current pointer moves to the next node to obtain the diagnostic response stored by the next node, so that when the diagnostic response needs to be obtained each time, only the next operation is performed, and the diagnostic response of the node pointed by the current pointer is obtained, the data in different nodes can be circularly obtained, the current node position does not need to be concerned, complex response logic does not need to be written, the development difficulty is lower, and the flexibility is higher.
In summary, according to the data processing method provided by the embodiment of the present disclosure, different response data corresponding to a diagnosis request are stored in different nodes of an SCL, and when each response data is acquired, an operation of pointing a pointer to a next node is performed on the SCL, and then the response data is acquired from the node pointed by the pointer, so that the response data can be sequentially acquired from different nodes, a pair of response logics with multiple processing relationships is implemented, and since a new count and mapping relationship does not need to be recreated by writing a complex response logic, development difficulty of a response model can be reduced, and fault tolerance and readability in a development process can be improved.
Corresponding to the data processing method, the invention also provides a data processing device. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, details not disclosed in the device embodiment may refer to the above-mentioned method embodiment, and details are not described in detail in the present invention.
Fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present disclosure, as shown in fig. 6, where the apparatus includes:
a receiving module 601, configured to receive a diagnostic request sent by a client, where the diagnostic request is used to obtain a corresponding diagnostic response;
a response module 602, configured to determine, in response to the diagnosis request, an SCL of the diagnosis request from at least one SCL of a data source, and obtain a target linked list; the target linked list comprises at least one diagnosis response corresponding to the diagnosis request; wherein, different diagnosis responses corresponding to the diagnosis requests are stored in different nodes of the target linked list;
and the processing module 603 is configured to perform an operation of pointing the pointer to the next node on the target linked list, and acquire a target diagnosis response from the node pointed by the pointer.
In an embodiment, before performing an operation of pointing the pointer to the next node on the target linked list and acquiring the target diagnostic response from the node pointed to by the pointer, the processing module 603 may be further configured to:
Judging whether the diagnosis request is sent for the first time;
and in the case that the diagnosis request is not sent for the first time, executing the operation of pointing the pointer to the next node on the target linked list, and acquiring a target diagnosis response from the node pointed by the pointer.
In an embodiment, the processing module 603 may be further configured to:
and under the condition that the diagnosis request is sent for the first time, acquiring a target diagnosis response from the head node of the target linked list.
In an embodiment, the response module 602 may specifically be configured to:
judging whether the data type of the diagnosis response is a linked list or not;
and under the condition that the data type of the diagnosis response is a linked list, determining SCL of the diagnosis request from at least one SCL of a data source in response to the diagnosis request, and obtaining a target linked list.
In an embodiment, the response module 602 may be further configured to:
and under the condition that the data type of the diagnosis response is not a linked list, responding to the diagnosis request, and directly acquiring a target diagnosis response corresponding to the diagnosis request from a data source.
In one embodiment, the response module 602 is specifically configured to:
acquiring a key value pair of the diagnosis request in the data source; a key in the key-value pair representing the diagnostic request, a value in the key-value pair representing the diagnostic response;
Judging whether the data type of the median value of the key value pair is a preset type or not;
determining that the data type of the diagnostic response is a linked list if the data type of the value is a preset type;
and in the case that the data type of the value is not the preset type, determining that the data type of the diagnosis response is not a linked list.
In an embodiment, the apparatus may further include:
and the generation module is used for storing all diagnostic responses corresponding to the diagnostic requests into different nodes according to a preset sequence to obtain the target linked list.
It should be noted that the foregoing explanation of the method embodiment is also applicable to the apparatus of this embodiment, and the principle is the same, and this embodiment is not limited thereto.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 7 illustrates a schematic block diagram of an example electronic device 700 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the apparatus 700 includes a computing unit 701 that can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 702 or a computer program loaded from a storage unit 708 into a RAM (Random Access Memory ) 703. In the RAM 703, various programs and data required for the operation of the device 700 may also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An I/O (Input/Output) interface 705 is also connected to bus 704.
Various components in device 700 are connected to I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, etc.; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, an optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 701 include, but are not limited to, a CPU (Central Processing Unit ), a GPU (Graphic Processing Units, graphics processing unit), various dedicated AI (Artificial Intelligence ) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor ), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the respective methods and processes described above, such as a data processing method. For example, in some embodiments, the data processing method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 700 via ROM 702 and/or communication unit 709. When the computer program is loaded into RAM 703 and executed by computing unit 701, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the aforementioned data processing methods by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit System, FPGA (Field Programmable Gate Array ), ASIC (Application-Specific Integrated Circuit, application-specific integrated circuit), ASSP (Application Specific Standard Product, special-purpose standard product), SOC (System On Chip ), CPLD (Complex Programmable Logic Device, complex programmable logic device), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory, erasable programmable read-Only Memory) or flash Memory, an optical fiber, a CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display ) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network ), WAN (Wide Area Network, wide area network), internet and blockchain networks.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be noted, among others, that artificial intelligence is the discipline of studying the process of making a computer simulate certain thinking and intelligent behavior (e.g., learning, reasoning, thinking, planning, etc.) of a person, both hardware-level and software-level techniques. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning/deep learning technology, a big data processing technology, a knowledge graph technology and the like.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1. A method of data processing, comprising:
receiving a diagnosis request sent by a client, wherein the diagnosis request is used for acquiring a corresponding diagnosis response;
responding to the diagnosis request, determining SCL of the diagnosis request from at least one unidirectional circular chain table SCL of a data source, and obtaining a target chain table; the target linked list comprises at least one diagnosis response corresponding to the diagnosis request, wherein different diagnosis responses corresponding to the diagnosis request are stored in different nodes of the target linked list;
and executing the operation of pointing the pointer to the next node on the target linked list, and acquiring a target diagnosis response from the node pointed by the pointer.
2. The method of claim 1, wherein performing pointer-to-next node operations on the target linked list and obtaining a target diagnostic response from the node to which the pointer points comprises:
judging whether the diagnosis request is sent for the first time;
and in the case that the diagnosis request is not sent for the first time, executing the operation of pointing the pointer to the next node on the target linked list, and acquiring a target diagnosis response from the node pointed by the pointer.
3. The method according to claim 2, wherein the method further comprises:
And under the condition that the diagnosis request is sent for the first time, acquiring a target diagnosis response from the head node of the target linked list.
4. A method according to any one of claims 1 to 3, wherein said determining, in response to said diagnostic request, an SCL of said diagnostic request from at least one SCL of a data source, results in a target linked list, comprising:
judging whether the data type of the diagnosis response is a linked list or not;
and under the condition that the data type of the diagnosis response is a linked list, determining SCL of the diagnosis request from at least one SCL of a data source in response to the diagnosis request, and obtaining a target linked list.
5. The method of claim 4, wherein said determining whether the data type of the diagnostic response is a linked list comprises:
acquiring a key value pair of the diagnosis request in the data source; a key in the key-value pair representing the diagnostic request, a value in the key-value pair representing the diagnostic response;
judging whether the data type of the median value of the key value pair is a preset type or not;
determining that the data type of the diagnostic response is a linked list if the data type of the value is a preset type;
And in the case that the data type of the value is not the preset type, determining that the data type of the diagnosis response is not a linked list.
6. A method according to any one of claims 1 to 3, further comprising:
and storing all diagnostic responses corresponding to the diagnostic requests to different nodes according to a preset sequence to obtain the target linked list.
7. A data processing apparatus, comprising:
the receiving module is used for receiving a diagnosis request sent by the client, and the diagnosis request is used for acquiring a corresponding diagnosis response;
the response module is used for responding to the diagnosis request, determining SCL of the diagnosis request from at least one SCL of a data source and obtaining a target linked list; the target linked list comprises at least one diagnosis response corresponding to the diagnosis request; wherein, different diagnosis responses corresponding to the diagnosis requests are stored in different nodes of the target linked list;
and the processing module is used for executing the operation of pointing the pointer to the next node on the target linked list and acquiring a target diagnosis response from the node pointed by the pointer.
8. An electronic device, comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.
9. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1 to 7.
10. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
CN202310559149.2A 2023-05-17 2023-05-17 Data processing method, device, electronic equipment and storage medium Pending CN116737126A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310559149.2A CN116737126A (en) 2023-05-17 2023-05-17 Data processing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310559149.2A CN116737126A (en) 2023-05-17 2023-05-17 Data processing method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116737126A true CN116737126A (en) 2023-09-12

Family

ID=87916024

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310559149.2A Pending CN116737126A (en) 2023-05-17 2023-05-17 Data processing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116737126A (en)

Similar Documents

Publication Publication Date Title
US11928432B2 (en) Multi-modal pre-training model acquisition method, electronic device and storage medium
CN113568860B (en) Deep learning-based multi-machine cluster topology mapping method and device and program product
CN113364877B (en) Data processing method, device, electronic equipment and medium
WO2016014333A1 (en) Distributing and processing streams over one or more networks for on-the-fly schema evolution
US20210365406A1 (en) Method and apparatus for processing snapshot, device, medium and product
CN113868273B (en) Metadata snapshot method and device
CN113344074B (en) Model training method, device, equipment and storage medium
CN114490723A (en) Unified retrieval method, device, electronic equipment and storage medium
CN115186738B (en) Model training method, device and storage medium
CN112860811B (en) Method and device for determining data blood relationship, electronic equipment and storage medium
CN111290714A (en) Data reading method and device
CN116737126A (en) Data processing method, device, electronic equipment and storage medium
CN113127357B (en) Unit test method, apparatus, device, storage medium, and program product
CN107368377A (en) Network request processing method and processing device in a kind of Android application programs
CN116126478B (en) Method, device, equipment and medium for generating interface control document
CN114500443B (en) Message pushing method, device, system, electronic equipment and storage medium
CN114780021B (en) Copy repairing method and device, electronic equipment and storage medium
CN112732821B (en) Data storage method, device and equipment and storage medium
CN115357641A (en) Data query method and device, electronic equipment and storage medium
CN115794742A (en) File path data processing method, device, equipment and storage medium
CN114650222A (en) Parameter configuration method and device, electronic equipment and storage medium
CN118012897A (en) Heterogeneous database grammar conversion method, device, equipment and storage medium
CN115983281A (en) Information extraction and model acquisition method and device, electronic equipment and storage medium
CN117827835A (en) Database management method, device, equipment and medium
CN115730681A (en) Model training method, device, equipment and storage medium

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