Digital networking data space access system based on DOIP (Document Object Internet Protocol) caching mechanism
By introducing a cache mechanism in the DOIP protocol, using the cache information in the access request to cache the access data, the performance bottleneck of the DOIP protocol during repeated requests for hotspot data and calls across data spaces is solved, and the system's access performance and efficiency are improved.
Patent Information
- Application Number
- CN202510720927.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-30
AI Technical Summary
The DOIP protocol lacks a cache mechanism when facing repeated hot data requests and large-scale cross-data space calls, resulting in increased access latency and increased system load, limiting the protocol's scalability and responsiveness in highly concurrent and data-intensive applications.
The cache mechanism is introduced in the DOIP protocol. By encapsulating cache information in the access request, the access request sent by the client includes cache information. The gateway and switch cache access data based on the cache information, avoiding the need to obtain data from the warehouse every time you access.
Improve the access performance of the system, and cache access data during the access process, reduce dependence on the warehouse and improve the access efficiency and performance of the system.
Smart Images

Figure CN120455542A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital networking technology, and in particular to a digital networking data space access system based on a DOIP protocol cache mechanism. Background Art
[0002] The Digital Internet is a virtual data network based on a digital object architecture. It uses an open software architecture and standardized protocols to efficiently connect various data platforms and systems. The Digital Object Interface Protocol (DOIP) is one of these standardized protocols, used for digital object management and cross-dataspace interaction. Its core feature is a data-centric approach, using unique digital object identifiers (DOIDs) instead of traditional IP addresses for requests and responses.
[0003] However, due to the lack of a caching mechanism, the DOIP protocol faces significant performance bottlenecks in typical scenarios such as repeated requests for hot data and large-scale cross-data space calls. Without a caching mechanism, each data request must go through the entire digital object interaction process, resulting in increased access latency and increased system load, severely limiting the protocol's scalability and responsiveness in high-concurrency, data-intensive applications. Summary of the Invention
[0004] In view of the above problems, an embodiment of the present application provides a data space access system for Internet of Things based on the DOIP protocol cache mechanism, so as to overcome the above problems or at least partially solve the above problems.
[0005] The embodiment of the present application provides a data space access system for a digital network based on a DOIP protocol cache mechanism, comprising: a client, a first data space, and a second data space, wherein the first data space comprises a first gateway, a first switch, and a first warehouse, and the second data space comprises a second gateway, a second switch, and a second warehouse; The client is configured to send a first format access request encapsulating cache information and a target identifier to the first gateway, wherein the target identifier is used to indicate access data, and the cache information represents an acquisition and cache method of the access data; The first gateway is configured to, if the target identifier belongs to the first data space, obtain the access data from its own cache or the first repository according to the first-format access request and perform a cache operation on the access data; and, if the target identifier does not belong to the first data space, convert the first-format access request into a second-format access request encapsulating cache information and the target identifier, and hand the request over to the first switch; The first switch is configured to determine a second data space to which the target identifier belongs, and send the second format access request to a second switch in the second data space; The second switch is configured to obtain access data from its own cache according to the second format access request, or to transfer the second format access request to the second gateway; The second gateway is used to obtain access data from its own cache or from the second warehouse according to the second format access request, and perform a cache operation on the access data.
[0006] Optionally, the cache header portion of the first format access request encapsulates a cache message, and the cache message in the first format access request includes at least one of the following fields: a first field for indicating whether to use access data in the cache, a second field for indicating whether the obtained access data needs to be cached, a third field for indicating a duration for which the access data is allowed to be cached, and a fourth field for indicating an update frequency of the access data in the cache; The second format access request has a segmented structure, and the cache header between the content length and the payload of the second format access request encapsulates a cache message. The cache information in the second format access request includes at least one of the following fields: a fifth field for indicating whether to use the access data in the cache, a sixth field for indicating whether the obtained access data needs to be cached, and a seventh field for indicating the length of time the access data is allowed to be cached.
[0007] Optionally, the cache message in the first-format access request includes a first field for indicating whether to use access data in the cache; and the first gateway obtains the access data from its own cache or the first warehouse according to the first-format access request, including: The first gateway determines whether to use access data in the cache according to the first field of the cache information in the access request in the first format; The first gateway obtains the access data from its own cache when determining to use the access data in the cache and the access data exists in its own cache; When the first gateway determines to use the access data in the cache and the access data does not exist in its own cache, or when the first gateway determines not to use the access data in the cache, the first gateway sends the first format access request to the first warehouse and obtains the access data from the first warehouse; The first gateway sends the access data to the client.
[0008] Optionally, the cache message in the first format access request further includes a second field for indicating whether the obtained access data needs to be cached, a third field for indicating a duration for which the access data is allowed to be cached, and a fourth field for indicating an update frequency of the access data in the cache; the first gateway performing a cache operation on the access data includes: After obtaining the access data from the first warehouse, the first gateway determines whether the access data needs to be cached according to the second field of the cache message in the first format access request; When the first gateway determines that the access data needs to be cached, the first gateway adds the access data to the cache and sets the validity period of the access data in the cache according to the third field and the fourth field of the cache message in the first format access request.
[0009] Optionally, the cache information in the second format access request includes a fifth field for indicating whether to use the access data in the cache, a sixth field for indicating whether the obtained access data needs to be cached, and a seventh field for indicating the duration for which the access data is allowed to be cached; The first gateway converts the first format access request into a second format access request encapsulating cache information and a target identifier, including: The first gateway maps the first field to the fifth field, the second field to the sixth field, and the third field to the seventh field to construct a cache header; and packages the first format access request and adds it as an envelope header, and obtains the second format access request based on the cache header and the envelope header.
[0010] Optionally, the second switch includes a first hash table, the first hash table being used to store the identifier and the access data corresponding to the identifier; the cache information in the second format access request includes a fifth field for indicating whether to use the access data in the cache; The second switch is configured to obtain access data from its own cache according to the second format access request, or transfer the second format access request to the second gateway, including: The second switch determines whether to use access data in the cache according to the fifth field of the cache message in the second format access request; When determining to use the access data in the cache, the second switch retrieves the corresponding access data from the first hash table according to the target identifier in the second format access request, and sends the retrieved access data to the client through the first switch and the first gateway; The second switch transfers the second format access request to the second gateway if it is determined that the access data in the cache is not used and if corresponding access data is not retrieved from the first hash table according to the target identifier in the second format access request.
[0011] Optionally, the second gateway is configured to obtain access data from its own cache or from the second warehouse according to the second format access request, including: The second gateway parses the second format access request into a first format access request, and determines whether to use access data in the cache according to the first field of the cache information in the first format access request; The second gateway obtains the access data from its own cache when determining to use the access data in the cache and the access data exists in its own cache; When the second gateway determines to use the access data in the cache and the access data does not exist in its own cache, or when the second gateway determines not to use the access data in the cache, the second gateway sends the first format access request to the second warehouse and obtains the access data from the second warehouse; The second gateway sends the access data to the client through the second switch, the first switch, and the first gateway in sequence.
[0012] Optionally, the second gateway performs a cache operation on the access data, including: After obtaining the access data from the second warehouse, the second gateway determines whether the access data needs to be cached according to the second field of the cache message in the first format access request; When determining that the access data needs to be cached, the second gateway adds the access data to the cache and sets the validity period of the access data in the cache according to the third field and the fourth field in the first format access request.
[0013] Optionally, the second switch includes a first hash table and a second hash table, the first hash table is used to store the identifier and the access data corresponding to the identifier, and the second hash table is used to store the access request in the second format; The second switch is further configured to, after receiving the access data fed back by the second gateway, search the second format access request in the second hash table, and determine whether the access data needs to be cached according to the sixth field of the cache information in the second format access request; When determining that the access data needs to be cached, the second switch adds the access data and the target identifier to the first hash table, and sets the validity period of the access data in the first hash table according to the seventh field of the cache information in the second format access request.
[0014] Optionally, the second gateway parses the second format access request into the first format access request, including: The second gateway extracts the cache information in the cache header of the second format access request into the message encapsulation, and adds the envelope header in the second format access request to the message encapsulation to obtain a message encapsulation result; The message encapsulation results are aggregated, and the fifth field of the cache information in the first format access request is mapped to the first field, the sixth field is mapped to the second field, and the seventh field is mapped to the third field to obtain a first format access request.
[0015] Optionally, the system further includes an identification resolution system, wherein the identification resolution system stores a correspondence between identifiers and data spaces; The first switch is configured to determine the second data space to which the target identifier belongs, including: The first switch queries the identity resolution system according to the target identifier to obtain the second data space to which the target identifier belongs.
[0016] The embodiments of the present application include the following advantages: In an embodiment of the present application, the first-format access request sent by a client when accessing data in a networked data space includes cache information. Therefore, during the data access process, the devices in the system (e.g., the first gateway and the second gateway) can cache the accessed data based on the cache information. When the client sends the first-format access request encapsulated with the cache information and the target identifier to the first gateway, if the accessed data belongs to the first data space, the first gateway can obtain the accessed data from its own cache based on the target identifier in the first-format access request, without having to access the warehouse of the first data space. If the accessed data does not belong to the first data space (i.e., cross-data space access), by converting the first-format access request into a second-format access request encapsulated with the cache information and the target identifier and forwarding it to the second data space to which the accessed data belongs, the accessed data can be obtained from the cache of the second switch or the second gateway in the second data space, without having to obtain the accessed data from the warehouse of the second space. In this way, the system introduces a cache mechanism to cache the accessed data during the access process, avoiding the need to obtain data from the warehouse for each access, thereby improving the access performance of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0018] Figure 1 This is a schematic diagram of a data space access system for Internet of Things based on a DOIP protocol caching mechanism provided by an embodiment of the present application; Figure 2 This is a structural diagram of two message formats of a DOIP protocol provided in an embodiment of the present application; Figure 3 This is a schematic diagram of a first gateway obtaining access data from its own cache, provided by an embodiment of the present application; Figure 4 This is a schematic diagram of a first gateway obtaining access data in a first warehouse provided by an embodiment of the present application; Figure 5 This is a schematic diagram of a specific process of a first gateway processing an access request in a first format provided by an embodiment of the present application; Figure 6 This is a schematic diagram of a second switch obtaining access data from its own cache, provided by an embodiment of the present application; Figure 7 This is a schematic diagram of a specific process of a second switch processing a second format access request provided by an embodiment of the present application; Figure 8 This is a schematic diagram of a second gateway obtaining access data from its own cache, provided by an embodiment of the present application; Figure 9 This is a schematic diagram of a second gateway obtaining access data in a first warehouse provided by an embodiment of the present application; Figure 10 This is a schematic diagram of a specific process of a second gateway processing a second format access request provided by an embodiment of the present application. DETAILED DESCRIPTION
[0019] To make the above-mentioned purposes, features, and advantages of this application more clearly understood, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of this application.
[0020] The DOIP protocol is a communication protocol for digital object management and cross-dataspace interaction. Its core feature is its data-centric nature, using unique digital object identifiers (DOIDs) instead of traditional IP addresses for requests and responses. This mechanism makes the DOIP protocol naturally suitable for implementing content-level caching mechanisms on network devices such as gateways and switches. Furthermore, the distribution of digital objects in data space exhibits stability and locality—objects are highly similar and difficult to migrate across space—which provides a favorable foundation for cache optimization. However, the current DOIP protocol does not natively support caching mechanisms, which limits the effective caching of digital objects in network devices and becomes a major bottleneck in system performance.
[0021] In order to overcome the limitations of related technologies, an embodiment of the present application provides a digital network data space access system based on the DOIP protocol caching mechanism. The method adds access information to the access request in the DOIP access to indicate the acquisition and caching method of the access data, thereby realizing the caching operation of the access data during the access process, avoiding the need to obtain data from the warehouse for each access, thereby improving the access performance of the system.
[0022] Reference Figure 1 As shown, Figure 1 This is a schematic diagram of a data space access system based on the DOIP protocol cache mechanism provided by an embodiment of the present application. Figure 1 As shown, the data space access system for the Internet of Things based on the DOIP protocol cache mechanism includes: a client, a first data space, and a second data space. The first data space includes a first gateway, a first switch, and a first warehouse. The second data space includes a second gateway, a second switch, and a second warehouse. The client is configured to send a first format access request encapsulating cache information and a target identifier to the first gateway, wherein the target identifier is used to indicate access data, and the cache information represents an acquisition and cache method of the access data; The first gateway is configured to, if the target identifier belongs to the first data space, obtain the access data from its own cache or the first repository according to the first-format access request and perform a cache operation on the access data; and, if the target identifier does not belong to the first data space, convert the first-format access request into a second-format access request encapsulating cache information and the target identifier, and hand the request over to the first switch; The first switch is configured to determine a second data space to which the target identifier belongs, and send the second format access request to a second switch in the second data space; The second switch is configured to obtain access data from its own cache according to the second format access request, or to transfer the second format access request to the second gateway; The second gateway is used to obtain access data from its own cache or from the second warehouse according to the second format access request, and perform a cache operation on the access data.
[0023] In the embodiment of the present application, the first format access request and the second format access request are two message format access requests in the DOIP protocol, wherein the first format access request is a message format access request for communication between the client and the gateway (for example, the first format access request can be DoipMessage), that is, the client will use the first format access request when accessing data (digital objects) in the data space of the Internet; the second format access request is a message format access request used across nodes (for example, the message format access request can be DOIPV3Message). Figure 2 As shown, Figure 2 (a) is a schematic diagram of the first format access request structure. Figure 2 (b) is a schematic diagram of the second format access request structure.
[0024] Both the first-format access request and the second-format access request encapsulate cache information, which characterizes how the access data is acquired and cached. Specifically, the cache information includes the following: a cache identifier uniquely identifying the association between the access request and the access data content, a generation cycle control parameter indicating the validity period of the cached data, and cache characteristics describing whether the cached content is shareable and requires consistency verification. During access, devices in the system (e.g., the first gateway and the second gateway) can cache the acquired access data based on the cache information.
[0025] The target identifier is used to indicate access data. Specifically, the access data is a digital object in the digital network, and the target identifier is the identifier of the digital object. When accessing, the target identifier can be used to locate the corresponding digital object (access data).
[0026] The Internet of Things (IoT) comprises different data spaces, including gateways, switches, and warehouses. Gateways serve as the entry point for data access and interconnection within data spaces, managing their respective data spaces and processing access requests from devices (e.g., clients, switches, and gateways). Switches, acting as intermediary nodes connecting multiple data spaces, are responsible for relaying and routing requests across these spaces. When a data space receives a request from another space, the request is first processed by the switch and then forwarded to the corresponding gateway. Conversely, if a local data space needs to access an external object, it must first submit the request to the switch, which performs identity resolution and routing. Warehouse users store the data within their data space, namely, digital objects.
[0027] It can be understood that the first data space and the second data space are different data spaces in the digital network. The data space that receives the first format access request sent by the client is called the first data space. If the target identifier in the first format access request does not belong to the first data space and cross-data space access is required, the data space to which the target identifier belongs is called the second data space.
[0028] When a client accesses data in a data space of a data network, it may send a first-format access request encapsulating cache information and a target identifier to the first gateway of the first data space of the data network. The first network interface card (NIC) may then determine whether the target identifier belongs to its own data space (the first data space). If the target identifier belongs to the first data space, it may retrieve the access data from its own cache or the first repository based on the first-format access request. In some embodiments, if the corresponding access data exists in the first gateway's cache, the first gateway may directly retrieve the access data from its own cache; if the corresponding access data does not exist in the first gateway's cache, the first gateway may retrieve the access data from the first repository.
[0029] If the target identifier does not belong to the first data space, the first gateway needs to convert the first-format access request into a second-format access request, which is then sent by the first switch to the second data space to which the target identifier belongs, to retrieve the access data from the second data space, thus enabling cross-data space data access. In some embodiments, after receiving the second-format access request, if the second switch's cache contains access data corresponding to the target identifier, the second switch may retrieve the corresponding access data from its own cache. Otherwise, the second-format access request is forwarded to the second gateway, which may retrieve the access data from its own cache or from a second repository.
[0030] Through the above implementation process, the first format access request sent by the client when accessing the data in the networked data space contains cache information, so during the data access process, the devices in the system can cache the access data obtained according to the cache information. When the client sends the first format access request encapsulated with cache information and target identifier to the first gateway, if the access data belongs to the first data space, the first gateway can obtain the access data from its own cache according to the target identifier in the first format access request, without having to access the warehouse of the first data space; if the access data does not belong to the first data space, by converting the first format access request into a second format access request encapsulated with cache information and target identifier and forwarding it to the second data space to which the access data belongs, the access data can be obtained from the cache of the second switch or the second gateway in the second data space, without having to obtain the access data from the warehouse of the second space. In this way, the system introduces a cache mechanism to cache the access data during the access process, avoiding the need to obtain data from the warehouse for each access, thereby improving the access performance of the system.
[0031] In an optional embodiment, the cache header portion of the first format access request encapsulates a cache message, and the cache message in the first format access request includes at least one of the following fields: Item A-1: a first field indicating whether to use access data in the cache; Item A-2: a second field indicating whether the obtained access data needs to be cached; Item A-3: a third field indicating the length of time the access data is allowed to be cached; Item A-4: The fourth field is used to indicate the update frequency of access data in the cache.
[0032] In embodiments of the present application, the first field can be used to prevent a gateway or switch from directly using cached access data when processing an access request. Instead, the gateway or switch must forward the access request to the repository to obtain the latest access data. For example, the value of the first field is a Boolean type with a default value of false, indicating that cached access data may be used. When true, even if the access data exists in the cache of a device (e.g., the first gateway), the system will bypass the cache and obtain the access data from the repository.
[0033] The second field can be understood as being used to declare whether the obtained access data can be stored by the intermediate device. For example, the value of the second field is of Boolean type, and the default value is false, indicating that the gateway and the switch shall not cache the access request for subsequent requests during the process of processing the request.
[0034] The third field specifies the maximum length of time that access data remains cached. This field's value is a non-negative integer expressed in seconds. During this time, the gateway or switch can use the cached data without re-requesting it from the repository. Once the cached data exceeds the specified length, the data is deleted from the gateway or switch.
[0035] The fourth field can be understood as the frequency at which the warehouse agrees to update access data in the cache. The value of the fourth field is a non-negative integer expressed in seconds. The fourth field provides a reference for the cache replacement strategy.
[0036] Specifically, the second format access request has a segmented structure, a cache header between the content length and the payload of the second format access request encapsulates cache information, and the cache information in the second format access request includes at least one of the following fields: Item B-1: a fifth field indicating whether to use access data in the cache; Item B-2: a sixth field indicating whether the obtained access data needs to be cached; Item B-3: The seventh field is used to indicate the length of time that access data is allowed to be cached.
[0037] In an embodiment of the present application, the second format access request has a segmented structure, and multiple header fields can be attached after the message body. Each header is concatenated through the next header (Next Header) type identifier in the previous field. Therefore, the cache header between the content length and the payload of the second format access request encapsulates the cache message.
[0038] Through the above implementation process, in order to cache access data, fields are added to the two format messages of the DOIP protocol to encapsulate cache information. Through the various fields in the cache message in the first format access request, the processing behavior of the gateway and switch in the data space on the cache operation can be guided. Through the various fields in the cache message in the second format access request, efficient cache identification and control can be supported between the switch and the cross-space gateway.
[0039] The following describes the data access process, the processing of access requests and access data by each device.
[0040] (1) First Gateway: In an optional embodiment, the cache message in the first-format access request includes a first field for indicating whether to use access data in the cache; and the first gateway obtains the access data from its own cache or the first repository according to the first-format access request, including: Step C-1: the first gateway determines whether to use access data in the cache according to the first field of the cache information in the access request in the first format; Step C-2: if the first gateway determines to use the access data in the cache and the access data exists in its own cache, the first gateway obtains the access data from its own cache; Step C-3: When the first gateway determines to use the access data in the cache and the access data does not exist in its own cache, or when the first gateway determines not to use the access data in the cache, the first gateway sends the first format access request to the first repository and obtains the access data from the first repository. Step C-4: The first gateway sends the access data to the client.
[0041] In an embodiment of the present application, the first format access request includes cache information. After the first gateway receives the first format access request, it obtains the access data from its own cache or the first warehouse based on the cache information in the first format access request. Specifically, step C-1 is first executed. If the first field indicates that the access data in the cache is to be used, it is also necessary to determine whether the corresponding access data exists in its own cache. If the corresponding access data exists, steps C-2 and C-4 are executed in sequence to directly obtain the access data from its own cache and send it to the client. If the corresponding access data does not exist in its own cache, or the first field indicates that the access data in the cache is not to be used, it is necessary to obtain the corresponding access data from the first warehouse. In this case, steps C-3 and C-4 are executed to send the access data obtained from the first warehouse to the client.
[0042] like Figure 3 As shown, Figure 3 The diagram illustrates the process of the first gateway obtaining access data from its own cache. Specifically, the first gateway receives a first format access request sent by a client, and searches its own cache for corresponding access data based on the target identifier in the first format access request. If the corresponding access data exists, the first gateway directly returns the access data stored in the cache without accessing the first warehouse. Figure 4 As shown, Figure 4 The diagram illustrates a process in which the first gateway obtains access data from the first warehouse. Specifically, the first gateway sends an access request in a first format to the first warehouse, and the first warehouse returns corresponding access data.
[0043] In this way, based on the first field of the cache information in the first format access request, it can be determined as needed whether to obtain access data from the cache, thereby improving data access efficiency and flexibility.
[0044] Furthermore, the cache message in the first format access request further includes a second field for indicating whether the obtained access data needs to be cached, a third field for indicating a duration for which the access data is allowed to be cached, and a fourth field for indicating a frequency of updating the access data in the cache; the first gateway performing a cache operation on the access data includes: Step D-1: After obtaining the access data from the first warehouse, the first gateway determines whether to cache the access data according to the second field of the cache message in the first format access request; Step D-2: When the first gateway determines that the access data needs to be cached, the first gateway adds the access data to the cache and sets the validity period of the access data in the cache according to the third field and the fourth field of the cache message in the first format access request.
[0045] In this embodiment of the present application, during the access process, access data obtained from the repository is cached based on the cache information. First, step D-1 is executed to determine whether caching is necessary. If it is determined that the access data does not need to be cached, the first gateway directly sends the access data to the client. If it is determined that the access data is required, step D-2 is executed. When caching the access data, a specific caching policy can be determined based on the third and fourth fields in the cache information. Specifically, a valid time (expiration time) for the access data in the cache is set. In other words, if the access data is stored in the cache for a period exceeding the valid time, the access data is deleted from the cache.
[0046] In this way, the access data is cached according to the second field of the cache information in the first format access request, and the cache content in the device is maintained through the third and fourth fields, thereby ensuring that the access data can be directly obtained from the cache later, thereby speeding up data access efficiency.
[0047] In an optional embodiment, the cache information in the second-format access request includes a fifth field for indicating whether to use access data in the cache, a sixth field for indicating whether the obtained access data needs to be cached, and a seventh field for indicating the duration for which the access data is allowed to be cached; and the first gateway converts the first-format access request into a second-format access request encapsulating the cache information and the target identifier, including: The first gateway maps the first field to the fifth field, the second field to the sixth field, and the third field to the seventh field to construct a cache header; and packages the first format access request and adds it as an envelope header, and obtains the second format access request based on the cache header and the envelope header.
[0048] In an embodiment of the present application, if the first gateway determines that the target identifier in the first format access request does not belong to the first data space (indicating that cross-data space access is required), the first gateway needs to convert the first format access request into a second format access request and hand it over to the first switch to complete cross-data space forwarding.
[0049] Specifically, the cache fields of the first format access request and the cache header in the second format access request are highly consistent in semantics, so each field can be directly converted one by one, that is, the first gateway maps the first field to the fifth field, the second field to the sixth field, and the third field to the seventh field to construct the cache header of the second format access request.
[0050] In this way, by mapping semantically similar fields, the cache information is encapsulated in the second format access request, so that during the access process across the data space according to the second format access request, the access data can be cached and / or obtained from the cache to improve the data access performance of the system.
[0051] In specific implementation, the first gateway processes the first format access request through an internal processing program, such as Figure 5 As shown, Figure 5 The diagram illustrates the process of the first gateway processing a first-format access request. Specifically, after receiving the first-format access request, the first gateway starts a processing program through the network traffic to count the size of the received network packets. Then, the message envelope codec restores the byte stream of the first-format access request into a first-format access request encapsulated message. Next, the message envelope aggregator aggregates multiple first-format access request encapsulated messages that may be split and restores them into a complete first-format access request. The logger caches the first-format access request during the request phase and records a complete audit log when responding. The management processing program identifies the category of the first-format access request, performs permission verification, and configures the operation. Finally, the first gateway transfers the request based on whether the target identifier belongs to the current data space. If it does, the space processing program obtains the access data from the cache or the first warehouse and sends it to the client. If it belongs to another data space, the switching processing program encapsulates the first-format access request into a second-format access request and transfers it to the first switch to complete cross-data space forwarding.
[0052] (2) First switch: In an optional embodiment, the system further includes an identity resolution system, wherein the identity resolution system stores a correspondence between identifiers and data spaces; the first switch is used to determine the second data space to which the target identifier belongs, including: the first switch queries the identity resolution system according to the target identifier to obtain the second data space to which the target identifier belongs.
[0053] In this embodiment of the present application, after receiving the second-format access request handed over by the first gateway, the first switch uses the target identifier in the second-format access request to query the identity resolution system. The identity resolution system stores the correspondence between identifiers and data spaces, so the identity resolution system can determine the second data space to which the target identifier belongs. In this way, the second-format access request is forwarded across data spaces through the first switch in the first data space.
[0054] (3) Second switch: In an optional embodiment, the second switch includes a first hash table, the first hash table being used to store the identifier and the access data corresponding to the identifier; the cache information in the second format access request includes a fifth field for indicating whether to use the access data in the cache; and the second switch is configured to obtain the access data from its own cache according to the second format access request, or to transfer the second format access request to the second gateway, including: Step E-1: The second switch determines whether to use access data in the cache according to the fifth field of the cache message in the second format access request; Step E-2: When the second switch determines to use the access data in the cache, the second switch retrieves the corresponding access data from the first hash table according to the target identifier in the second-format access request, and sends the retrieved access data to the client through the first switch and the first gateway. Step E-3: When the second switch determines that the access data in the cache is not used and when corresponding access data is not retrieved from the first hash table according to the target identifier in the second format access request, the second switch transfers the second format access request to the second gateway.
[0055] In the embodiment of the present application, the second format access request includes cache information. After the first gateway receives the second format access request, it caches the second format access information from its own cache or transfers it to the second gateway according to the cache information in the second format access request.
[0056] Specifically, step E-1 is first executed. If the fifth field indicates that the access data in the cache should be used, it is necessary to determine whether the corresponding access data exists in its own cache. If the corresponding access data exists, step E-2 is sequentially executed to directly obtain the access data from its own cache and send it to the client. The second switch stores the identifier and the access data corresponding to the identifier in the first hash table and obtains the access data cached by the second switch from the first hash table. If the corresponding access data does not exist in its own cache, or the fifth field indicates that the access data in the cache should not be used, it is necessary to obtain the corresponding access data from the second gateway or the second warehouse, and step E-3 is executed.
[0057] like Figure 6 As shown, Figure 6 This diagram illustrates the process by which the first switch retrieves access data from its own cache. Specifically, the second switch receives the second-format access request sent by the first switch and, based on the target identifier, searches its own cache (the first hash table) to determine whether the corresponding access data exists. If so, the second switch sends the access data to the client via the first switch and the first gateway, without accessing the second gateway and / or the second repository.
[0058] In an optional embodiment, the second switch includes a first hash table and a second hash table, the first hash table is used to store the identifier and the access data corresponding to the identifier, and the second hash table is used to store the access request in the second format; The second switch is further configured to, after receiving the access data fed back by the second gateway, search the second format access request in the second hash table, and determine whether the access data needs to be cached according to the sixth field of the cache information in the second format access request; When determining that the access data needs to be cached, the second switch adds the access data and the target identifier to the first hash table, and sets the validity period of the access data in the first hash table according to the seventh field of the cache information in the second format access request.
[0059] In an embodiment of the present application, the second switch stores the received second-format access request in a second hash table. After receiving the access data fed back by the second network, the second switch first obtains the corresponding second-format access request from the second hash table, and determines whether the access data needs to be cached based on the cache information in the second-format access request, that is, determines whether the access data needs to be cached according to the sixth field; if it is determined that the access data does not need to be cached, the second switch directly sends the access data to the client through the first switch and the first gateway; if it is determined that the access data needs to be accessed, the access data and the target identifier are added to the first hash table for caching, and a specific cache strategy (the validity period of the access data in the first hash table) is determined according to the seventh field in the cache information.
[0060] In this way, the second switch caches the access data according to the sixth field of the cache information in the second format access request, and maintains the cache content in the device through the seventh field, thereby ensuring that the access data can be directly obtained from the cache later, thereby accelerating data access efficiency.
[0061] In a specific implementation, the second switch processes the second format access request through an internal processing program, such as Figure 7 As shown, Figure 7 The diagram illustrates the process by which the second switch handles a second-format access request. Specifically, the listening end of the digital network switch integrates multiple core handlers, including a network traffic statistics handler (for monitoring and counting network traffic), a message envelope codec responsible for encoding and decoding message envelope objects in the DOIP protocol (ensuring correct parsing and reconstruction of data during transmission), a message envelope aggregator for aggregating and parsing DoipMessages and message envelopes, and a digital object handler. The dispatcher component in the digital object handler distributes the second-format access request to the corresponding cluster client based on the digital space node manager and switch node manager. Specifically, the space handler sends the second-format access request to the second gateway or retrieves access data from its own cache, and determines the switch to which the target identifier belongs through the switch and the local system, and then sends the request.
[0062] (4) Second gateway: In an optional embodiment, the second gateway is configured to obtain access data from its own cache or from the second warehouse according to the second format access request, including: Step F-1: the second gateway parses the second format access request into a first format access request, and determines whether to use the access data in the cache according to the first field of the cache information in the first format access request; Step F-2: When the second gateway determines to use the access data in the cache and the access data exists in its own cache, the second gateway obtains the access data from its own cache; Step F-3: When the second gateway determines to use the access data in the cache and the access data does not exist in its own cache, or when the second gateway determines not to use the access data in the cache, the second gateway sends the first format access request to the second warehouse and obtains the access data from the second warehouse; Step F-4: The second gateway sends the access data to the client via the second switch, the first switch, and the first gateway in sequence.
[0063] In an embodiment of the present application, the second format access request represents a cross-data space access request from the second switch, so the data space pointed to by the second format access request is the second data space. The second gateway of the second data space parses the second format access request into a first format access request to obtain access data from its own cache or the second warehouse.
[0064] Specifically, the second gateway parses the second format access request into the first format access request, including: the second gateway extracts the cache information in the cache header of the second format access request into the message encapsulation, and adds the envelope header in the second format access request to the message encapsulation to obtain a message encapsulation result; aggregates the message encapsulation result, and maps the fifth field of the cache information in the first format access request to the first field, the sixth field to the second field, and the seventh field to the third field to obtain the first format access request.
[0065] In this way, based on the fact that the cache fields in the first format access request are highly semantically consistent with the cache header in the second format access request, the various fields of the cache header in the second format request are mapped one-to-one to the various fields in the cache header part of the second format access request, that is, the fifth field is mapped to the first field, the sixth field is mapped to the second field, and the seventh field is mapped to the third field to obtain the first format access request, thereby realizing the conversion from the second format access request to the first format access request.
[0066] The first-format access request includes cache information. The second gateway determines whether to retrieve access data from its own cache or the second repository based on the first field of the cache information. If the first field indicates that the access data in the cache should be used, it also determines whether the corresponding access data exists in its own cache. If so, steps F-2 and F-4 are executed sequentially to retrieve the access data from its own cache and send it to the client. If the corresponding access data does not exist in its own cache, or if the first field indicates that the access data in the cache should not be used, it is necessary to retrieve the corresponding access data from the second repository. In this case, steps F-3 and F-4 are executed to send the access data retrieved from the second repository to the client.
[0067] like Figure 8 As shown, Figure 8 The diagram illustrates the process of the second gateway obtaining access data from its own cache. Specifically, after receiving the second format access request, the second gateway parses the second format access request into the first format access request. The second gateway can retrieve whether there is corresponding access data in its own cache based on the target identifier. If so, the second gateway obtains the access data from the cache without accessing the second warehouse, and sends the access data to the client through the original path. Figure 9 As shown, Figure 9 The diagram illustrates a process in which the second gateway obtains access data from the second warehouse. Specifically, the second gateway sends an access request in the first format to the second warehouse, and the second warehouse returns corresponding access data.
[0068] In an optional embodiment, the second gateway performs a cache operation on the access data, including: Step G-1: After obtaining the access data from the second warehouse, the second gateway determines whether to cache the access data according to the second field of the cache message in the first format access request; Step G-2: When the second gateway determines that the access data needs to be cached, it adds the access data to the cache and sets the validity period of the access data in the cache according to the third field and the fourth field in the first format access request.
[0069] In an embodiment of the present application, the second gateway caches the access data obtained from the warehouse according to the cache information during the access process, first executing step G-1 to determine whether caching is required. If it is determined that the access data does not need to be cached, the second gateway sends the access data to the client. If it is determined that the access data needs to be accessed, step G-2 is executed. When caching the access data, the specific caching strategy can be determined based on the third field and the fourth field in the cache information, that is, the effective time of the access data in the cache is set.
[0070] In this way, during the cross-data space access process, the access data can be cached according to the second field of the cache information in the first format access request, and the cache content in the device can be maintained through the third field and the fourth field, thereby ensuring that the access data can be directly obtained from the cache subsequently, thereby speeding up data access efficiency.
[0071] It can be understood that during the cross-data space access process, since the access data corresponding to the target identifier is in the second data space, all caching of the access data only occurs in the second switch and the second gateway of the second data space, that is, the first switch and the first gateway of the first data space will not cache the access data from the second data space.
[0072] In specific implementation, the second gateway processes the second format access request through an internal processing program, such as Figure 10 As shown, Figure 10 This diagram illustrates the process by which the second gateway processes a second-format access request. Specifically, after receiving the second-format access request, the second gateway uses the network traffic startup handler to count the size of the received network packets. The second-format message envelope encoder then converts the byte stream of the second-format access request into a second-format access request encapsulated message. The token checker handler then verifies the validity of the token in the second-format access request. The second-format message envelope decoder and message envelope aggregator then parse the second-format access request into a cached message envelope with cache information, and aggregate the resulting first-format access request with the cache information and target identifier. The second-format access request represents a cross-data space access request from the second switch. Therefore, the data space targeted by the second-format access request is the second data space. Therefore, the first-format access request, obtained by parsing the second-format access request, is processed by the space handler to retrieve access data from the second gateway's own cache or from the second repository.
[0073] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0074] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0075] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0076] The above is a detailed introduction to the digital network data space access system based on the DOIP protocol caching mechanism provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data space access system for Internet of Things based on DOIP protocol caching mechanism, characterized in that: include: A client, a first data space, and a second data space, wherein the first data space includes a first gateway, a first switch, and a first warehouse, and the second data space includes a second gateway, a second switch, and a second warehouse; The client is configured to send a first format access request encapsulating cache information and a target identifier to the first gateway, wherein the target identifier is used to indicate access data, and the cache information represents an acquisition and cache method of the access data; The first gateway is configured to, when the target identifier belongs to the first data space, obtain the access data from its own cache or the first warehouse according to the first format access request, and perform a cache operation on the access data; and for, if the target identifier does not belong to the first data space, converting the first format access request into a first format access request encapsulating cache information and the target identifier, and handing the request over to the first switch; The first switch is configured to determine a second data space to which the target identifier belongs, and send the second format access request to a second switch in the second data space; The second switch is configured to obtain access data from its own cache according to the second format access request, or to transfer the second format access request to the second gateway; The second gateway is used to obtain access data from its own cache or from the second warehouse according to the second format access request, and perform a cache operation on the access data.
2. The system according to claim 1, wherein: The cache header portion of the first format access request encapsulates a cache message, the cache message in the first format access request including at least one of the following fields: a first field for indicating whether to use access data in the cache, a second field for indicating whether the obtained access data needs to be cached, a third field for indicating a duration for which the access data is allowed to be cached, and a fourth field for indicating an update frequency of the access data in the cache; The second format access request has a segmented structure, and the cache header between the content length and the payload of the second format access request encapsulates a cache message. The cache information in the second format access request includes at least one of the following fields: a fifth field for indicating whether to use the access data in the cache, a sixth field for indicating whether the obtained access data needs to be cached, and a seventh field for indicating the length of time the access data is allowed to be cached.
3. The system according to claim 1, wherein: The cache message in the first format access request includes a first field for indicating whether to use access data in the cache; The first gateway obtains the access data from its own cache or the first warehouse according to the first format access request, including: The first gateway determines whether to use access data in the cache according to the first field of the cache information in the access request in the first format; The first gateway obtains the access data from its own cache when determining to use the access data in the cache and the access data exists in its own cache; When the first gateway determines to use the access data in the cache and the access data does not exist in its own cache, or when the first gateway determines not to use the access data in the cache, the first gateway sends the first format access request to the first warehouse and obtains the access data from the first warehouse; The first gateway sends the access data to the client.
4. The system according to claim 3, characterized in that The cache message in the access request in the first format further includes a second field for indicating whether the obtained access data needs to be cached, a third field for indicating the length of time the access data is allowed to be cached, and a fourth field for indicating the update frequency of the access data in the cache; The first gateway performs a cache operation on the access data, including: After obtaining the access data from the first warehouse, the first gateway determines whether the access data needs to be cached according to the second field of the cache message in the first format access request; When the first gateway determines that the access data needs to be cached, the first gateway adds the access data to the cache and sets the validity period of the access data in the cache according to the third field and the fourth field of the cache message in the first format access request.
5. The system according to claim 4, characterized in that The cache information in the second format access request includes a fifth field for indicating whether to use the access data in the cache, a sixth field for indicating whether the obtained access data needs to be cached, and a seventh field for indicating the length of time the access data is allowed to be cached; The first gateway converts the first format access request into a second format access request encapsulating cache information and a target identifier, including: The first gateway maps the first field to the fifth field, the second field to the sixth field, and the third field to the seventh field to construct a cache header; The first format access request is packaged and added as an envelope header, and the second format access request is obtained according to the cache header and the envelope header.
6. The system according to claim 5, characterized in that The second switch includes a first hash table, the first hash table being used to store the identifier and the access data corresponding to the identifier; the cache information in the second format access request includes a fifth field for indicating whether to use the access data in the cache; The second switch is configured to obtain access data from its own cache according to the second format access request, or transfer the second format access request to the second gateway, including: The second switch determines whether to use access data in the cache according to the fifth field of the cache message in the second format access request; When determining to use the access data in the cache, the second switch retrieves the corresponding access data from the first hash table according to the target identifier in the access request in the second format, and sends the retrieved access data to the client through the first switch and the first gateway; The second switch transfers the second format access request to the second gateway if it is determined that the access data in the cache is not used and if corresponding access data is not retrieved from the first hash table according to the target identifier in the second format access request.
7. The system according to claim 5, characterized in that The second gateway is configured to obtain access data from its own cache or from the second warehouse according to the second format access request, including: The second gateway parses the second format access request into a first format access request, and determines whether to use access data in the cache according to the first field of the cache information in the first format access request; The second gateway obtains the access data from its own cache when determining to use the access data in the cache and the access data exists in its own cache; When the second gateway determines to use the access data in the cache and the access data does not exist in its own cache, or when the second gateway determines not to use the access data in the cache, the second gateway sends the first format access request to the second warehouse and obtains the access data from the second warehouse; The second gateway sends the access data to the client through the second switch, the first switch, and the first gateway in sequence.
8. The system according to claim 7, characterized in that The second gateway performs a cache operation on the access data, including: After obtaining the access data from the second warehouse, the second gateway determines whether the access data needs to be cached according to the second field of the cache message in the first format access request; When determining that the access data needs to be cached, the second gateway adds the access data to the cache and sets the validity period of the access data in the cache according to the third field and the fourth field in the first format access request.
9. The system according to claim 7, wherein: The second switch includes a first hash table and a second hash table, the first hash table is used to store the identifier and the access data corresponding to the identifier, and the second hash table is used to store the access request in the second format; The second switch is further configured to, after receiving the access data fed back by the second gateway, search the second format access request in the second hash table, and determine whether the access data needs to be cached according to the sixth field of the cache information in the second format access request; When determining that the access data needs to be cached, the second switch adds the access data and the target identifier to the first hash table, and sets the validity period of the access data in the first hash table according to the seventh field of the cache information in the second format access request.
10. The system according to claim 7, wherein: The second gateway parsing the second format access request into the first format access request includes: The second gateway extracts the cache information in the cache header of the second format access request into the message encapsulation, and adds the envelope header in the second format access request to the message encapsulation to obtain a message encapsulation result; The message encapsulation results are aggregated, and the fifth field of the cache information in the first format access request is mapped to the first field, the sixth field is mapped to the second field, and the seventh field is mapped to the third field to obtain a first format access request.
Citation Information
Patent Citations
Filtering insertion of evicted cache entries predicted as dead-on-arrival (DOA) into a last level cache (LLC) memory of a cache memory system
CN110998547A
Data processing method and device and gateway equipment
CN113259229A
Database access method and system, electronic equipment and medium
CN116599737A
Identification analysis data caching method and device based on digital object
CN116634017A
Government affair cloud environment-oriented multi-level data networking method, system, device and equipment
CN117082106A