Data storage system and method, and storage medium and electronic device

By generating configuration files at the control end of the data storage system, and generating encapsulation rules and extraction units at the client and server ends, the problem of insufficient flexibility of existing programmable network systems in byte stream storage services is solved, and dynamic network configuration and fast storage are realized.

WO2024254933A1PCT designated stage expired Publication Date: 2024-12-19ZHEJIANG LAB
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/107329
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-14
Filing Date
2023-07-13
Publication Date
2024-12-19

AI Technical Summary

Technical Problem

Existing programmable network systems cannot perform dynamic network configuration design and updates when facing byte stream storage services, resulting in insufficient flexibility and difficulty in meeting users' dynamic design and deployment needs.

Method used

A data storage system is provided, including a server, a client, and a control terminal. The control terminal generates a configuration file, and the client and server generate encapsulation rules and extraction units based on the configuration file to achieve dynamic storage of byte stream data.

Benefits of technology

It enables flexible and rapid storage of byte stream data, responds to users' ever-changing service needs, shortens development and deployment time, and adapts to complex application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023107329_19122024_PF_FP_ABST
    Figure CN2023107329_19122024_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a data storage system and method, and a storage medium and an electronic device. The data storage system comprises a server, a client and a control end, wherein the control end is used for generating a configuration file according to programming information, and sending the configuration file to the client and the server; the client is used for generating an encapsulation rule according to the configuration file, generating a storage request, encapsulating the storage request on the basis of the encapsulation rule to obtain a message packet, and sending the message packet to the server; and the server is used for generating extraction units and action units according to the configuration file, parsing the message packet, writing target information into each extraction unit, reading action information from a specified extraction unit, determining an action unit matching the action information to serve as a target action unit, and executing a storage action corresponding to the target action unit, so as to store byte stream data of the target information.
Need to check novelty before this filing date? Find Prior Art

Description

Data storage system, method, storage medium and electronic device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application No. 202310705249.1, filed on June 14, 2023, which is incorporated herein by reference. Technical Field

[0003] The present disclosure relates to the field of computer technology, and in particular to a data storage system, method, storage medium, and electronic device. Background Art

[0004] In recent years, programmable network systems represented by Software Defined Network (SDN) are emerging. Compared with traditional networks, programmable network systems can quickly implement customized design and deployment of network protocols, network topology and other services based on users' ever-changing needs, thereby breaking free from the limitations of hardware on network architecture.

[0005] However, current programmable networks mainly focus on forwarding network requests. When it comes to byte stream storage services, they cannot dynamically design and update the network configuration of storage services. This lacks flexibility and makes it difficult to meet the needs of users (developers) for dynamic design and deployment of storage services.

[0006] Therefore, how to achieve dynamic programming and updating of network byte stream storage services to meet users' dynamic design and deployment needs is an urgent problem to be solved.

[0007] Summary of the Invention

[0008] The present disclosure provides a data storage system, method, storage medium and electronic device to partially solve the above-mentioned problems existing in the prior art.

[0009] This disclosure adopts the following technical solutions:

[0010] The present disclosure provides a data storage system, comprising: a server, a client, and a control terminal;

[0011] The control end is used to provide a programming environment for the first user, generate a configuration file according to the programming information written by the first user in the programming environment, and send the configuration file to the client and the server;

[0012] The client is configured to receive the configuration file, generate an encapsulation rule based on first configuration information in the configuration file, and generate a storage request corresponding to a byte stream of target information in response to a specified operation by a second user, encapsulate the storage request based on the encapsulation rule to obtain a message message, and send the message message to the server;

[0013] The server is configured to receive the configuration file, generate at least one extraction unit matching the encapsulation rule according to the second configuration information in the configuration file, generate at least one set of action units corresponding to the storage action according to the third configuration information in the configuration file, and

[0014] After receiving the message message, the message message is parsed to obtain the target information, the target information is written into each extraction unit, the action information is read from the designated extraction unit and the action unit that matches the action information is determined as the target action unit, and the storage action corresponding to the target action unit is executed to store the byte stream data of the target information.

[0015] Optionally, the client includes: a programmable packaging module and a packaging instruction set;

[0016] The programmable encapsulation module is configured to load the configuration file, generate at least one encapsulation unit according to the first configuration information, and sort the encapsulation units to obtain the encapsulation rule;

[0017] The encapsulation instruction set is used to abstract operations involved in the process of encapsulating the byte stream of the target information according to the encapsulation rule.

[0018] Optionally, the server includes: a programmable extraction module, a programmable action module and a programmable service module;

[0019] The programmable extraction module is configured to load the configuration file, generate each extraction unit according to the second configuration information, and parse the message according to the configuration file to extract the target information and write it into the extraction register corresponding to each extraction unit;

[0020] The programmable action module is configured to load the configuration file, select target instructions from a preset action instruction set according to the third configuration information, combine stored actions corresponding to the target instructions, and generate action units according to the groups of stored actions;

[0021] The programmable service module is used to load the configuration file, and according to the fourth configuration information in the configuration file, use the action information stored in the extraction register corresponding to the designated extraction unit as a matching object and determine a matching value, and match the target action unit according to the matching value.

[0022] Optionally, the server is further configured to update configurations corresponding to the programmable extraction module, the programmable action module, and the programmable service module according to the configuration file.

[0023] Optionally, the configuration of the programmable extraction module includes: extraction position offset, extraction character length, extraction terminator, and associated extraction register;

[0024] The offset includes a fixed value and a variable value, and the variable value is determined based on the terminator;

[0025] The character length includes a fixed length and a variable length, and the variable length is determined based on the terminator.

[0026] Optionally, the programmable action module includes: a basic action table and an action unit, and the action unit is used to select a storage action corresponding to a specified register from the basic action table and perform association.

[0027] Optionally, the server is further configured to:

[0028] generating a service table according to the fourth configuration information in the configuration file, and associating each designated extraction unit with each action unit in the service table, and

[0029] The service table is retrieved according to the action information in the designated extraction unit, and the action unit retrieved from the service table is used as the target action unit.

[0030] Optionally, the server is further configured to return the execution result of the storage action corresponding to the target action unit to the client.

[0031] The present disclosure provides a data storage method, the method comprising:

[0032] The server obtains a message message sent by the client, parses the message message, and obtains target information, wherein the message message is a storage request corresponding to a byte stream of the target information generated by the client in response to a specified operation of the second user, and the storage request is encapsulated based on an encapsulation rule, wherein the encapsulation rule is generated based on first configuration information in a configuration file sent by the control end, and the configuration file is generated by the control end based on programming information written by the first user in a programming environment;

[0033] Writing the target information into each extraction unit;

[0034] Reading action information from a designated extraction unit and determining an action unit that matches the action information as a target action unit, wherein the server includes at least one extraction unit generated according to the second configuration information in the configuration file and at least one action unit generated according to the third configuration information in the configuration file, each extraction unit matches the encapsulation rule, and each action unit corresponds to a set of stored actions;

[0035] Execute the storage action corresponding to the target action unit to store the byte stream data of the target information.

[0036] Optionally, the client includes: a programmable packaging module and a packaging instruction set;

[0037] The encapsulation rules are obtained after the programmable encapsulation module loads the configuration file, generates at least one encapsulation unit according to the first configuration information, and sorts the encapsulation units. The operations involved in the encapsulation of the byte stream of the target information by the encapsulation rules are abstracted through the encapsulation instruction set.

[0038] Optionally, the server is provided with at least one of a programmable action module and a programmable service module;

[0039] Before parsing the message, the method further includes:

[0040] The configuration file is loaded by the programmable action module in the server, target instructions are selected from a preset action instruction set according to the third configuration information, the stored actions corresponding to the target instructions are combined, and action units are generated according to the groups of stored actions;

[0041] Reading action information from a designated extraction unit and determining an action unit matching the action information includes:

[0042] The configuration file is loaded through the programmable service module in the server, and according to the fourth configuration information in the configuration file, the action information stored in the extraction register corresponding to the specified extraction unit is used as a matching object and a matching value is determined, and the target action unit is matched according to the matching value.

[0043] Optionally, the server is further provided with: a programmable extraction module;

[0044] The method further comprises:

[0045] According to the configuration file, the configurations corresponding to the programmable extraction module, the programmable action module and the programmable service module are updated.

[0046] Optionally, the configuration of the programmable extraction module includes: extraction position offset, extraction character length, extraction terminator and associated extraction register, the offset includes a fixed value and a variable value, the variable value is determined based on the terminator, the character length includes a fixed length and a variable length, and the variable length is determined based on the terminator.

[0047] Optionally, the programmable action module includes: a basic action table and an action unit;

[0048] Generating the action units according to the groups of stored actions includes:

[0049] The action unit selects a storage action corresponding to a designated register from the basic action table and associates the action.

[0050] Optionally, before parsing the message, the method further includes:

[0051] generating a service table according to the fourth configuration information in the configuration file, and associating each designated extraction unit with each action unit in the service table;

[0052] Reading action information from a designated extraction unit and determining an action unit that matches the action information as a target action unit includes:

[0053] The service table is retrieved according to the action information in the designated extraction unit, and the action unit retrieved from the service table is used as the target action unit.

[0054] Optionally, the method further includes:

[0055] The execution result of the storage action corresponding to the target action unit is returned to the client.

[0056] The present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned data storage method is implemented.

[0057] The present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned data storage method when executing the program.

[0058] At least one of the above technical solutions adopted in the present disclosure can achieve the following beneficial effects:

[0059] The data storage system provided in the present disclosure includes: a server, a client and a control end. The control end is used to generate a configuration file based on programming information and send the configuration file to the client and the server; the client is used to generate encapsulation rules based on the configuration file, and generate a storage request, encapsulate the storage request based on the encapsulation rules, obtain a message message, and send the message message to the server; the server is used to generate an extraction unit and an action unit based on the configuration file, and parse the message message, write the target information into each extraction unit, read the action information from the specified extraction unit and determine the action unit that matches the action information as the target action unit, execute the storage action corresponding to the target action unit, and store the byte stream data of the target information.

[0060] It can be seen from the above method that in this solution, the second user can configure the server and the client at any time on the control end to generate encapsulation rules on the client and abstract the action unit and the extraction unit on the server, and then perform programmable function configuration and scheduling on each abstracted module to realize a byte stream data storage service that can be dynamically updated and edited, so that developers can add or modify encapsulation rules and storage actions by themselves, and can flexibly and quickly respond to users' changing service needs, shorten development and deployment time, and adapt to more complex application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:

[0062] FIG1 is a schematic structural diagram of a data storage system provided in the present disclosure;

[0063] FIG2 is a schematic diagram of a process of a client sending a message provided in the present disclosure;

[0064] FIG3 is a schematic diagram of a message parsing process provided in the present disclosure;

[0065] FIG4 is a schematic diagram of a configuration structure of an action unit provided in the present disclosure;

[0066] FIG5 is a schematic diagram of the structure of a service table provided in the present disclosure;

[0067] FIG6 is a flowchart of a data storage method provided in the present disclosure;

[0068] FIG7 is a schematic diagram of an electronic device provided by the present disclosure corresponding to FIG6 . DETAILED DESCRIPTION

[0069] To make the objectives, technical solutions, and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below in conjunction with the specific embodiments of the present disclosure and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present disclosure.

[0070] The technical solutions provided by various embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0071] FIG1 is a schematic diagram of a data storage system provided in the present disclosure, wherein the data storage system includes a client, a server, and a control terminal.

[0072] In some embodiments, the control end, the server end, and the client end can be implemented by different computer devices. The control end is used to provide a programming environment for a first user, convert the programming information written by the first user in the programming environment into a configuration file, and send the configuration file to the client end and the server end respectively. In the present disclosure, the first user can be a developer or manager of the business system.

[0073] The above-mentioned programming environment includes direct programming and indirect programming. For direct programming, the first user (developer) can directly write a configuration file and then directly send the configuration file through the control terminal, which is equivalent to the process of computer programming in machine code or assembly language. For indirect programming, the first user first develops a compilation environment and then programs in a high-level language. After the programming is completed, the programming results are compiled through the compilation environment, and the configuration file is generated and then sent through the control terminal. There are many mature solutions for indirect programming methods for reference, such as the P4 programming and compilation system currently used for programmable switches. In the present disclosure, the first user can write a configuration file through direct programming.

[0074] In the present disclosure, the configuration file format can be JavaScript Object Notation (JSON), thereby reusing existing JSON processing libraries and related interfaces. The control end encapsulates the JSON string in the configuration file within the message body of a Transmission Control Protocol (TCP) message and sends it to the client and server via a TCP socket. The client and server transceiver modules maintain a multiplexed socket list to constantly monitor JSON configuration information from the control end.

[0075] The client includes a user interaction interface, a transceiver module, a programmable encapsulation module, an encapsulation instruction set and an encapsulation register. During the configuration of the storage system, the client can receive the configuration file sent by the control end, call the programmable encapsulation module resources according to the first configuration information in the configuration file, generate encapsulation rules, and provide an interactive interface for the second user who executes the network byte stream storage service.

[0076] During the execution of the storage request, the client can generate a network byte stream storage request in response to the second user's specified operation (e.g., a storage operation); encapsulate the storage request according to the aforementioned encapsulation rule to generate a network message; send the message to the server and receive a response from the server; and feed the received response back to the user via an interactive interface with the second user. It should be noted that since the encapsulation rule is composed of multiple encapsulation units, the encapsulation rule can be represented as a list of multiple encapsulation units.

[0077] The client's user interaction interface is used to receive the user's service request, store the user request information in the encapsulation register, and then feed back the system's response result to the user.

[0078] The transceiver module is used to establish a communication connection between the control end and the server end, receive the configuration file sent by the control end, and send and receive messages with the server end.

[0079] The programmable encapsulation module is used to load the configuration file sent by the control end, generate an encapsulation unit with a unique identifier according to the first configuration information in the configuration file, sort the encapsulation units to generate encapsulation rules, and encapsulate the storage request corresponding to the byte stream of the target information according to the encapsulation rules.

[0080] The encapsulation instruction set is used to abstract operations involved in the process of encapsulating the byte stream of the target information according to the encapsulation rules, including but not limited to extracting field length, converting between integers and strings, and copying strings.

[0081] The encapsulation register is used to store the storage request information input by the second user.

[0082] Specifically, the client runs an interactive interface with the user, obtains a byte stream of target information, segments the byte stream input by the second user into byte segments using spaces, and uses a line break character as the terminator for the single input byte stream. After segmentation, the client invokes an encapsulation unit to fill in the segmented byte segments with information. After information filling is complete, the client's transceiver module encapsulates the information in the encapsulation unit into a message message and sends it to the server. For ease of understanding, the present disclosure provides a schematic diagram of the process of a client sending a message message, as shown in Figure 2.

[0083] FIG2 is a schematic diagram of a process of a client sending a message provided in the present disclosure.

[0084] Among them, the code of the first configuration information in the configuration file can be expressed as: {"name":"programmableBuild","version":1, "fields":[{"name":"itemNumBegin","length":3,"value":"*\r\n"}, {"name":"itemNum","value":{"command":"toString","parameter": {"command":"getNum","parameter":"B0"}}, "terminator":"\r\n""terminatorLength":2}, {"name":"itemBegin","length":1,"value":"$"}, {"name":"item","value":{"command":"toString","parameter": {"command":"getLength","parameter":"B1"}}"terminator":"\r\n""terminatorLength":2}]}

[0085] The client's transceiver module obtains a configuration file in json format. The value of the "fields" item in the first configuration information is an array type. Each item in the array corresponds to the configuration of an encapsulation unit. The configuration of the encapsulation unit mainly includes length information and content information. Length information is divided into two types: fixed length and variable length, and content information also includes two types: fixed content and variable content. For example, the encapsulation unit 0 in the encapsulation rule table in Figure 2 is fixed with a length of three bytes to fill in the acii characters '*', '\r' and '\n'. In this encapsulation unit, int length = 1, char*buf = "*", which is used to mark the beginning of the entire byte stream service request.

[0086] Encapsulation unit 1 in the encapsulation rule table uses a variable-length and variable-content type. It calls the toString encapsulation instruction, converting the int type information in encapsulation register B0 into a string and inserting it into its own buf. In this encapsulation unit, int length = 1, char* buf = "3," and the values ​​are assigned after calling the cmd interface, expressed as: cmd_t* cmd = toString(getNum(B0)).

[0087] The encapsulation register is used to store the target information entered by the first user. When the first user enters a storage request corresponding to the network byte stream "set hello world," B0 is used to store a fixed number of information items corresponding to the byte stream request entered by the user. B1 through Bn sequentially store the contents of each information item entered by the user. In this embodiment, client user interaction utilizes command-line interaction, with spaces used as delimiters for each information item and newlines used as terminators for each interaction command.

[0088] The encapsulated instruction set is a series of pre-defined interface functions that encapsulate behavioral actions. The encapsulated instruction set may include logical actions such as get Num, get Length, get String, and to String.

[0089] There are two types of input parameters for the interface function, namely the contents of the encapsulation register or the return value of other interface functions; correspondingly, the return value of the interface function also has two uses, one is as an input parameter of other interface functions, and the other is written into the content buffer of the encapsulation unit.

[0090] In practical applications, the encapsulated instruction set, encapsulated registers, and encapsulated units can be defined as structures if implemented in C or Go, and can be defined as classes if implemented in C++ or Python. The present disclosure can use C language to implement a client with basic functions, additionally define structures such as encapsulated registers, and connect the encapsulated units defined in the configuration file into a sequential linked list. As shown in Figure 2, when the user enters the byte stream storage request of "SET HELLO WORLD", the information in the response encapsulation register, encapsulation rule table, and encapsulation unit is filled as shown in Figure 2. Finally, the transceiver module splices the message string "*3\r\n$3\r\nset\r\n$5\r\nhello\r\n$5\r\n world\r\n" according to the information in the encapsulation rule table, and then sends it to the server.

[0091] The server includes a transceiver module, a programmable extraction module, a programmable action module, and a programmable service module. During the configuration of the storage system, the server can receive a configuration file sent by the control terminal, call programmable extraction module resources according to the second configuration information in the configuration file to generate multiple extraction units with unique identifiers, call programmable action module resources according to the third configuration information in the configuration file to generate multiple action units with unique identifiers, generate a service table according to the fourth configuration information in the configuration file, and associate the service table information with the specified extraction unit and each action unit in the service table. The information stored in the extraction register of the specified extraction unit is used to indicate the storage action corresponding to the storage request.

[0092] In the process of executing a storage request, the server can receive message packets from the client, obtain network messages, call the programmable extraction module interface, write information to each extraction unit, retrieve the service table based on the information in the specified extraction unit, obtain the associated action unit, execute the action in the action unit, and feed back the execution results to the client through the transceiver module.

[0093] The transceiver module is used to send and receive messages with the client.

[0094] The programmable extraction module is used to load the configuration file issued by the control terminal and parse the storage request message received from the client according to the second configuration information in the configuration file to extract the target information corresponding to the storage request. The extracted target information is then stored in the extraction register corresponding to each extraction unit.

[0095] The programmable action module is used to load the configuration file sent by the control end, and select the storage actions corresponding to the target instructions from the action instruction set according to the third configuration information in the configuration file to combine them, thereby forming a set of logical action combinations, and uniquely identify or name each group of storage actions to form an action unit.

[0096] It should be noted that the programmable action module is provided with a basic action table and the above-mentioned action unit, and the action unit selects the storage action corresponding to the specified register from the basic action table and associates them.

[0097] The programmable service module is used to construct a service table. According to the fourth configuration information in the configuration file, the action information stored in the extraction register corresponding to the specified extraction unit is used as a matching object and a matching value is determined. The target action unit is matched according to the matching value. When the matching is completed, the storage action in the target action unit is executed.

[0098] After receiving the configuration file, the server updates the configuration of the programmable extraction module, including the extraction position offset, extraction character length, extraction terminator, and associated extraction registers. The offset includes fixed and variable values, with the variable value being based on the terminator for positioning. The extraction character length includes fixed and variable lengths, with the variable length being calculated based on the terminator. For ease of understanding, the present disclosure provides a schematic diagram of the message parsing process, as shown in Figure 3.

[0099] FIG3 is a schematic diagram of a message parsing process provided in the present disclosure.

[0100] The code of the second configuration information can be expressed as: {"name":"Programmable Extract","version":1,"fields":[{"offset":0,"length":1,"register":"E0"}, {"offset":3,"length":0,"terminator":"\r\n","terminatorLength":2,"register":"E1"}, {"offset":0,"length":3,"register":"E2"}, {"offset":3,"length":0,"terminator":"\r\n","terminatorLength":2,"register":"E1"},…]}

[0101] In the programmable extraction module, each extraction register is defined as a structure, corresponding to an extraction unit. The message structure contains two parts: status information and data buffer. The programmable extraction module sequentially extracts data from specific fields in the byte stream into the data buffer of the extraction register and updates the corresponding status information. The structures of multiple extraction registers form a list to facilitate subsequent traversal operations.

[0102] After receiving the configuration file, the server updates the configuration of the programmable action module. The programmable action unit includes a basic action table and an action unit. The action unit selects a specific action from the basic action table, associates it with the specified extraction register, and uniquely identifies or names it, thereby obtaining the action unit configuration. For ease of understanding, this disclosure also provides a schematic diagram of the action unit configuration structure, as shown in Figure 4.

[0103] FIG4 is a schematic diagram of a configuration structure of an action unit provided in the present disclosure.

[0104] The code of the third configuration information can be expressed as: {"name":"programmable Action","version":1, "actions":[{"name":"setStrAct","action":"setStr","parameters":"E7,E10"}, {"name":"getStrAct","action":"getStr","parameters":"E7"}…]}

[0105] Among them, the actions in the basic action table are abstractions of various data storage actions, including access to string and dictionary type data, setting timeouts, etc. According to the third information in the configuration file, multiple action units are set. Figure 4 lists the configurations of four action units, respectively selecting actions in the basic action table such as setStr, getStr, setDict, getDict, and selecting specific extraction registers as parameters. In fact, the basic action table is implemented using a structure, and the items in the structure are function pointers, corresponding to the action names of the encapsulated instruction set in Figure 2. The specific implementation of the function can directly reuse encapsulated libraries such as the go language.

[0106] After the server receives the configuration file, the server can update the programmable service module configuration according to the fourth configuration information in the configuration file, specifically including constructing a service table, including a matching register, a matching value and action information. The matching register is the register corresponding to the above-mentioned specified extraction unit, the matching value is obtained from the configuration file and written into the service table, and the action information is the action unit with a unique identifier or name.

[0107] The server can use the action information stored in the extraction register (matching register) corresponding to the specified extraction unit as a matching object and determine a matching value. The server then matches the target action unit based on the matching value. When the match is completed, the action stored in the target action unit is executed. For ease of understanding, the present disclosure provides a schematic diagram of the structure of a service table, as shown in Figure 5.

[0108] FIG5 is a schematic diagram of the structure of a service table provided in the present disclosure.

[0109] The code of the fourth configuration file can be expressed as: {"name":"programmableServe","version":1, "serve"[{"name":"setStr","matchRegister":"E4","matchValue":"set","action":"setStrAct"}, {"name":"getStr","matchRegister":"E4","matchValue":"get","action":"getStrAct"}…]}

[0110] The service table associates extraction registers, action units, and result registers using "matching values." This embodiment implements the service table using the Go language's map data structure. The keys in the map table are matching values, which can include "set," "get," "hset," "hget," and so on. These matching values ​​are bound to specific extraction registers. In Figure 5 , extraction register E4 is set as the matching register. Based on the aforementioned information, E4 stores the first word of the command line entered by the second user.

[0111] When information is written into E4, the programmable service unit queries the service table according to the information in E4, obtains the action information, and signs the defined programmable action unit, executes the related action logic, and writes the result into the result register R1.

[0112] After the server obtains the execution result, it returns it to the client through the transceiver module.

[0113] After executing the action unit, the server can determine whether the current storage action was executed successfully based on the return value of the set function. In the present disclosure, commands are executed serially, so there is no need to add output buffer pointer parameters to command interface functions such as the set function. Instead, a global data buffer is used as a cache for the output results of each server-side command. For example, after executing the above-mentioned "SET HELLO WORLD" instruction, if the execution is successful, "OK" is written to R1, and if an error occurs, "ERROR" is written to it. Correspondingly, if the "GET HELLO" instruction is executed, that is, to obtain the value corresponding to the "HELLO" key, the data written to R1 is "WORLD".

[0114] The client receives the execution result returned by the server and feeds it back to the second user through the interactive interface.

[0115] In this embodiment, the client uses blocking mode by default. That is, after a user enters a command such as "SET HELLO WORLD" through the client, it will not respond to further command interaction requests until it receives a response from the server. After the client receives the execution result from the server, it directly feeds the execution interface back to the second user through the interactive interface, allowing the second user to obtain the command execution result.

[0116] The above is a data storage system provided in the present disclosure. The following will describe a data storage method provided in the present disclosure and applied to the above data storage system from a method perspective, as shown in FIG6 .

[0117] FIG6 is a flow chart of a data storage method provided in the present disclosure, comprising the following steps:

[0118] S601: The server obtains a message message sent by the client, parses the message message, and obtains target information, wherein the message message is a storage request corresponding to a byte stream of the target information generated by the client in response to a specified operation of a second user, and the storage request is encapsulated based on an encapsulation rule, wherein the encapsulation rule is generated based on first configuration information in a configuration file sent by the control end, and the configuration file is generated by the control end based on programming information written by the first user in a programming environment;

[0119] S602: writing the target information into each extraction unit;

[0120] S603: Reading action information from a designated extraction unit and determining an action unit that matches the action information as a target action unit, wherein the server includes at least one extraction unit generated according to the second configuration information in the configuration file and at least one action unit generated according to the third configuration information in the configuration file, each extraction unit matches the encapsulation rule, and each action unit corresponds to a set of stored actions;

[0121] S604: Execute the storage action corresponding to the target action unit to store the byte stream data of the target information.

[0122] During the configuration of the storage system, the client can call the programmable encapsulation module resources according to the first configuration information in the configuration file, generate encapsulation rules, and provide an interactive interface for the second user who executes the network byte stream storage service.

[0123] The server can invoke programmable extraction module resources based on the second configuration information in the configuration file to generate multiple extraction units carrying unique identifiers, invoke programmable action module resources based on the third configuration information in the configuration file to generate multiple action units carrying unique identifiers, generate a service table based on the configuration file, and associate the service table information with the designated extraction unit and each action unit in the service table. The information stored in the extraction register of the designated extraction unit indicates the storage action corresponding to the storage request.

[0124] In the process of executing a storage request, the client can generate a storage request for a network byte stream; encapsulate the storage request according to the above-mentioned encapsulation rules to generate a network message message; send the message message to the server and receive the response information from the server; and feed back the received response information to the user through the interactive interface with the second user.

[0125] The server can receive message packets from the client, obtain network messages, call the programmable extraction module interface, write information to each extraction unit, retrieve the service table based on the information in the specified extraction unit, obtain the associated action unit, execute the actions in the action unit, and feed back the execution results to the client through the transceiver module.

[0126] As can be seen from the above content, this solution abstracts the resources of the client and server, provides them to users in the form of programmable encapsulation, extraction, action and other units, and flexibly configures them through the control end. This allows developers to flexibly configure the service content of the client and server based on their own needs, greatly expanding the application scenarios and usage flexibility.

[0127] The present disclosure further provides a computer-readable storage medium storing a computer program. The computer program can be used to execute a data storage method provided in FIG. 6 .

[0128] The present disclosure also provides a schematic structural diagram of an electronic device corresponding to Figure 6, as shown in Figure 7. As shown in Figure 7, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the data storage method described in Figure 6 above. Of course, in addition to software implementation, the present disclosure does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0129] Improvements to a technology can be clearly distinguished as either hardware improvements (for example, improvements to circuit structures such as diodes, transistors, and switches) or software improvements (improvements to process flows). However, with technological advancements, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using a hardware module. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system onto a PLD by programming it themselves, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages ​​and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.

[0130] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.

[0131] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0132] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0133] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0134] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0135] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0137] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0138] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0139] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0140] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0141] Those skilled in the art will appreciate that embodiments of the present disclosure may be provided as methods, systems, or computer program products. Thus, the present disclosure may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0142] The present disclosure may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present disclosure may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0143] The various embodiments of this disclosure are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so their description is relatively simple. For relevant portions, refer to the description of the method embodiments.

Claims

1. A data storage system, the data storage system include: Server, client and control side; The control end is used to provide a programming environment for the first user, generate a configuration file according to the programming information written by the first user in the programming environment, and send the configuration file to the client and the server; The client is used to receive the configuration file, generate an encapsulation rule according to the first configuration information in the configuration file, and, in response to a specified operation of the second user, generate a storage request corresponding to the byte stream of the target information, encapsulate the storage request based on the encapsulation rule to obtain a message message, and send the message message to the server; The server is used to receive the configuration file, generate at least one extraction unit matching the encapsulation rule according to the second configuration information in the configuration file, generate at least one set of action units corresponding to the storage action according to the third configuration information in the configuration file, and after receiving the message message, parse the message message to obtain the target information, write the target information into each extraction unit, read the action information from the designated extraction unit and determine the action unit matching the action information as the target action unit, and execute the storage action corresponding to the target action unit to store the byte stream data of the target information.

2. The data storage system according to claim 1, It is characterized in that The client includes: a programmable packaging module and a packaging instruction set; The programmable encapsulation module is used to load the configuration file, generate at least one encapsulation unit according to the first configuration information, and sort the encapsulation units to obtain the encapsulation rule; The encapsulation instruction set is used to abstract the operations involved in the process of encapsulating the byte stream of the target information according to the encapsulation rule.

3. The data storage system according to claim 1, It is characterized in that The server includes: a programmable extraction module, a programmable action module and a programmable service module; The programmable extraction module is used to load the configuration file, generate each extraction unit according to the second configuration information, and parse the message according to the configuration file to extract the target information and write it into the extraction register corresponding to each extraction unit; The programmable action module is used to load the configuration file, select each target instruction from the preset action instruction set according to the third configuration information, combine the stored actions corresponding to the target instructions, and generate each action unit according to each group of stored actions; The programmable service module is used to load the configuration file, and according to the fourth configuration information in the configuration file, take the action information stored in the extraction register corresponding to the designated extraction unit as a matching object and determine a matching value, and match the target action unit according to the matching value.

4. The data storage system according to claim 3, It is characterized in that The server is also used to update the configurations corresponding to the programmable extraction module, the programmable action module and the programmable service module according to the configuration file.

5. The data storage system according to claim 3, It is characterized in that The configuration of the programmable extraction module includes: extraction position offset, extraction character length, extraction terminator and associated extraction register; The offset includes a fixed value and a variable value, and the variable value is determined based on the terminator; The character length includes a fixed length and a variable length, and the variable length is determined based on the terminator.

6. The data storage system according to claim 3, It is characterized in that The programmable action module includes: a basic action table and an action unit, and the action unit is used to select a storage action corresponding to a specified register from the basic action table and associate it.

7. The data storage system according to claim 1, It is characterized in that The server is also used to: generating a service table according to the fourth configuration information in the configuration file, and associating each designated extraction unit with each action unit in the service table, and The service table is searched according to the action information in the designated extraction unit, and the action unit retrieved from the service table is used as the target action unit.

8. The data storage system according to claim 1, It is characterized in that The server is also used to return the execution result of the storage action corresponding to the target action unit to the client.

9. A method for storing data, the method comprising: include: The server obtains a message message sent by the client, parses the message message, and obtains target information, wherein the message message is a storage request corresponding to a byte stream of the target information generated by the client in response to a specified operation of the second user, and is obtained by encapsulating the storage request based on an encapsulation rule, wherein the encapsulation rule is generated according to first configuration information in a configuration file sent by the control end, and the configuration file is generated by the control end according to programming information written by the first user in a programming environment; Writing the target information into each extraction unit; Reading action information from a designated extraction unit and determining an action unit matching the action information as a target action unit, wherein the server includes at least one extraction unit generated according to the second configuration information in the configuration file and at least one action unit generated according to the third configuration information in the configuration file, each extraction unit matches the encapsulation rule, and each action unit corresponds to a set of stored actions; Execute a storage action corresponding to the target action unit to store the byte stream data of the target information.

10. The method according to claim 9, It is characterized in that The client includes: a programmable packaging module and a packaging instruction set; The encapsulation rule is obtained after the programmable encapsulation module loads the configuration file, generates at least one encapsulation unit according to the first configuration information and sorts the encapsulation units. The operations involved in the process of encapsulating the byte stream of the target information by the encapsulation rule are abstracted through the encapsulation instruction set.

11. The method according to claim 9, It is characterized in that The server is provided with at least one of a programmable action module and a programmable service module; Before parsing the message, the method further includes: The configuration file is loaded through the programmable action module in the server, each target instruction is selected from a preset action instruction set according to the third configuration information, the stored actions corresponding to each target instruction are combined, and each action unit is generated according to each group of stored actions; Reading action information from a specified extraction unit and determining an action unit matching the action information includes: The configuration file is loaded through the programmable service module in the server, and according to the fourth configuration information in the configuration file, the action information stored in the extraction register corresponding to the designated extraction unit is used as a matching object and a matching value is determined, and the target action unit is matched according to the matching value.

12. The method according to claim 11, It is characterized in that The server is also provided with: a programmable extraction module; The method further comprises: According to the configuration file, the configurations corresponding to the programmable extraction module, the programmable action module and the programmable service module are updated.

13. The method according to claim 12, It is characterized in that The configuration of the programmable extraction module includes: extraction position offset, extraction character length, extraction terminator and associated extraction register, the offset includes a fixed value and a variable value, the variable value is determined based on the terminator, the character length includes a fixed length and a variable length, the variable length is determined based on the terminator.

14. The method according to claim 11, It is characterized in that The programmable action module includes: a basic action table and an action unit; Generating the action units according to the groups of stored actions includes: The action unit selects a storage action corresponding to a designated register from the basic action table and associates the action.

15. The method of claim 9, It is characterized in that Before parsing the message, the method further includes: The server is used to generate a service table according to the fourth configuration information in the configuration file, and associate each designated extraction unit with each action unit in the service table; Reading action information from a designated extraction unit and determining an action unit matching the action information as a target action unit includes: The service table is searched according to the action information in the designated extraction unit, and the action unit retrieved from the service table is used as the target action unit.

16. The method of claim 9, It is characterized in that The method further comprises: The execution result of the storage action corresponding to the target action unit is returned to the client.

17. A computer-readable storage medium storing a computer program, wherein the computer program implements the method according to any one of claims 9 to 16 when executed by a processor.

18. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method according to any one of claims 9 to 16 is implemented.

Citation Information

Patent Citations

  • Product activity information configuration method and system

    CN111311319A

  • Interface configuration method and device, equipment and medium

    CN112714148A

  • Business data processing method and device, computer equipment and storage medium

    CN114115967A

  • Data storage system and method, storage medium and electronic equipment

    CN116436936A

  • System and method of providing an interactive development platform in a distributed computing environment

    US11513772B1