CN116708579B - Data access method, device, electronic equipment and computer readable storage medium - Google Patents

Data access method, device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN116708579B
CN116708579B CN202310974630.8A CN202310974630A CN116708579B CN 116708579 B CN116708579 B CN 116708579B CN 202310974630 A CN202310974630 A CN 202310974630A CN 116708579 B CN116708579 B CN 116708579B
Authority
CN
China
Prior art keywords
data
preset
access request
initial
protocol
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.)
Active
Application number
CN202310974630.8A
Other languages
Chinese (zh)
Other versions
CN116708579A (en
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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN202310974630.8A priority Critical patent/CN116708579B/en
Publication of CN116708579A publication Critical patent/CN116708579A/en
Application granted granted Critical
Publication of CN116708579B publication Critical patent/CN116708579B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses a data access method, a device, an electronic device and a computer readable storage medium, relates to the technical field of big data, and aims to solve the problems of low service efficiency and high error rate caused by complex conversion of different protocols in the traditional technology so as to effectively ensure user experience, wherein the method is applied to a protocol converter and comprises the following steps: receiving an initial access request through a heterogeneous protocol network interface; determining a heterogeneous protocol type according to the initial access request; determining a target decoder corresponding to the heterogeneous protocol type; converting the initial access request into a data access request based on a preset protocol by using the target decoder; and sending the data access request to target access equipment for data access.

Description

Data access method, device, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of big data technologies, and in particular, to a data access method, a device, an electronic apparatus, and a computer readable storage medium.
Background
With the popularization of artificial intelligence technology and large data application, massive multi-source heterogeneous data is rapidly increased. Currently, a large number of different data communication protocols exist in the market, and a memory pool for providing data storage services for vast user equipment faces the challenges of cost waste caused by multiple data conversion, difficult maintenance of the data conversion protocol, difficult unification of data standards and the like in the data docking process of various user equipment. Further, the complex conversion of different protocols results in low service efficiency and high error rate, and brings bad experience to users.
Therefore, how to implement the multi-protocol compatible consistency protocol conversion to effectively maintain the consistency of the data, and to implement efficient sharing of the data are technical problems that need to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a data access method which can realize the consistency protocol conversion compatible with multiple protocols so as to effectively maintain the consistency of data and realize the efficient sharing of the data; another object of the present invention is to provide a data access device, an electronic apparatus, a computer-readable storage medium, which also have the above-mentioned advantageous effects.
In a first aspect, the present invention provides a data access method, applied to a protocol converter, including:
receiving an initial access request through a heterogeneous protocol network interface;
determining a heterogeneous protocol type according to the initial access request;
determining a target decoder corresponding to the heterogeneous protocol type;
converting the initial access request into a data access request based on a preset protocol by using the target decoder;
and sending the data access request to target access equipment for data access.
Optionally, the determining the target decoder corresponding to the heterogeneous protocol type includes:
Storing the initial access request to a target receiving memory corresponding to the heterogeneous protocol type;
determining a mapping relation between the target receiving memory and a local protocol stack by using a protocol mapper;
determining a target decoder allocated for the target receiving memory according to the mapping relation;
accordingly, the converting the initial access request into a data access request based on a preset protocol by using the target decoder includes:
reading the initial access request in the target receiving memory with the target decoder;
and converting the initial access request into the data access request based on the preset protocol.
Optionally, the target receiving memory is a virtual variable capacity receiving memory, and the method further includes:
real-time monitoring is carried out on the actual occupied capacity of the virtual variable capacity receiving memory;
and expanding or shrinking the capacity of the virtual variable capacity receiving memory according to the actual occupied capacity and the current total capacity.
Optionally, the expanding or shrinking the capacity of the virtual variable capacity receiving memory according to the actual occupied capacity and the current total capacity includes:
Calculating a capacity ratio according to the actual occupied capacity and the current total capacity;
when the capacity ratio exceeds a first preset threshold value, performing capacity expansion processing on the virtual variable capacity receiving memory;
and when the capacity duty ratio is lower than a second preset threshold value, performing capacity reduction processing on the virtual variable capacity receiving memory.
Optionally, the expanding the virtual variable capacity receiving memory includes:
performing memory address addition on the virtual variable capacity receiving memory according to a first preset proportion to realize capacity expansion processing;
accordingly, the performing the capacity reduction processing on the virtual variable capacity receiving memory includes:
and recovering the memory address of the virtual variable capacity receiving memory according to a second preset proportion to realize the capacity shrinking processing.
Optionally, the data access method further includes:
determining each heterogeneous protocol type according to the heterogeneous protocol network interface;
allocating a receiving memory for each heterogeneous protocol type, and setting a protocol flag bit for the corresponding receiving memory according to the heterogeneous protocol type;
and establishing a mapping relation between each receiving memory and the local protocol stack according to each protocol flag bit.
Optionally, after the initial access request is read in the target receiving memory by the target decoder, the method further includes:
and clearing the memory space of the initial access request in the target receiving memory.
Optionally, the sending the data access request to the target access device for data access includes:
storing the data access request to a preset sending cache;
reading and obtaining the data access request in the preset sending buffer by using a parallel sending unit;
and transmitting the data access request to the target access equipment by using the parallel transmitting unit for data access.
Optionally, the converting, with the target decoder, the initial access request into a data access request based on a preset protocol includes:
analyzing the initial access request by using the target decoder to obtain effective data;
and filling the effective data into a preset protocol data frame to obtain the data access request based on the preset protocol.
Optionally, before the valid data is filled into a preset protocol data frame and the data access request based on the preset protocol is obtained, the method further includes:
When preset mark data exist in the effective data, judging whether the initial access request hits a preset cache or not according to the preset mark data;
if yes, the hit data in the preset cache is fed back to the request terminal;
and if not, executing the step of filling the effective data into a preset protocol data frame to obtain the data access request based on the preset protocol.
Optionally, the preset flag data includes an access data flag, and the determining whether the initial access request hits in a preset cache according to the preset flag data includes:
judging whether the access data mark hits the preset cache or not;
if yes, determining that the initial access request hits the preset cache;
if not, determining that the initial access request does not hit the preset cache.
Optionally, the feeding back the hit data in the preset cache to the request terminal includes:
judging whether the hit data meets the initial access request or not;
if yes, the hit data is fed back to the request terminal.
Optionally, the preset flag data includes an access data start address and an access data length, and the determining whether the hit data meets the initial access request includes:
Judging whether the initial address of the hit data meets the initial address of the access data and whether the data length of the hit data meets the length of the access data;
if yes, determining that the hit data meets the initial access request;
if not, determining that the hit data does not meet the initial access request.
Optionally, when the hit data does not satisfy the initial access request, the method further comprises:
counting the continuous hit times of the hit data;
and deleting the hit data in the preset cache when the continuous hit times reach a first preset times.
Optionally, when the initial access request misses the preset cache, the filling the valid data into a preset protocol data frame to obtain the data access request based on the preset protocol includes:
creating a data prediction model by using the preset mark data;
carrying out data prediction by using the data prediction model to obtain prediction mark data;
filling the effective data and the predictive flag data into the preset protocol data frame to obtain the data access request based on the preset protocol;
Correspondingly, after the data access request is sent to the target access device for data access, the method further comprises the following steps:
receiving request response data fed back by the target access equipment;
determining predicted access data based on the request response data;
and correspondingly storing the predicted access data and the predicted mark data to the preset cache.
Optionally, before the creating the data prediction model by using the preset flag data, the method further includes:
counting the number of missed hits of the initial access request;
judging whether the number of missed hits reaches a second preset number;
if yes, executing the step of creating a data prediction model by using the preset mark data.
Optionally, the creating a data prediction model using the preset flag data includes:
acquiring the preset mark data of each initial access request which is not hit in the preset cache;
ordering the preset mark data according to the receiving sequence of the initial access request to obtain a preset mark data sequence;
generating model training samples according to the preset mark data sequences, wherein each model training sample comprises two preset mark data, and the receiving sequences corresponding to the two preset mark data are adjacent;
And performing model training by using all the model training samples to obtain the data prediction model.
Optionally, the sorting the preset flag data according to the receiving order of the initial access requests to obtain a preset flag data sequence includes:
and storing the preset mark data into a first-in first-out memory according to the receiving sequence of the initial access request to obtain the preset mark data sequence.
Optionally, before generating each model training sample according to the preset flag data sequence, the method further includes:
judging whether the number of the preset mark data in the first-in first-out memory reaches a preset number or not;
if not, returning to the step of acquiring the preset mark data of each initial access request of the preset cache;
and if yes, executing the step of generating each model training sample according to the preset mark data sequence.
Optionally, the data prediction using the data prediction model to obtain prediction flag data includes:
processing the preset mark data by using the data prediction model to obtain initial prediction mark data;
Judging whether the current predicted times reach a third preset times or not;
if not, the initial predictive flag data is used as the preset flag data, and the step of processing the preset flag data by using the data predictive model to obtain the initial predictive flag data is returned;
if yes, generating the prediction mark data according to all the initial prediction mark data.
Optionally, the prediction flag data includes a prediction data start address and a prediction data length, and the generating the prediction flag data according to all the initial prediction flag data includes:
determining an initial prediction address minimum value and an initial prediction address maximum value in all the initial prediction flag data;
taking a first difference value between the minimum value of the initial predicted address and a first preset parameter as the initial address of the predicted data;
and calculating a second difference value between the initial predicted address maximum value and the initial predicted address minimum value, and taking the sum of the second difference value and a second preset parameter as the predicted data length.
Optionally, the data access method further includes:
receiving target access data fed back by the target access equipment;
Converting the target access data into an access result based on the heterogeneous protocol;
and sending the access result to a request terminal through the heterogeneous protocol network interface.
In a second aspect, the present invention also discloses a data access device, which is applied to a protocol converter, and includes:
the receiving module is used for receiving the initial access request through the heterogeneous protocol network interface;
the first determining module is used for determining the heterogeneous protocol type according to the initial access request;
the second determining module is used for determining a target decoder corresponding to the heterogeneous protocol type;
the conversion module is used for converting the initial access request into a data access request based on a preset protocol by utilizing the target decoder;
and the sending module is used for sending the data access request to the target access equipment for data access.
In a third aspect, the present invention discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of any one of the data access methods described above when executing the computer program.
In a fourth aspect, the present invention discloses a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of any of the data access methods described above.
The invention provides a data access method, which is applied to a protocol converter and comprises the following steps: receiving an initial access request through a heterogeneous protocol network interface; determining a heterogeneous protocol type according to the initial access request; determining a target decoder corresponding to the heterogeneous protocol type; converting the initial access request into a data access request based on a preset protocol by using the target decoder; and sending the data access request to target access equipment for data access.
The technical scheme provided by the invention has the following beneficial effects:
the invention provides a protocol converter capable of realizing multi-protocol compatible consistency protocol conversion, which is provided with different decoders in advance for different heterogeneous protocol types, so that an initial access request received by a heterogeneous protocol network interface can be directly called according to the used heterogeneous protocol type to carry out protocol conversion on the corresponding target decoder, the conversion of the initial data access request based on different data communication protocols into the data access request based on the same preset protocol is realized, and further, the data access is realized.
The invention also discloses a data access device, electronic equipment and a computer readable storage medium, which have the technical effects as well, and the invention is not repeated here.
Drawings
In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present invention, the following will briefly describe the drawings that need to be used in the description of the prior art and the embodiments of the present invention. Of course, the following drawings related to embodiments of the present invention are only a part of embodiments of the present invention, and it will be obvious to those skilled in the art that other drawings can be obtained from the provided drawings without any inventive effort, and the obtained other drawings also fall within the scope of the present invention.
FIG. 1 is a schematic flow chart of a data access method according to the present invention;
fig. 2 is a schematic structural diagram of a protocol converter according to the present invention;
FIG. 3 is a schematic diagram of a mapping mechanism of a protocol conversion map according to the present invention;
FIG. 4 is a schematic diagram of another mapping mechanism for protocol conversion according to the present invention;
FIG. 5 is a schematic diagram of a data access device according to the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to the present invention.
Detailed Description
The core of the invention is to provide a data access method, which can realize the consistency protocol conversion compatible with multiple protocols so as to effectively maintain the consistency of the data and realize the high-efficiency sharing of the data; another core of the present invention is to provide a data access device, an electronic apparatus, and a computer-readable storage medium, which also have the above-mentioned advantageous effects.
In order to more clearly and completely describe the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
An embodiment of the invention provides a data access method.
Referring to fig. 1, fig. 1 is a flow chart of a data access method provided by the present invention, where the data access method is applied to a protocol converter, and includes S101 to S105.
S101: receiving an initial access request through a heterogeneous protocol network interface;
firstly, it should be noted that, the data access method provided by the present invention is implemented based on a protocol converter, through which an access request initiated by a user device following different communication protocols (i.e. the above initial access request) can be converted into an access request of a unified communication protocol, and sent to a target server (i.e. a target access device described below), so as to implement data access of various user devices to the target server.
Further, this step aims at enabling the reception of an initial access request, i.e. a data access request initiated by a requesting end (any user equipment), which may be received via a heterogeneous protocol network interface, since different requesting ends may use different communication protocols. The heterogeneous protocol network interface refers to network interfaces of a plurality of different communication protocols, that is, a request end using different communication protocols can access a protocol converter through respective corresponding protocol network interfaces so as to realize the sending of an initial access request and the receiving of a subsequent request response.
S102: determining a heterogeneous protocol type according to the initial access request;
this step is intended to enable determination of the heterogeneous protocol type, essentially to determine the communication protocol used for the initial access request currently received. Specifically, after the initial access request is received, the initial access request can be parsed to obtain the communication protocol field therein, so as to determine the heterogeneous protocol type of the initial access request.
S103: determining a target decoder corresponding to the heterogeneous protocol type;
this step aims at achieving a determination of the target decoder. Specifically, in the protocol converter, respective corresponding decoders may be created in advance for each type of heterogeneous protocol, where the decoders are used to implement a protocol conversion function, that is, in the protocol converter, the heterogeneous protocol types and the decoders have a one-to-one correspondence, and different decoders may be used to perform protocol conversion on different heterogeneous protocol types, so as to implement a consistent protocol conversion function. Therefore, after determining the heterogeneous protocol type of the initial access request, a target decoder corresponding to the heterogeneous protocol type can be determined according to the corresponding relation, so that the target decoder can be used for realizing protocol conversion of the initial access request.
S104: converting the initial access request into a data access request based on a preset protocol by using a target decoder;
this step aims at realizing the protocol conversion function. After determining the target decoder, the initial access request may be directly sent to the target decoder, so that the target decoder converts the initial access request into a data access request based on a preset protocol. It should be noted that, no matter what heterogeneous protocol type, the corresponding target decoder can convert the corresponding initial access request into the data access request of the same preset protocol, so as to realize the consistency protocol conversion function of the protocol converter. Taking a preset protocol as a high-speed bus protocol as an example, when the heterogeneous protocol type is a PCI protocol (Peripheral Component Interconnect, local parallel bus protocol), the corresponding target decoder can convert the corresponding initial access request into a data access request based on the high-speed bus protocol; when the heterogeneous protocol type is CXL protocol (Compute Express Link, cache coherence interconnect protocol), its corresponding target decoder can also translate its corresponding initial access request into a data access request based on the high-speed bus protocol.
S105: and sending the data access request to the target access equipment for data access.
This step is intended to achieve the final data access. Specifically, after protocol conversion is completed, the data access request can be directly sent to the target access device, so that the data access of the request end to the target access device is realized. It can be appreciated that, since the foregoing protocol converter has implemented the function of converting the coherence protocol, for the target access device (the accessed person), the received data access requests are all based on the data access requests of the same communication protocol (i.e. the preset protocol), and no additional request processing is needed to directly perform the request response.
It can be seen that, in the data access method provided by the embodiment of the present invention, a protocol converter capable of implementing multi-protocol compatible consistent protocol conversion is provided, and different decoders are preset for different heterogeneous protocol types, so that, for an initial access request received by a heterogeneous protocol network interface, a corresponding target decoder can be directly called according to the heterogeneous protocol type used by the initial access request to implement protocol conversion, so that the initial data access request based on different data communication protocols is converted into a data access request based on the same preset protocol, and further data access is implemented, thereby implementing multi-protocol compatible consistent protocol conversion based on the protocol converter, effectively maintaining data consistency, implementing efficient sharing of data, further ensuring accurate and efficient user service, and improving user experience.
Based on the above embodiments:
in an embodiment of the present invention, the determining the target decoder corresponding to the heterogeneous protocol type may include: storing the initial access request to a target receiving memory corresponding to the heterogeneous protocol type; determining a mapping relation between a target receiving memory and a local protocol stack by using a protocol mapper; determining a target decoder allocated for the target receiving memory according to the mapping relation;
accordingly, the converting the initial access request into the data access request based on the preset protocol by using the target decoder may include: reading the initial access request in the target receiving memory with the target decoder; the initial access request is converted into a data access request based on a preset protocol.
The embodiment of the invention provides a method for determining a target decoder. Specifically, the protocol converter is further provided with a receiving memory and a protocol mapper, wherein the receiving memories are in one-to-one correspondence with the heterogeneous protocol types and are used for realizing temporary storage of initial data requests corresponding to the corresponding heterogeneous protocol types, and the protocol mapper is used for realizing relation mapping between each receiving memory and a local protocol stack so as to facilitate determination of a target decoder.
In the implementation process, after determining the heterogeneous protocol type of the initial access request, the protocol converter can determine a target receiving memory corresponding to the initial access request according to the corresponding relation between each heterogeneous protocol type and the receiving memory, temporarily store the initial access request to the target receiving memory, and further determine the mapping relation between the target receiving memory and the local protocol stack by using the protocol mapper, so that a target decoder which is a distributor of the target receiving memory can be queried according to the mapping relation, and the determination of the target decoder is realized. Correspondingly, when the target decoder is used for carrying out protocol conversion on the initial access request, the initial access request can be read from the target receiving memory first, and then the protocol conversion operation is carried out.
In one embodiment of the present invention, the target receiving memory is specifically a virtual variable capacity receiving memory, and the data access method may further include: real-time monitoring is carried out on the actual occupied capacity of the virtual variable capacity receiving memory; and expanding or shrinking the capacity of the virtual variable capacity receiving memory according to the actual occupied capacity and the current total capacity.
The data access method provided by the embodiment of the invention can further realize the capacity dynamic adjustment function of the receiving memory so as to provide protocol conversion service for more user equipment as much as possible. Specifically, the target receiving memory may be a virtual variable capacity receiving memory, and the protocol converter may monitor an actual occupied capacity (capacity occupied by stored data) of the virtual variable capacity receiving memory in real time during a working process, and perform capacity expansion or capacity contraction processing on the virtual variable capacity receiving memory in combination with a current total capacity (a maximum storable data capacity of the virtual variable capacity receiving memory). The capacity expansion process is to expand the current total capacity of the virtual variable capacity receiving memory, and the capacity contraction process is to reduce the current total capacity of the virtual variable capacity receiving memory.
In an embodiment of the present invention, the expanding or shrinking the virtual variable capacity receiving memory according to the actual occupied capacity and the current total capacity may include: calculating the capacity ratio according to the actual occupied capacity and the current total capacity; when the capacity ratio exceeds a first preset threshold value, performing capacity expansion processing on the virtual variable capacity receiving memory; and when the capacity ratio is lower than a second preset threshold value, performing capacity shrinking processing on the virtual variable capacity receiving memory.
The embodiment of the invention provides a realization method for carrying out expansion and contraction processing on a virtual variable capacity receiving memory according to the actual occupied capacity and the current total capacity of the virtual variable capacity receiving memory. Specifically, the actual occupied capacity and the current total capacity can be calculated to obtain a capacity ratio, namely, the quotient between the actual occupied capacity and the current total capacity, and when the capacity ratio exceeds a first preset threshold value, the virtual variable capacity receiving memory is indicated to have less free space, and capacity expansion processing can be carried out on the virtual variable capacity receiving memory; when the capacity ratio is lower than a second preset threshold value, the virtual variable capacity receiving memory is indicated to have more free space, and the capacity reduction processing can be performed on the virtual variable capacity receiving memory. Obviously, the value of the first preset threshold is larger than the second preset threshold, and of course, the specific value of the first preset threshold does not affect the implementation of the technical scheme, and the first preset threshold is 75% and the second preset threshold is 25% according to actual conditions by a technician.
In an embodiment of the present invention, the performing the capacity expansion processing on the virtual variable capacity receiving memory may include: performing memory address addition on the virtual variable capacity receiving memory according to a first preset proportion to realize capacity expansion processing;
Accordingly, the performing the capacity reduction processing on the virtual variable capacity receiving memory may include: and recovering the memory address of the virtual variable capacity receiving memory according to a second preset proportion to realize capacity shrinking processing.
The embodiment of the invention provides a specific implementation manner of expansion and contraction, namely expansion and contraction processing of a virtual variable capacity receiving memory can be realized by adopting a memory address adding and memory address recovering mode, and the addition and recovery of the memory address can be realized based on corresponding preset proportion, namely the expansion and contraction processing is realized by adding the memory address to the virtual variable capacity receiving memory according to a first preset proportion, and the expansion and contraction processing is realized by recovering the memory address to the virtual variable capacity receiving memory according to a second preset proportion. Similarly, the specific values of the first preset proportion and the second preset proportion are not unique, and the embodiment of the invention is not limited to this, for example, the current total capacity can be expanded to 1.5 times when the capacity expansion processing is performed, and the current total capacity can be reduced to 0.75 times when the capacity reduction processing is performed.
In one embodiment of the present invention, the data access method may further include: determining each heterogeneous protocol type according to the heterogeneous protocol network interface; allocating a receiving memory for each heterogeneous protocol type, and setting a protocol flag bit for the corresponding receiving memory according to the heterogeneous protocol type; and establishing a mapping relation between each receiving memory and a local protocol stack according to each protocol flag bit.
The data access method provided by the embodiment of the invention aims at realizing the pre-configuration of each unit in the protocol converter, and comprises the corresponding relation between the heterogeneous protocol type and the receiving memory and the mapping relation between the receiving memory and the local protocol stack in the protocol mapper. It can be understood that different heterogeneous protocol interfaces are used for obtaining initial access requests of corresponding heterogeneous protocol types, so that the corresponding heterogeneous protocol types can be determined according to each heterogeneous protocol network interface, then a receiving memory is allocated to each heterogeneous protocol type, and specifically, a protocol flag bit can be set for the corresponding receiving memory directly according to the heterogeneous protocol type, so that the correspondence between the heterogeneous protocol type and the receiving memory is realized; further, in the protocol mapper, a local protocol stack is maintained for recording the protocol conversion mode between each heterogeneous protocol type and the preset protocol, so that the mapping relation between each receiving memory and the local protocol stack can be established according to each protocol flag bit. Thus, the pre-configuration of each unit in the protocol converter is completed.
In an embodiment of the present invention, after the reading, by the target decoder, the initial access request in the target receiving memory, the method may further include: and (3) clearing the memory space of the initial access request in the target receiving memory.
As described above, the receiving memory is configured to temporarily store the initial data request corresponding to the corresponding heterogeneous protocol type, and after determining the target decoder, the target memory is used to read the initial data request in the corresponding target receiving memory to perform the protocol conversion processing, where, to avoid unnecessary storage resource occupation, after the initial access request is read, the memory space where the initial access request is located in the target receiving memory may be emptied after the initial access request is completed, so as to provide a storage space for a subsequent new initial access request.
In one embodiment of the present invention, the sending the data access request to the target access device for data access may include: storing the data access request to a preset sending cache; reading and obtaining a data access request in a preset transmission buffer by using a parallel transmission unit; and transmitting the data access request to the target access device by using the parallel transmitting unit for data access.
The embodiment of the invention provides a realization method for sending a data access request to target access equipment. Specifically, a transmission buffer and a parallel transmission unit are further preset in the protocol converter, after the protocol conversion is completed to obtain the data access request, the data access request can be temporarily stored in the preset transmission buffer, and then the data access request in the preset transmission buffer is transmitted to the target access device by the parallel transmission unit to access the data. Obviously, based on the parallel sending unit, the batch data access request can be read and sent simultaneously, and the data access efficiency is improved.
In an embodiment of the present invention, the converting the initial access request into the data access request based on the preset protocol by using the target decoder may include: analyzing the initial access request by using a target decoder to obtain effective data; and filling the effective data into a preset protocol data frame to obtain a data access request based on a preset protocol.
The embodiment of the invention provides a specific protocol conversion method. As described above, the protocol conversion operation is implemented based on a target decoder in the protocol converter, in which a preset protocol data frame corresponding to a preset protocol is pre-stored, after the target decoder obtains an initial access request, the data access request can be parsed to obtain effective data therein, including but not limited to a payload length, a source address, a destination address, a data body, and the like, and then the effective data is sequentially filled into corresponding positions of the preset protocol data frame, thereby obtaining the data access request based on the preset protocol.
In an embodiment of the present invention, the foregoing filling the valid data into the preset protocol data frame, before obtaining the data access request based on the preset protocol, may further include: when the valid data contains preset mark data, judging whether the initial access request hits a preset cache according to the preset mark data; if yes, hit data in a preset cache are fed back to the request terminal; and if not, executing the step of filling the effective data into a preset protocol data frame to obtain a data access request based on a preset protocol.
In order to effectively ensure the data access efficiency, the embodiment of the invention provides a data access method based on cache pre-matching. Specifically, a preset cache can be created in advance and used for storing data information which is possibly accessed by user equipment or accessed by high frequency or of certain specific types, so that when an initial access request hits the preset cache, the data information hit in the preset cache can be directly used as an access result to carry out request feedback, the data request to a target access device is avoided, and the data access efficiency is effectively improved.
For example, in the embodiment of the present invention, when the preset flag data exists in the effective data obtained by parsing, the cache pre-matching can be performed on the corresponding initial access request, and when the preset flag data does not exist, the cache pre-matching operation is not performed, and the next effective data filling process is directly performed. Then, in the process of cache pre-matching, whether the initial access request hits the preset cache or not can be judged according to the preset mark data, if yes, the initial access request hits the preset cache, and at the moment, the corresponding hit data information (namely the hit data) is fed back to the request terminal; otherwise, when the initial access request does not hit the preset cache, the subsequent data filling operation needs to be continuously executed.
In an embodiment of the present invention, the preset flag data may include an access data flag, and the determining whether the initial access request hits the preset cache according to the preset flag data may include: judging whether the access data mark hits a preset cache or not; if yes, determining that the initial access request hits a preset cache; if not, determining that the initial access request does not hit the preset cache.
The embodiment of the invention provides an implementation method for judging whether an initial access request hits a preset cache or not according to preset mark data. Specifically, the preset flag data may include an access data flag, that is, flag information of data information to be accessed, for identifying an initial access request of the same type (e.g., heterogeneous protocol type), and correspondingly, in the preset cache, each access data flag is stored in correspondence with the data information, so that whether the initial access request hits the preset cache can be determined by determining whether the access data flag in the initial access request hits the preset cache, and obviously, when the same data access flag exists in the preset cache, it can be determined that the initial access request hits the preset cache, and when the same data access flag does not exist in the preset cache, it can be determined that the initial access request misses the preset cache.
In an embodiment of the present invention, the feeding back the hit data in the preset cache to the request terminal may include: judging whether hit data meets an initial access request or not; if yes, the hit data is fed back to the request terminal.
In order to ensure the accuracy of the data access result, after determining that the initial access request hits the preset cache and before feeding back hit data to the request terminal, whether the hit data meets the initial access request can be judged, the hit data is fed back to the request terminal only when the hit data meets the initial access request, and when the hit data does not meet the initial access request, the hit feedback is not needed, and the data filling operation is continuously executed. For example, when the hit data is only a part of the actually required access data corresponding to the initial access request, it is indicated that the hit data does not satisfy the initial access request, whereas when the hit data completely covers the actually required access data corresponding to the initial access request, it is indicated that the hit data satisfies the initial access request.
In one embodiment of the present invention, the preset flag data may include an access data start address and an access data length, and the determining whether the hit data satisfies the initial access request may include: judging whether the initial address of the hit data meets the initial address of the access data or not, and judging whether the data length of the hit data meets the length of the access data or not; if yes, determining that hit data meets the initial access request; if not, determining that the hit data does not meet the initial access request.
The embodiment of the invention provides a realization method for judging whether hit data meets an initial access request. Specifically, the preset flag data may further include an access data start address and an access data length, so that whether the hit data satisfies the initial access request can be determined by using the access data start address and the access data length, and obviously, when the start address of the hit data satisfies the access data start address and the data length of the hit data satisfies the access data length, it is determined that the hit data satisfies the initial access request, because the hit data must completely cover the data information actually required to be accessed by the initial access request at this time, or it may be determined that the hit data does not satisfy the initial access request.
In one embodiment of the present invention, when hit data does not satisfy the initial access request, the data access method may further include: counting the continuous hit times of hit data; and deleting hit data in a preset cache when the continuous hit times reach a first preset times.
It can be understood that when the initial access request continuously hits the preset cache, but the actual hit data continuously does not meet the initial access request, the hit data is indicated to be low-frequency access data, or the hit data is an erroneous data prediction result, and at this time, in order to avoid unnecessary memory resource occupation, the hit data may be deleted directly from the preset cache. Specifically, when it is determined that hit data does not satisfy the initial access request, the number of consecutive hits of the hit data may be counted, and when the number of hits reaches a first preset number, a hit data deletion operation may be performed. The specific value of the first preset times does not affect implementation of the technical scheme, and the technical scheme is set by a technician according to actual conditions, so that the invention is not limited.
In an embodiment of the present invention, when the initial access request does not hit the preset cache, the filling the valid data into the preset protocol data frame to obtain the data access request based on the preset protocol may include: creating a data prediction model by using preset mark data; carrying out data prediction by using a data prediction model to obtain prediction mark data; filling the effective data and the predictive flag data into a preset protocol data frame to obtain a data access request based on a preset protocol;
accordingly, after the data access request is sent to the target access device for data access, the method may further include: receiving request response data fed back by the target access equipment; determining predicted access data based on the request response data; and correspondingly storing the predicted access data and the predicted mark data to a preset cache.
It will be appreciated that in practical applications, heterogeneous protocol devices often need to read a long piece of data, such as video data, from a remote device. If a traditional data reading process is adopted, the heterogeneous protocol network sends a data reading request to a destination address, and the remote device feeds back data to the requesting device, obviously, the request-sending data transmission process has the problems of low high-speed bus utilization rate and slow data transmission. In order to solve the technical defects, the invention realizes intelligent prefetching of data by applying an artificial intelligent algorithm, thereby greatly improving the data transmission efficiency.
Specifically, when the initial data access request does not hit the preset cache, the data prediction model can be created by using the preset flag data in the initial access request, so as to implement data prediction, that is, predict the data information that may be accessed by the subsequent initial access request of the same type, that is, the predicted access data, so that after the predicted access data is obtained, the predicted access data can be added into the preset cache, so that the hit rate of the initial data request is effectively improved, and further, the data access efficiency is improved.
Therefore, in this embodiment, the data prediction function is implemented by creating the data prediction model, that is, the data that the user equipment initiating the initial access request may continue to access is predicted, and the data (predicted access data) is obtained in advance and temporarily stored in the preset cache, so when the initial access request of the same type initiated by the user equipment is received again subsequently, the initial access request will hit the preset cache directly, and the target access result corresponding to the initial access request is obtained from the preset cache directly to feed back, without obtaining the target access result from the target access device, thereby effectively improving the data access efficiency.
In an embodiment of the present invention, before the creating the data prediction model using the preset flag data, the method may further include: counting the number of missed hits of the initial access request; judging whether the number of missed hits reaches a second preset number of times; if yes, executing the step of creating a data prediction model by using the preset mark data.
Specifically, before the data prediction model is created, the number of times of missing the preset cache of the initial access request can be counted first, when it is determined that the number of times of missing the initial access request of the same type reaches the second preset number of times, it can be determined that the initial data request of the same type may need to access a large amount of data information, and at this time, the data prediction model can be created and a data prefetching mechanism can be started. In addition, because the data prediction model needs to be trained by using more sample data, the preset mark data of the initial access request with the same type and continuous multiple misses can be directly used as training samples in the follow-up process, so that the training of the data prediction model is realized.
In an embodiment of the present invention, the creating the data prediction model using the preset flag data may include: acquiring preset mark data of each initial access request which does not hit a preset cache; sequencing each preset mark data according to the receiving sequence of each initial access request to obtain a preset mark data sequence; generating model training samples according to a preset mark data sequence, wherein each model training sample comprises two preset mark data, and the receiving sequences corresponding to the two preset mark data are adjacent; and performing model training by using all model training samples to obtain a data prediction model.
The embodiment of the invention provides a realization method for creating a data prediction model by using preset mark data. As described above, since the data prediction model needs to be trained using a large amount of sample data, the preset flag data of the same type of initial access request that is missed consecutively a plurality of times can be directly used as training samples in the following steps, so that training of the data prediction model is realized. Based on the above, the preset flag data of each initial access request which is not hit in the preset cache can be directly obtained, in order to ensure the accuracy of the data prediction result, the preset flag data can be sequenced according to the receiving sequence of the initial access request to obtain a preset flag data sequence, further, generation of a model training sample can be realized based on the preset flag data sequence, the model training sample can comprise two preset flag data, the receiving sequence corresponding to the two preset flag data is adjacent, for example, the preset flag data of the received first initial access request and the preset flag data of the received second initial access request are combined to form a model training sample, the preset flag data of the received second initial access request and the preset flag data of the received third initial access request are combined to form a model training sample, and so on, a plurality of model training samples are obtained, and therefore training of the data prediction model can be realized by using all the model training samples.
In an embodiment of the present invention, the sorting the preset flag data according to the receiving order of the initial access requests to obtain the preset flag data sequence may include: and storing each preset mark data to a first-in first-out memory according to the receiving sequence of each initial access request to obtain a preset mark data sequence.
The embodiment of the invention provides a method for realizing the ordering of preset mark data, namely the method can be realized based on a first-in first-out memory, namely the preset mark data are stored in the first-in first-out memory according to the receiving sequence of each initial access request. It can be understood that, since each preset flag data is stored in the fifo according to the receiving order of the corresponding initial access request, and based on the fifo rule of the fifo, when the preset flag data is obtained from the fifo to perform training of the data prediction model, the preset flag data used for performing training of the data prediction model can be effectively ensured to be read according to the receiving order thereof, and the receiving order of the preset flag data, that is, the receiving order of the initial access request, that is, the data reading order of the user equipment, the training of the data prediction model is performed based on the ordered preset flag data sequence, so that the model precision of the data prediction model can be effectively ensured, and more accurate data prediction can be facilitated.
In an embodiment of the present invention, before generating each model training sample according to the preset flag data sequence, the method may further include: judging whether the number of preset mark data in the first-in first-out memory reaches the preset number or not; if not, returning to the step of acquiring the preset mark data of each initial access request which does not hit the preset cache; if yes, executing the step of generating each model training sample according to the preset mark data sequence.
It can be understood that, since the data prediction model needs to use more sample data for training, before generating each model training sample according to the preset flag data sequence, whether the number of preset flag data in the first-in first-out memory reaches the preset number can be counted first, if not, the model training samples which can be generated at that time are fewer, which is unfavorable for training the data prediction model, so that the step of taking the preset flag data of each initial access request which does not hit the preset cache can be returned to continuously obtain more preset flag data until the number of preset flag data in the first-in first-out memory reaches the preset number, at this time, the model training samples which can be generated in the first-in first-out memory can reach the sufficient number, and then the generation of the model training samples can be performed. It can be understood that the number of the model training samples can be effectively ensured through the preset number judgment, so that the model training samples with enough numbers can be ensured to be used for training the data prediction model, and obviously, the more the number of the model training samples is, the more the model training samples are helpful for training to obtain the data prediction model with higher precision, and the accuracy of the data prediction result is further improved.
In an embodiment of the present invention, the performing data prediction using the data prediction model to obtain prediction flag data may include: processing the preset mark data by using a data prediction model to obtain initial prediction mark data; judging whether the current predicted times reach a third preset times or not; if not, the initial prediction mark data is used as preset mark data, and the step of processing the preset mark data by using the data prediction model to obtain the initial prediction mark data is returned; if yes, generating predictive flag data according to all the initial predictive flag data.
In order to further improve the data access efficiency, the data prediction model may be used to continue the next prediction based on the previous prediction result until the preset number of predictions, that is, the third preset number, is reached, and then final prediction flag data is generated based on the prediction result of each time. Specifically, after each time the preset flag data is processed by using the data prediction model, whether the current prediction frequency reaches the third preset frequency or not can be counted, if not, the next round of prediction is continued by using the initial prediction flag data obtained by the current prediction until the current prediction frequency reaches the third preset frequency, and therefore all the initial prediction flag data can generate final prediction flag data. Therefore, based on the method, a large amount of data prediction is realized, the cache data amount of the preset cache is increased, and the data access efficiency is further improved.
In one embodiment of the present invention, the prediction flag data may include a prediction data start address and a prediction data length, and the generating the prediction flag data according to all the initial prediction flag data may include: determining an initial prediction address minimum value and an initial prediction address maximum value in all initial prediction flag data; taking a first difference value between the minimum value of the initial predicted address and a first preset parameter as a predicted data initial address; and calculating a second difference value between the initial predicted address maximum value and the initial predicted address minimum value, and taking the sum of the second difference value and a second preset parameter as the predicted data length.
The embodiment of the invention provides a realization method for generating predictive flag data according to all initial predictive flag data. Specifically, the prediction flag data may include a predicted data start address and a predicted data length, so that each predicted result may be obtained, and a data start address minimum value, a data start address maximum value, and a requested data length among all the predicted results are calculated, and then the data prefetch start address is: data initial address minimum value-first preset parameter in the prediction result; the data prefetch request data length is: data start address maximum value-data start address minimum value + second preset parameter.
It should be noted that, the setting of the first preset parameter and the second preset parameter aims to effectively ensure that the data prediction result can fully cover the data to be actually accessed by the user equipment as far as possible, for the prediction result actually output by the data prediction model, a certain amount of prediction data can be read before the prediction result is directed to the minimum value of the data initial address through the first preset parameter, and a certain amount of prediction data can be read after the prediction result is directed to the maximum value of the data initial address through the second preset parameter, so that the front-back address expansion of the prediction data can be realized, more prediction access data can be obtained and stored in the preset cache, and at this time, the hit rate of the subsequent new initial data request in the preset cache can be further improved, and the data access efficiency is further improved.
In one embodiment of the present invention, the data access method may further include: receiving target access data fed back by target access equipment; converting the target access data into access results based on heterogeneous protocols; and sending the access result to the request terminal through the heterogeneous protocol network interface.
The embodiment of the invention aims to realize the feedback of the access result. Specifically, since the protocol conversion is performed on the initial access request in the data access process, the data access request received by the target access device is a data access request based on a preset protocol, so that the target access data fed back by the target access device (i.e. the request response result of the data access request) is necessarily also based on the preset protocol, and at this time, in order to realize the feedback of the access result, the protocol conversion (essentially the reverse operation of the protocol conversion in the data access process) can be performed on the target access data, so as to obtain the access result based on the heterogeneous protocol, and finally, the access result is sent to the request terminal through the heterogeneous protocol network interface. It should be noted that, the feedback of the request response and the sending of the data request are opposite operations corresponding to each other, so the feedback flow of the request response needs to specifically refer to the above embodiments, and the disclosure is not repeated here.
The second embodiment of the invention provides another data access method.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a protocol converter provided by the present invention, where the protocol converter is composed of a general purpose computing unit, a virtual variable capacity receiving memory, a virtual variable capacity transmitting memory, a protocol mapper, a parallel transmitting unit and a parallel receiving unit, where the protocol mapper is composed of a local protocol stack, a distributed decoder, a distributed encoder, a data prefetching neural network computing unit, a prefetching cache, a transmitting cache and a receiving cache, and the protocol converter is connected to each heterogeneous protocol network interface through a plurality of heterogeneous buses to achieve acquisition of a request terminal data access request, and the parallel transmitting unit and the parallel receiving unit are externally connected with a high-speed bus to achieve data communication with a target access device.
Further, based on the protocol converter, the data access process of the request terminal to the target access device based on the heterogeneous protocol is as follows:
(1) When each heterogeneous protocol network is accessed to the protocol converter, a data packet (initial access request) is sent to the protocol converter, and at this time, the general calculation unit is responsible for the protocol identification and analysis work of the heterogeneous protocol network, and the information such as the frame head of the data packet is sequentially judged by traversing the data packet, so as to judge the heterogeneous protocol type.
(2) After determining the heterogeneous protocol type, the general computing unit configures two virtual variable capacity memories, namely a virtual variable capacity receiving memory and a virtual variable capacity transmitting memory, for each heterogeneous protocol network, and respectively performs transceiving buffering of the data packets. In the initialization state, the capacity of the virtual variable capacity memory is set to a fixed value, and the general computing unit continuously monitors the transceiving state of the heterogeneous protocol network and dynamically adjusts the capacity of the heterogeneous protocol network.
(3) After determining the heterogeneous protocol types, the general computing unit allocates a special data processing unit (data processing IP core) for each heterogeneous protocol, and is responsible for the processing of receiving, sending, storing and the like of the data packets of the heterogeneous protocol network.
(4) The dedicated data receiving units receive the data packets in the respective allocated heterogeneous protocol networks and store them in virtual variable capacity receiving memories corresponding to the heterogeneous protocol networks.
(5) The virtual variable capacity memory is in a pair appearance and comprises a virtual variable capacity receiving memory and a virtual variable capacity transmitting memory, the virtual variable capacity memory is provided with a protocol flag bit, the initial state is null, and the general computing unit sets the flag bit (protocol flag bit) of the virtual variable capacity memory through heterogeneous protocol types.
(6) The protocol mapper establishes direct connection mapping with the local protocol stack through the flag bit of the virtual variable capacity memory so as to realize data packet decoding and protocol conversion of the virtual variable capacity memory.
(7) After the protocol mapper establishes mapping connection with the virtual variable capacity memory, the protocol mapper calls the distributed decoder to directly decode corresponding data packets in parallel form, namely, each mapped virtual variable capacity memory is directly decoded by the distributed decoder. The distributed decoder can read the data packet in the virtual variable capacity memory, empty the memory space of the corresponding virtual variable capacity memory after the data packet is read, and then decode the heterogeneous protocol data in the data packet to check the correctness to obtain the effective data.
(8) The distributed decoder is also responsible for protocol conversion, and can repackage the valid data in the data packet obtained by the last step, such as source address, destination address, data body and other key data, into a predefined high-speed bus data packet, and store the predefined high-speed bus data packet in a cache. The distributed decoder can implement protocol conversion through a mapping mechanism of the protocol mapper, please refer to fig. 3, fig. 3 is a schematic diagram of a mapping mechanism of the protocol conversion mapping provided by the present invention, specifically, the distributed decoder can write the effective data in the data packet obtained by the last step of decoding into a high-speed bus data frame through a prefabricated protocol mapping mechanism, so as to implement conversion between different protocols.
(9) The parallel transmitting unit reads the high-speed bus data frame in the transmission cache and transmits it to the remote device (target access device) through the high-speed bus.
(10) The parallel receiving unit receives the high-speed bus data frame (here, target access data) fed back to the local by the remote device through the high-speed bus, and stores it in the receiving cache. It is noted here that the protocol mapper builds separate transmit and receive caches for each direct mapped heterogeneous protocol network.
(11) The protocol mapper establishes a distributed encoder for each direct-connection mapped heterogeneous protocol network, realizes reading of high-speed bus data frames from corresponding receiving caches, converts the high-speed bus data frames into corresponding heterogeneous network data frames, and stores the corresponding heterogeneous network data frames in a corresponding virtual variable capacity transmission memory. The conversion method comprises the following steps: the distributed encoder reads the high-speed bus data frame in the receiving cache, decodes the effective data of the high-speed bus data frame through a prefabricated protocol mapping mechanism, and writes the effective data in the high-speed bus data frame into the heterogeneous network data frame to realize conversion among different protocols.
(12) The distributed encoder writes the converted heterogeneous network data frames (actual access results) into the virtual variable capacity transmission memory, and when the heterogeneous network bus is allowed to transmit or the bus is idle, the special data processing unit reads the heterogeneous network data frames in the virtual variable capacity transmission memory to perform transmission operation.
So far, based on the operation flow, the data access of the heterogeneous protocol device to the remote device is realized.
It will be appreciated that in practical applications, heterogeneous protocol devices often need to read a long piece of data, such as video data, from a remote device. If a traditional data reading process is adopted, the heterogeneous protocol network sends a data reading request to a destination address, and the remote device feeds back data to the requesting device, obviously, the request-sending data transmission process has the problems of low high-speed bus utilization rate and slow data transmission. In order to solve the technical defects, the invention realizes intelligent prefetching of data by applying the artificial intelligent chip and the algorithm, thereby greatly improving the data transmission efficiency. The data prefetching mechanism of the invention is as follows:
(1) The distributed decoder analyzes the data packet sent by the heterogeneous protocol network, and the invention defines 3 important flag bits in the high-speed bus data frame: a request read data flag (access data flag), a read data start address (access data start address), a request data length (access data length). The distributed decoder can analyze the request read data mark, the read data starting address and the request data length in the heterogeneous network data packet according to a heterogeneous bus conversion protocol preset by the protocol mapper. It should be noted that, the preset protocol in the protocol mapper predefines the data frame structure in the heterogeneous protocol network, if the preset protocol includes the 3 important flag bits, the heterogeneous network can implement the data prefetching function; if the preset protocol does not contain the 3 important flag bits, the heterogeneous network is a general network, and does not implement the data prefetching function, as shown in fig. 4, fig. 4 is a schematic diagram of another mapping mechanism for protocol conversion provided by the present invention.
(2) The distributed decoder analyzes the data packets sent by the heterogeneous protocol network, and counts the request data packets when the request data marks, the read data starting addresses and the request data lengths are analyzed.
(3) When the count value of the request data packet count in the preset time exceeds the set threshold value, the request data packet is excessive, and a data prefetching mechanism can be started.
(4) After the data pre-fetching mechanism is started, the distributed decoder analyzes the data packet sent by the heterogeneous protocol network, and stores the read data mark, the read data starting address and the request data length into the first-in first-out memory of the distributed decoder.
(5) When the storage capacity in the first-in first-out memory of the distributed decoder exceeds a preset threshold, the data prefetching neural network calculation can be started.
(6) A batch of fifo memory data is read in turn, for example 16 sets (request read data flag, read data start address, request data length) of data.
(7) Firstly, establishing a data prefetching neural network to calculate and input, sequentially acquiring 2 groups of data which are adjacent to each other in a first-in first-out memory, and then inputting a read data starting address and the length of the current request data into a neural network chip to predict the next read data starting address and the length of the request data. And sequentially traversing 2 groups of input data in the first-in first-out memory, and sending the input data into a neural network chip for training to judge the network convergence state. The method for judging the convergence state is that if the accuracy of the predicted next read data starting address exceeds a preset threshold, the network converges, and the network prediction structure is accurate and reliable.
(8) The distributed decoder analyzes the data packet sent by the heterogeneous protocol network, when the data packet is analyzed to the request data mark, the read data initial address and the request data length, the analysis result is written into a high-speed bus data frame, and meanwhile, the analysis result is sent into the input of the data prefetching neural network, and the next data initial address and the request data length are predicted. Further, the predicted data start address and the requested data length may be further predicted continuously, for example, K times of continuous prediction may be set.
(9) The distributed decoder acquires K prediction results, and calculates a data start address minimum value, a data start address maximum value and a request data length in the K prediction results. Thus, the data prefetch address is calculated, and the data prefetch starting address is: data start address minimum value-M (first preset parameter) in the prediction result; the data prefetch request data length is: the maximum value of the data initial address and the minimum value of the data initial address are plus N (second preset parameters) so as to effectively ensure that the prediction result can fully cover the actual access data.
(10) The distributed decoder writes the data prefetching flag bit, the data prefetching start address, the data prefetching request data length and the request reading data flag into the high-speed bus frame, and prefetches the data in advance.
(11) The distributed encoder reads data from the receiving cache, and when the data is analyzed to be the prefetched data, the prefetched data is stored in the prefetched cache to wait for inquiry.
(12) When the prefetching buffer is not empty, the distributed decoder analyzes the data packet sent by the heterogeneous protocol network, when the data packet is analyzed to request the reading data mark, the reading data starting address and the requesting data length, the data is firstly inquired from the prefetching buffer, and if the corresponding reading data starting address and the enough data length are inquired, the distributed encoder is informed to package the buffered data to the virtual variable capacity sending memory.
(13) The distributed encoder monitors the query times of the data in the prefetching buffer, and when the data packet in the prefetching buffer is not hit for a plurality of times and cannot be queried by the distributed decoder, the data can be deleted.
Finally, the general purpose computing unit may also monitor the capacity change of all virtual variable capacity memories in the protocol converter, the monitoring process comprising: allocating initial buffer capacity of the virtual variable capacity memory with different sizes for heterogeneous protocol networks with different rates through protocol flag bits of the virtual variable capacity memory, for example, the initial buffer capacity of the virtual variable capacity memory of the serial network is 10M; the initial buffer capacity of the virtual variable capacity memory of the PCI network is 1000M.
Further, the general purpose computing unit monitors the capacity change of all the virtual variable capacity memories in the protocol converter, when the data occupation capacity of the virtual variable capacity memories is kept above a set threshold (e.g. 75%) of the total storage capacity of the virtual variable capacity memories for a long time, the general purpose computing unit can expand the capacity of the virtual variable capacity memories by adding memory addresses, and the capacity of each additional memory address is 1.5 times of the original capacity. Similarly, when the data occupation capacity of the virtual variable capacity memory is kept below a set threshold (e.g. 25%) of the total storage capacity of the virtual variable capacity memory for a long time, the general calculation unit expands the virtual variable capacity memory by recovering the memory address, and the capacity of the memory address which is reduced each time is 0.75 times of the original capacity. Wherein it can also be defined for a long period of time, such as 60 second cycle monitoring.
It can be seen that, in the data access method provided by the embodiment of the present invention, a protocol converter capable of implementing multi-protocol compatible consistent protocol conversion is provided, and different decoders are preset for different heterogeneous protocol types, so that, for an initial access request received by a heterogeneous protocol network interface, a corresponding target decoder can be directly called according to the heterogeneous protocol type used by the initial access request to implement protocol conversion, so that the initial data access request based on different data communication protocols is converted into a data access request based on the same preset protocol, and further data access is implemented, thereby implementing multi-protocol compatible consistent protocol conversion based on the protocol converter, effectively maintaining data consistency, implementing efficient sharing of data, further ensuring accurate and efficient user service, and improving user experience.
The third embodiment of the invention provides a data access device.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a data access device provided by the present invention, where the data access device is applied to a protocol converter, and includes:
a receiving module 1, configured to receive an initial access request through a heterogeneous protocol network interface;
a first determining module 2, configured to determine a heterogeneous protocol type according to an initial access request;
a second determining module 3, configured to determine a target decoder corresponding to the heterogeneous protocol type;
a conversion module 4, configured to convert the initial access request into a data access request based on a preset protocol by using a target decoder;
and the sending module 5 is used for sending the data access request to the target access equipment for data access.
It can be seen that, the data access device provided by the embodiment of the present invention provides a protocol converter capable of implementing multi-protocol compatible consistent protocol conversion, which is preset with different decoders for different heterogeneous protocol types, so that, for an initial access request received by a heterogeneous protocol network interface, a corresponding target decoder can be directly called according to the heterogeneous protocol type used by the initial access request to implement protocol conversion, so as to implement conversion of an initial data access request based on different data communication protocols into a data access request based on the same preset protocol, thereby implementing data access.
In one embodiment of the present invention, the second determining module 3 may include:
the first storage unit is used for storing the initial access request to a target receiving memory corresponding to the heterogeneous protocol type;
a first determining unit, configured to determine a mapping relationship between the target receiving memory and the local protocol stack by using the protocol mapper;
a second determining unit, configured to determine a target decoder allocated for the target receiving memory according to the mapping relationship;
accordingly, the conversion module 4 may include:
a first reading unit for reading the initial access request in the target receiving memory using the target decoder;
and the conversion unit is used for converting the initial access request into a data access request based on a preset protocol.
In one embodiment of the present invention, the target receiving memory may be specifically a virtual variable capacity receiving memory, and the data access apparatus may further include:
the monitoring module is used for monitoring the actual occupied capacity of the virtual variable capacity receiving memory in real time;
and the control module is used for expanding or shrinking the capacity of the virtual variable capacity receiving memory according to the actual occupied capacity and the current total capacity.
In one embodiment of the present invention, the control module may include:
A calculation unit for calculating a capacity ratio according to the actual occupied capacity and the current total capacity;
the capacity expansion unit is used for carrying out capacity expansion processing on the virtual variable capacity receiving memory when the capacity duty ratio exceeds a first preset threshold value;
and the capacity shrinking unit is used for carrying out capacity shrinking processing on the virtual variable capacity receiving memory when the capacity duty ratio is lower than a second preset threshold value.
In an embodiment of the present invention, the capacity expansion unit may be specifically configured to perform memory address addition on the virtual variable capacity receiving memory according to a first preset ratio, so as to implement capacity expansion processing;
correspondingly, the capacity reduction unit can be specifically used for recovering the memory address of the virtual variable capacity receiving memory according to the second preset proportion, so as to realize capacity reduction processing.
In one embodiment of the present invention, the data access apparatus may further include:
the pre-configuration module is used for determining each heterogeneous protocol type according to the heterogeneous protocol network interface; allocating a receiving memory for each heterogeneous protocol type, and setting a protocol flag bit for the corresponding receiving memory according to the heterogeneous protocol type; and establishing a mapping relation between each receiving memory and a local protocol stack according to each protocol flag bit.
In an embodiment of the present invention, the conversion module 4 may further include a flushing unit, configured to flush the memory space of the initial access request in the target receiving memory after the initial access request is read in the target receiving memory by the target decoder.
In one embodiment of the present invention, the transmitting module 5 may include:
the second storage unit is used for storing the data access request to a preset sending cache;
the second reading unit is used for reading and obtaining a data access request in a preset sending buffer by using the parallel sending unit;
and the transmitting unit is used for transmitting the data access request to the target access equipment by using the parallel transmitting unit for data access.
In one embodiment of the present invention, the conversion module 4 may include:
the analyzing unit is used for analyzing the initial access request by utilizing the target decoder to obtain effective data;
and the filling unit is used for filling the effective data into a preset protocol data frame to obtain a data access request based on a preset protocol.
In one embodiment of the present invention, the conversion module 4 may further include:
the first judging unit is used for judging whether the initial access request hits the preset cache according to preset mark data when the preset mark data exists in the effective data before the effective data is filled into the preset protocol data frame to obtain the data access request based on the preset protocol;
The first feedback unit is used for feeding back hit data in the preset cache to the request terminal if the initial access request hits the preset cache;
and the first execution unit is used for executing the step of filling the effective data into a preset protocol data frame to obtain a data access request based on a preset protocol if the initial access request does not hit the preset cache.
In one embodiment of the present invention, the preset flag data may include an access data flag, and the first determining unit may be specifically configured to determine whether the access data flag hits the preset cache; if yes, determining that the initial access request hits a preset cache; if not, determining that the initial access request does not hit the preset cache.
In one embodiment of the present invention, the first feedback unit may include:
a judging subunit, configured to judge whether the hit data satisfies the initial access request;
and the feedback subunit is used for feeding the hit data back to the request terminal if the hit data meets the initial access request.
In one embodiment of the present invention, the preset flag data may include an access data start address and an access data length, and the determining subunit may be specifically configured to determine whether the start address of the hit data meets the access data start address, and whether the data length of the hit data meets the access data length; if yes, determining that hit data meets the initial access request; if not, determining that the hit data does not meet the initial access request.
In an embodiment of the present invention, the first feedback unit may further include:
a deletion subunit, configured to count, when the hit data does not satisfy the initial access request, the number of continuous hits of the hit data; and deleting hit data in a preset cache when the continuous hit times reach a first preset times.
In an embodiment of the present invention, the first execution unit may include:
a creating subunit, configured to create a data prediction model using preset flag data;
the prediction subunit is used for carrying out data prediction by utilizing the data prediction model to obtain prediction mark data;
the filling subunit is used for filling the effective data and the prediction mark data into a preset protocol data frame to obtain a data access request based on a preset protocol;
accordingly, the data access device may further include:
the cache module is used for receiving request response data fed back by the target access equipment; determining predicted access data based on the request response data; and correspondingly storing the predicted access data and the predicted mark data to a preset cache.
In an embodiment of the present invention, the first execution unit may further include:
the statistics subunit is used for counting the number of missed hits of the initial access request before the data prediction model is created by using the preset mark data; judging whether the number of missed hits reaches a second preset number of times; if yes, executing the step of creating a data prediction model by using the preset mark data.
In one embodiment of the present invention, the creating subunit may be specifically configured to obtain preset flag data of each initial access request that misses in the preset cache; sequencing each preset mark data according to the receiving sequence of each initial access request to obtain a preset mark data sequence; generating model training samples according to a preset mark data sequence, wherein each model training sample comprises two preset mark data, and the receiving sequences corresponding to the two preset mark data are adjacent; and performing model training by using all model training samples to obtain a data prediction model.
In an embodiment of the present invention, the creating subunit may be specifically configured to store each preset flag data in the first-in-first-out memory according to the receiving order of each initial access request, so as to obtain a preset flag data sequence.
In an embodiment of the present invention, the creating subunit is further configured to determine, before generating each model training sample according to the preset flag data sequence, whether the number of preset flag data in the first-in first-out memory reaches a preset number; if not, returning to the step of acquiring the preset mark data of each initial access request which does not hit the preset cache; if yes, executing the step of generating each model training sample according to the preset mark data sequence.
In an embodiment of the present invention, the prediction subunit may be specifically configured to process preset flag data by using a data prediction model to obtain initial prediction flag data; judging whether the current predicted times reach a third preset times or not; if not, the initial prediction mark data is used as preset mark data, and the step of processing the preset mark data by using the data prediction model to obtain the initial prediction mark data is returned; if yes, generating predictive flag data according to all the initial predictive flag data.
In one embodiment of the present invention, the prediction flag data may include a prediction data start address and a prediction data length, and the prediction subunit may be specifically configured to determine an initial prediction address minimum value and an initial prediction address maximum value among all the initial prediction flag data; taking a first difference value between the minimum value of the initial predicted address and a first preset parameter as a predicted data initial address; and calculating a second difference value between the initial predicted address maximum value and the initial predicted address minimum value, and taking the sum of the second difference value and a second preset parameter as the predicted data length.
In one embodiment of the present invention, the data access module may further include:
The feedback module is used for receiving target access data fed back by the target access equipment; converting the target access data into access results based on heterogeneous protocols; and sending the access result to the request terminal through the heterogeneous protocol network interface.
For the description of the apparatus provided by the embodiment of the present invention, refer to the above method embodiment, and the description of the present invention is omitted here.
The fourth embodiment of the invention provides electronic equipment.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to the present invention, where the electronic device may include:
a memory for storing a computer program;
a processor for implementing the steps of any one of the data access methods described above when executing the computer program.
As shown in fig. 6, which is a schematic diagram of a composition structure of an electronic device, the electronic device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all complete communication with each other through a communication bus 13.
In an embodiment of the present invention, the processor 10 may be a central processing unit (Central Processing Unit, CPU), an asic, a dsp, a field programmable gate array, or other programmable logic device, etc.
The processor 10 may call a program stored in the memory 11, and in particular, the processor 10 may perform operations in an embodiment of a data access method.
The memory 11 is used for storing one or more programs, and the programs may include program codes including computer operation instructions, and in the embodiment of the present invention, at least the programs for implementing the following functions are stored in the memory 11:
receiving an initial access request through a heterogeneous protocol network interface;
determining a heterogeneous protocol type according to the initial access request;
determining a target decoder corresponding to the heterogeneous protocol type;
converting the initial access request into a data access request based on a preset protocol by using a target decoder;
and sending the data access request to the target access equipment for data access.
In one possible implementation, the memory 11 may include a storage program area and a storage data area, where the storage program area may store an operating system, and at least one application program required for functions, etc.; the storage data area may store data created during use.
In addition, the memory 11 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device or other volatile solid-state storage device.
The communication interface 12 may be an interface of a communication module for interfacing with other devices or systems.
Of course, it should be noted that the structure shown in fig. 6 is not limited to the electronic device in the embodiment of the present invention, and the electronic device may include more or fewer components than those shown in fig. 6 or may be combined with some components in practical applications.
Fifth embodiment the present invention provides a computer-readable storage medium.
The computer readable storage medium provided by the embodiment of the present invention stores a computer program, which when executed by a processor, can implement the steps of any one of the data access methods described above.
The computer readable storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
For the description of the computer-readable storage medium provided in the embodiment of the present invention, refer to the above method embodiment, and the description of the present invention is omitted here.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The technical scheme provided by the invention is described in detail. The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present invention and its core ideas. It should be noted that it will be apparent to those skilled in the art that the present invention may be modified and practiced without departing from the spirit of the present invention.

Claims (20)

1. A data access method, applied to a protocol converter, comprising:
receiving an initial access request initiated by user equipment through a heterogeneous protocol network interface;
determining a heterogeneous protocol type according to the initial access request;
determining a target decoder corresponding to the heterogeneous protocol type; each heterogeneous protocol type corresponds to the decoder one by one;
converting the initial access request into a data access request based on a preset protocol by using the target decoder;
the data access request is sent to target access equipment for data access;
wherein the converting the initial access request into a data access request based on a preset protocol by using the target decoder includes: analyzing the initial access request by using the target decoder to obtain effective data; filling the effective data into a preset protocol data frame to obtain the data access request based on the preset protocol;
the method for obtaining the data access request based on the preset protocol further comprises the following steps of: when preset mark data exist in the effective data, judging whether the initial access request hits a preset cache or not according to the preset mark data; if yes, the hit data in the preset cache is fed back to the request terminal; if not, executing the step of filling the effective data into a preset protocol data frame to obtain the data access request based on the preset protocol; the preset mark data comprises an access data starting address and an access data length;
When the initial access request misses the preset cache, the filling the valid data into a preset protocol data frame to obtain the data access request based on the preset protocol, including: creating a data prediction model by using the preset mark data; carrying out data prediction by using the data prediction model to obtain prediction mark data; filling the effective data and the predictive flag data into the preset protocol data frame to obtain the data access request based on the preset protocol; when the data prediction model is created, reading each piece of preset mark data according to the corresponding receiving sequence of the initial access request;
correspondingly, after the data access request is sent to the target access device for data access, the method further comprises the following steps: receiving request response data fed back by the target access equipment; determining predicted access data based on the request response data; correspondingly storing the predicted access data and the predicted mark data to the preset cache;
the data prediction is performed by using the data prediction model to obtain prediction mark data, which comprises the following steps: processing the preset mark data by using the data prediction model to obtain initial prediction mark data; judging whether the current predicted times reach a third preset times or not; if not, the initial predictive flag data is used as the preset flag data, and the step of processing the preset flag data by using the data predictive model to obtain the initial predictive flag data is returned; if yes, generating the prediction mark data according to all the initial prediction mark data;
Wherein the prediction flag data includes a prediction data start address and a prediction data length, and the generating the prediction flag data according to all the initial prediction flag data includes: determining an initial prediction address minimum value and an initial prediction address maximum value in all the initial prediction flag data; taking a first difference value between the minimum value of the initial predicted address and a first preset parameter as the initial address of the predicted data; and calculating a second difference value between the initial predicted address maximum value and the initial predicted address minimum value, and taking the sum of the second difference value and a second preset parameter as the predicted data length.
2. The method for accessing data according to claim 1, wherein the determining the target decoder corresponding to the heterogeneous protocol type comprises:
storing the initial access request to a target receiving memory corresponding to the heterogeneous protocol type;
determining a mapping relation between the target receiving memory and a local protocol stack by using a protocol mapper;
determining a target decoder allocated for the target receiving memory according to the mapping relation;
accordingly, the converting the initial access request into a data access request based on a preset protocol by using the target decoder includes:
Reading the initial access request in the target receiving memory with the target decoder;
and converting the initial access request into the data access request based on the preset protocol.
3. The data access method of claim 2, wherein the target receiving memory is a virtual variable capacity receiving memory, the method further comprising:
real-time monitoring is carried out on the actual occupied capacity of the virtual variable capacity receiving memory;
and expanding or shrinking the capacity of the virtual variable capacity receiving memory according to the actual occupied capacity and the current total capacity.
4. A data access method according to claim 3, wherein said expanding or contracting the virtual variable capacity receiving memory according to the actual occupied capacity and the current total capacity comprises:
calculating a capacity ratio according to the actual occupied capacity and the current total capacity;
when the capacity ratio exceeds a first preset threshold value, performing capacity expansion processing on the virtual variable capacity receiving memory;
and when the capacity duty ratio is lower than a second preset threshold value, performing capacity reduction processing on the virtual variable capacity receiving memory.
5. The method of claim 4, wherein expanding the virtual variable capacity memory comprises:
performing memory address addition on the virtual variable capacity receiving memory according to a first preset proportion to realize capacity expansion processing;
accordingly, the performing the capacity reduction processing on the virtual variable capacity receiving memory includes:
and recovering the memory address of the virtual variable capacity receiving memory according to a second preset proportion to realize the capacity shrinking processing.
6. The data access method of claim 2, further comprising:
determining each heterogeneous protocol type according to the heterogeneous protocol network interface;
allocating a receiving memory for each heterogeneous protocol type, and setting a protocol flag bit for the corresponding receiving memory according to the heterogeneous protocol type;
and establishing a mapping relation between each receiving memory and the local protocol stack according to each protocol flag bit.
7. The data access method according to claim 2, wherein after the initial access request is read in the target receiving memory by the target decoder, further comprising:
And clearing the memory space of the initial access request in the target receiving memory.
8. The method of claim 1, wherein the sending the data access request to the target access device for data access comprises:
storing the data access request to a preset sending cache;
reading and obtaining the data access request in the preset sending buffer by using a parallel sending unit;
and transmitting the data access request to the target access equipment by using the parallel transmitting unit for data access.
9. The data access method according to claim 1, wherein the preset flag data includes an access data flag, and the determining whether the initial access request hits in a preset cache according to the preset flag data includes:
judging whether the access data mark hits the preset cache or not;
if yes, determining that the initial access request hits the preset cache;
if not, determining that the initial access request does not hit the preset cache.
10. The method for accessing data according to claim 1, wherein feeding hit data in the preset cache back to the requesting terminal comprises:
Judging whether the hit data meets the initial access request or not;
if yes, the hit data is fed back to the request terminal.
11. The data access method according to claim 10, wherein the preset flag data includes an access data start address and an access data length, and the determining whether the hit data satisfies the initial access request includes:
judging whether the initial address of the hit data meets the initial address of the access data and whether the data length of the hit data meets the length of the access data;
if yes, determining that the hit data meets the initial access request;
if not, determining that the hit data does not meet the initial access request.
12. The data access method of claim 10, wherein when the hit data does not satisfy the initial access request, the method further comprises:
counting the continuous hit times of the hit data;
and deleting the hit data in the preset cache when the continuous hit times reach a first preset times.
13. The data access method according to claim 1, wherein before the creating of the data prediction model using the preset flag data, further comprising:
Counting the number of missed hits of the initial access request;
judging whether the number of missed hits reaches a second preset number;
if yes, executing the step of creating a data prediction model by using the preset mark data.
14. The data access method according to claim 1, wherein creating a data prediction model using the preset flag data comprises:
acquiring the preset mark data of each initial access request which is not hit in the preset cache;
ordering the preset mark data according to the receiving sequence of the initial access request to obtain a preset mark data sequence;
generating model training samples according to the preset mark data sequences, wherein each model training sample comprises two preset mark data, and the receiving sequences corresponding to the two preset mark data are adjacent;
and performing model training by using all the model training samples to obtain the data prediction model.
15. The method according to claim 14, wherein the sorting the preset flag data according to the receiving order of the initial access requests to obtain the preset flag data sequence includes:
And storing the preset mark data into a first-in first-out memory according to the receiving sequence of the initial access request to obtain the preset mark data sequence.
16. The method for accessing data according to claim 15, further comprising, before generating each model training sample from the predetermined flag data sequence:
judging whether the number of the preset mark data in the first-in first-out memory reaches a preset number or not;
if not, returning to the step of acquiring the preset mark data of each initial access request of the preset cache;
and if yes, executing the step of generating each model training sample according to the preset mark data sequence.
17. The data access method of claim 1, further comprising:
receiving target access data fed back by the target access equipment;
converting the target access data into an access result based on the heterogeneous protocol;
and sending the access result to a request terminal through the heterogeneous protocol network interface.
18. A data access device, for use in a protocol converter, comprising:
The receiving module is used for receiving the initial access request through the heterogeneous protocol network interface;
the first determining module is used for determining the heterogeneous protocol type according to the initial access request;
the second determining module is used for determining a target decoder corresponding to the heterogeneous protocol type; each heterogeneous protocol type corresponds to the decoder one by one;
the conversion module is used for converting the initial access request into a data access request based on a preset protocol by utilizing the target decoder;
the sending module is used for sending the data access request to target access equipment for data access;
wherein, the conversion module includes:
the analyzing unit is used for analyzing the initial access request by utilizing the target decoder to obtain effective data;
the filling unit is used for filling the effective data into a preset protocol data frame to obtain the data access request based on the preset protocol;
wherein the conversion module further comprises:
the first judging unit is used for judging whether the initial access request hits a preset cache or not according to preset mark data when the preset mark data exists in the effective data before the effective data is filled into a preset protocol data frame to obtain the data access request based on a preset protocol;
The first feedback unit is used for feeding hit data in the preset cache back to the request terminal if the initial access request hits the preset cache;
the first execution unit is used for executing the step of filling the effective data into a preset protocol data frame to obtain the data access request based on a preset protocol if the initial access request does not hit the preset cache; the preset mark data comprises an access data starting address and an access data length;
wherein the first execution unit includes:
a creating subunit, configured to create a data prediction model using the preset flag data;
the prediction subunit is used for carrying out data prediction by utilizing the data prediction model to obtain prediction mark data;
a filling subunit, configured to fill the valid data and the prediction flag data into the preset protocol data frame, and obtain the data access request based on the preset protocol; when the data prediction model is created, reading each piece of preset mark data according to the corresponding receiving sequence of the initial access request;
correspondingly, the device further comprises:
the caching module is used for receiving request response data fed back by the target access equipment; determining predicted access data based on the request response data; correspondingly storing the predicted access data and the predicted mark data to the preset cache;
The prediction subunit is specifically configured to process the preset flag data by using the data prediction model to obtain initial prediction flag data; judging whether the current predicted times reach a third preset times or not; if not, the initial predictive flag data is used as the preset flag data, and the step of processing the preset flag data by using the data predictive model to obtain the initial predictive flag data is returned; if yes, generating the prediction mark data according to all the initial prediction mark data;
wherein the prediction flag data comprises a prediction data start address and a prediction data length, and the prediction subunit is specifically configured to determine an initial prediction address minimum value and an initial prediction address maximum value from all initial prediction flag data; taking a first difference value between the minimum value of the initial predicted address and a first preset parameter as a predicted data initial address; and calculating a second difference value between the initial predicted address maximum value and the initial predicted address minimum value, and taking the sum of the second difference value and a second preset parameter as the predicted data length.
19. An electronic device, comprising:
A memory for storing a computer program;
a processor for implementing the steps of the data access method according to any one of claims 1 to 17 when executing said computer program.
20. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the data access method according to any of claims 1 to 17.
CN202310974630.8A 2023-08-04 2023-08-04 Data access method, device, electronic equipment and computer readable storage medium Active CN116708579B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310974630.8A CN116708579B (en) 2023-08-04 2023-08-04 Data access method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310974630.8A CN116708579B (en) 2023-08-04 2023-08-04 Data access method, device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN116708579A CN116708579A (en) 2023-09-05
CN116708579B true CN116708579B (en) 2024-01-12

Family

ID=87826149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310974630.8A Active CN116708579B (en) 2023-08-04 2023-08-04 Data access method, device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116708579B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117539912A (en) * 2023-11-23 2024-02-09 武汉软件工程职业学院(武汉开放大学) System, method and equipment for accelerating heterogeneous data source access

Citations (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106557427A (en) * 2015-09-25 2017-04-05 中兴通讯股份有限公司 The EMS memory management process and device of shared drive data base
CN107835178A (en) * 2017-11-13 2018-03-23 北京奇艺世纪科技有限公司 A kind of multi-protocols communication for service method, apparatus and electronic equipment
CN108737259A (en) * 2018-05-08 2018-11-02 平安证券股份有限公司 Gateway device, data transmission method and storage medium
CN109005056A (en) * 2018-07-16 2018-12-14 网宿科技股份有限公司 Storage capacity evaluation method and apparatus based on CDN application
CN109597915A (en) * 2018-09-18 2019-04-09 北京微播视界科技有限公司 Access request treating method and apparatus
CN109815214A (en) * 2018-12-29 2019-05-28 深圳云天励飞技术有限公司 Data bank access method, system, device and storage medium
WO2019120037A1 (en) * 2017-12-18 2019-06-27 Oppo广东移动通信有限公司 Model construction method, network resource preloading method and apparatus, medium, and terminal
CN110351283A (en) * 2019-07-16 2019-10-18 腾讯科技(深圳)有限公司 A kind of data transmission method, device, equipment and storage medium
CN110414260A (en) * 2018-11-20 2019-11-05 腾讯科技(深圳)有限公司 A kind of data access method, device, system and storage medium
CN111600909A (en) * 2020-06-24 2020-08-28 腾讯科技(深圳)有限公司 Data processing method, device, protocol conversion equipment and storage medium
CN111737527A (en) * 2020-06-29 2020-10-02 中国南方电网有限责任公司 Data processing method and device for heterogeneous terminal, electronic equipment and storage medium
CN112153071A (en) * 2020-09-30 2020-12-29 深圳市腾讯计算机系统有限公司 Message sending method, device, gateway and storage medium
CN112261010A (en) * 2020-09-29 2021-01-22 山东特检鲁安工程技术服务有限公司 Special equipment multi-protocol conversion system, terminal and readable storage medium
CN112311664A (en) * 2020-11-18 2021-02-02 昆高新芯微电子(江苏)有限公司 Industrial Internet data interaction method and system and industrial gateway
CN113918508A (en) * 2021-12-15 2022-01-11 苏州浪潮智能科技有限公司 Cache acceleration method, device, equipment and readable storage medium
CN114124883A (en) * 2021-10-12 2022-03-01 鸬鹚科技(深圳)有限公司 Data access method and device based on cloud storage address, computer equipment and medium
CN114138687A (en) * 2021-11-30 2022-03-04 新华三大数据技术有限公司 Data prefetching method and device, electronic equipment and storage medium
CN114722025A (en) * 2022-03-10 2022-07-08 平安科技(深圳)有限公司 Data prediction method, device and equipment based on prediction model and storage medium
CN115470157A (en) * 2021-06-10 2022-12-13 华为技术有限公司 Prefetching method, electronic device, storage medium, and program product
CN115617855A (en) * 2022-10-25 2023-01-17 平安科技(深圳)有限公司 Cache control method and device, electronic equipment and storage medium
CN115842868A (en) * 2022-11-01 2023-03-24 长城汽车股份有限公司 Interface data conversion method, device, storage medium and vehicle-mounted communication equipment
CN116320061A (en) * 2023-03-28 2023-06-23 深圳市深信服信息安全有限公司 Resource access method, electronic equipment and computer readable storage medium
CN116303590A (en) * 2023-02-06 2023-06-23 杭州隆埠科技有限公司 Cache data access method, device, equipment and storage medium
CN116450287A (en) * 2023-03-20 2023-07-18 天翼云科技有限公司 Method, device, equipment and readable medium for managing storage capacity of service container
CN116483738A (en) * 2023-06-20 2023-07-25 苏州浪潮智能科技有限公司 Data access method and device, storage medium and electronic device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060130120A (en) * 2004-03-24 2006-12-18 마쯔시다덴기산교 가부시키가이샤 Cache memory and control method thereof

Patent Citations (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106557427A (en) * 2015-09-25 2017-04-05 中兴通讯股份有限公司 The EMS memory management process and device of shared drive data base
CN107835178A (en) * 2017-11-13 2018-03-23 北京奇艺世纪科技有限公司 A kind of multi-protocols communication for service method, apparatus and electronic equipment
WO2019120037A1 (en) * 2017-12-18 2019-06-27 Oppo广东移动通信有限公司 Model construction method, network resource preloading method and apparatus, medium, and terminal
CN108737259A (en) * 2018-05-08 2018-11-02 平安证券股份有限公司 Gateway device, data transmission method and storage medium
CN109005056A (en) * 2018-07-16 2018-12-14 网宿科技股份有限公司 Storage capacity evaluation method and apparatus based on CDN application
CN109597915A (en) * 2018-09-18 2019-04-09 北京微播视界科技有限公司 Access request treating method and apparatus
CN110414260A (en) * 2018-11-20 2019-11-05 腾讯科技(深圳)有限公司 A kind of data access method, device, system and storage medium
CN109815214A (en) * 2018-12-29 2019-05-28 深圳云天励飞技术有限公司 Data bank access method, system, device and storage medium
CN110351283A (en) * 2019-07-16 2019-10-18 腾讯科技(深圳)有限公司 A kind of data transmission method, device, equipment and storage medium
CN111600909A (en) * 2020-06-24 2020-08-28 腾讯科技(深圳)有限公司 Data processing method, device, protocol conversion equipment and storage medium
CN111737527A (en) * 2020-06-29 2020-10-02 中国南方电网有限责任公司 Data processing method and device for heterogeneous terminal, electronic equipment and storage medium
CN112261010A (en) * 2020-09-29 2021-01-22 山东特检鲁安工程技术服务有限公司 Special equipment multi-protocol conversion system, terminal and readable storage medium
CN112153071A (en) * 2020-09-30 2020-12-29 深圳市腾讯计算机系统有限公司 Message sending method, device, gateway and storage medium
CN112311664A (en) * 2020-11-18 2021-02-02 昆高新芯微电子(江苏)有限公司 Industrial Internet data interaction method and system and industrial gateway
CN115470157A (en) * 2021-06-10 2022-12-13 华为技术有限公司 Prefetching method, electronic device, storage medium, and program product
CN114124883A (en) * 2021-10-12 2022-03-01 鸬鹚科技(深圳)有限公司 Data access method and device based on cloud storage address, computer equipment and medium
CN114138687A (en) * 2021-11-30 2022-03-04 新华三大数据技术有限公司 Data prefetching method and device, electronic equipment and storage medium
CN113918508A (en) * 2021-12-15 2022-01-11 苏州浪潮智能科技有限公司 Cache acceleration method, device, equipment and readable storage medium
CN114722025A (en) * 2022-03-10 2022-07-08 平安科技(深圳)有限公司 Data prediction method, device and equipment based on prediction model and storage medium
CN115617855A (en) * 2022-10-25 2023-01-17 平安科技(深圳)有限公司 Cache control method and device, electronic equipment and storage medium
CN115842868A (en) * 2022-11-01 2023-03-24 长城汽车股份有限公司 Interface data conversion method, device, storage medium and vehicle-mounted communication equipment
CN116303590A (en) * 2023-02-06 2023-06-23 杭州隆埠科技有限公司 Cache data access method, device, equipment and storage medium
CN116450287A (en) * 2023-03-20 2023-07-18 天翼云科技有限公司 Method, device, equipment and readable medium for managing storage capacity of service container
CN116320061A (en) * 2023-03-28 2023-06-23 深圳市深信服信息安全有限公司 Resource access method, electronic equipment and computer readable storage medium
CN116483738A (en) * 2023-06-20 2023-07-25 苏州浪潮智能科技有限公司 Data access method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN116708579A (en) 2023-09-05

Similar Documents

Publication Publication Date Title
US11467975B2 (en) Data processing method and NVMe storage device
CN116708579B (en) Data access method, device, electronic equipment and computer readable storage medium
CN1208935C (en) Processing data packets
US9300752B2 (en) Opportunistic block transmission with time constraints
CN111327603B (en) Data transmission method, device and system
CN102244579B (en) Network interface card and method for receiving network data
CN110087140B (en) Method, device, medium and equipment for transmitting stream media data
KR20210086420A (en) Neural network data processing apparatus, method and electronic device
CN101848239B (en) High-timeliness distributed service integration calling system
CN116782185B (en) Resource scheduling method and device for vehicle-mounted wireless short-distance communication
CN113468090B (en) PCIe communication method and device, electronic equipment and readable storage medium
CN113141321A (en) Data transmission method based on edge calculation and electronic equipment
CN104135496A (en) Method and device of RPC (Remote Procedure Call) data transmission under homogeneous environment
CN117478680B (en) Terminal data stream transmission remote control method and system based on Internet of things management platform
CN113411380B (en) Processing method, logic circuit and equipment based on FPGA (field programmable gate array) programmable session table
CN101064697A (en) Apparatus and method for realizing asynchronous transmission mode network service quality control
CN107846328B (en) Network rate real-time statistical method based on concurrent lock-free ring queue
CN116303173A (en) Method, device and system for reducing RDMA engine on-chip cache and chip
US20160085683A1 (en) Data receiving device and data receiving method
CN112131161B (en) Hardware analysis method for Binary protocol data stream
CN103747253B (en) A kind of video data encoder transmission method based on FIFO
CN110856144B (en) LT code-based atomization caching method in mobile edge computing network
WO2017173844A1 (en) Directory reading method, apparatus and system
CN103685377A (en) Web optimization and acceleration method and system
Liao et al. Optimized design and implementation of TCP/IP software architecture based on embedded system

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
GR01 Patent grant
GR01 Patent grant