Data storage and query method and device
By acquiring and storing data in the visual network environment and generating indexes, the convenience problem of data backup and query in the visual network is solved, and efficient data storage and query are achieved.
Patent Information
- Application Number
- CN201911329856.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-20
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2039-12-20
AI Technical Summary
The existing video network data backup method is limited to data storage and does not involve subsequent query operations, resulting in data backup and storage methods that are inconvenient for subsequent queries.
By obtaining the target data information, including data content and identification information, it is encapsulated using the video network protocol and sent to the second server for storage, and a data index is generated to facilitate subsequent queries.
It realizes the backup storage and query of data in the visual network environment, improving the convenience and efficiency of data query.
Smart Images

Figure CN111125426B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data storage and query, and in particular to a method and device for data storage and query. Background Art
[0002] The visual network is an important milestone in the development of the Internet. It is a real-time network that can achieve real-time transmission of high-definition video and push many Internet applications towards high-definition video. Currently, in order to prevent data loss in the visual network, a copy of the data can be backed up in different visual network servers.
[0003] However, the current data backup in the visual network is limited to the storage of data, and does not involve the subsequent query process. As a result, the current data backup or storage methods are not convenient for subsequent query operations. Summary of the invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a method and apparatus for data storage and query that overcomes the above problems or at least partially solves the above problems.
[0005] In a first aspect, an embodiment of the present invention discloses a method for data storage, which is applied to a first server, and the method includes:
[0006] Acquire target data information; wherein the target data information includes data content and identification information corresponding to the data content;
[0007] Storing the data content according to a pre-generated first storage path, and encapsulating the target data information through a visual networking protocol to obtain a visual networking data packet;
[0008] Sending the visual networking data packet to the second server through the visual networking, so that the second server parses the visual networking data packet to obtain the target data information, stores the data content in the target data information according to a pre-generated second storage path, and returns the second storage path;
[0009] The second storage path is received, and an index of the target data information is generated according to the second storage path, the first storage path, and the identification information.
[0010] Optionally, the first server is pre-set with configuration information, the configuration information including a terminal number of a first visual network virtual terminal set on the first server and a terminal number of a second visual network virtual terminal set on the second server;
[0011] The destination virtual terminal number protocol field of the visual networking data packet stores the terminal number of the second visual networking virtual terminal; the source virtual terminal number protocol field stores the terminal number of the first visual networking virtual terminal.
[0012] Optionally, the step of sending the visual network data packet to the second server via the visual network includes:
[0013] The first visual network virtual terminal sends the visual network data packet to the second visual network virtual terminal through the visual network.
[0014] Optionally, the step of the first visual network virtual terminal sending the visual network data packet to the second visual network virtual terminal via the visual network includes:
[0015] The first visual network virtual terminal sends the visual network data packet to the second visual network virtual terminal in a packetized manner via the visual network.
[0016] Optionally, the data content is a log file; and the identification information is at least one of a unique identifier of a source server of the log file, a name of the log file, and a type of the log file.
[0017] Optionally, the step of storing the data content according to a pre-generated first storage path and encapsulating the target data information through a visual networking protocol to obtain a visual networking data packet includes:
[0018] Encrypting the log file according to a preset encryption algorithm to obtain an encrypted log file;
[0019] Storing the encrypted log file according to a pre-generated first storage path;
[0020] The encrypted log file and the identification information are encapsulated through the visual networking protocol to obtain a visual networking data packet.
[0021] Optionally, after the step of encrypting the log file according to a preset encryption algorithm to obtain an encrypted log file, the method further includes:
[0022] A file verification code for the encrypted log file is generated according to a preset verification algorithm.
[0023] In a second aspect, an embodiment of the present invention further discloses a data query method, which is applied to a first server, and the method includes:
[0024] Acquire target data information; wherein the target data information includes data content and identification information corresponding to the data content;
[0025] Storing the data content according to a pre-generated first storage path, and encapsulating the target data information through a visual networking protocol to obtain a visual networking data packet;
[0026] Sending the visual networking data packet to the second server through the visual networking, so that the second server parses the visual networking data packet to obtain the target data information, and stores the data content in the target data information according to a pre-generated second storage path process, and returns the second storage path;
[0027] receiving the second storage path, and generating an index of the target data information according to the second storage path, the first storage path and the identification information;
[0028] When receiving a query request sent by a terminal device, determining a target index according to a query condition carried in the query request, wherein the target index is an index that meets the query condition;
[0029] Acquire, in the first server, data content indicated by the first storage path in the target index; or acquire, in the second server, data content indicated by the second storage path in the target index;
[0030] The acquired data content is returned to the terminal device.
[0031] In a third aspect, an embodiment of the present invention further discloses a data storage device, which is applied to a first server, and the device includes:
[0032] An acquisition module, used to acquire target data information; wherein the target data information includes data content and identification information corresponding to the data content;
[0033] A processing module, used to store the data content according to a pre-generated first storage path, and encapsulate the target data information through a visual networking protocol to obtain a visual networking data packet;
[0034] A sending module, used to send the visual networking data packet to the second server through the visual networking, so that the second server parses the visual networking data packet to obtain the target data information, stores the data content in the target data information according to a pre-generated second storage path, and returns the second storage path;
[0035] An index module is used to receive the second storage path and generate an index of the target data information according to the second storage path, the first storage path and the identification information.
[0036] Optionally, the first server is pre-set with configuration information, the configuration information including a terminal number of a first visual network virtual terminal set on the first server and a terminal number of a second visual network virtual terminal set on the second server;
[0037] The destination virtual terminal number protocol field of the visual networking data packet stores the terminal number of the second visual networking virtual terminal; the source virtual terminal number protocol field stores the terminal number of the first visual networking virtual terminal.
[0038] Optionally, the sending module is specifically used to control the first visual network virtual terminal to send the visual network data packet to the second visual network virtual terminal through the visual network.
[0039] Optionally, the sending module is specifically used to control the first visual networking virtual terminal to send the visual networking data packet to the second visual networking virtual terminal in a packetized manner through the visual network.
[0040] Optionally, the data content is a log file; and the identification information is at least one of a unique identifier of a source server of the log file, a name of the log file, and a type of the log file.
[0041] Optionally, the processing module includes:
[0042] An encryption unit, used to encrypt the log file according to a preset encryption algorithm to obtain an encrypted log file;
[0043] A path unit, used to store the encrypted log file according to a pre-generated first storage path;
[0044] The encapsulation unit is used to encapsulate the encrypted log file and the identification information through the visual networking protocol to obtain a visual networking data packet.
[0045] Optionally, the device further comprises:
[0046] The verification code module is used to generate a file verification code for the encrypted log file according to a preset verification algorithm.
[0047] In a fourth aspect, an embodiment of the present invention further discloses a data query device, which is applied to a first server, and the device includes:
[0048] An acquisition module, used to acquire target data information; wherein the target data information includes data content and identification information corresponding to the data content;
[0049] A processing module, used to store the data content according to a pre-generated first storage path, and encapsulate the target data information through a visual networking protocol to obtain a visual networking data packet;
[0050] A sending module, used to send the visual networking data packet to the second server through the visual networking, so that the second server parses the visual networking data packet to obtain the target data information, stores the data content in the target data information according to a pre-generated second storage path, and returns the second storage path;
[0051] an index module, configured to receive the second storage path, and generate an index of the target data information according to the second storage path, the first storage path and the identification information;
[0052] A determination module, configured to, upon receiving a query request sent by a terminal device, determine a target index according to a query condition carried in the query request, wherein the target index is an index that meets the query condition;
[0053] A query module, configured to obtain, in the first server, data content indicated by the first storage path in the target index; or to obtain, in the second server, data content indicated by the second storage path in the target index;
[0054] A feedback module is used to return the acquired data content to the terminal device.
[0055] In a fifth aspect, an embodiment of the present invention further discloses an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first or second aspect when executing the computer program.
[0056] In a sixth aspect, an embodiment of the present invention further discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the method described in the first aspect or the second aspect.
[0057] The data storage and query method and device provided by the embodiment of the present invention obtain target data information; wherein the target data information includes data content and identification information of the corresponding data content; the data content is stored according to a pre-generated first storage path, and the target data information is encapsulated by a visual networking protocol to obtain a visual networking data packet. The data content is stored according to the first storage path, so that the data content stored therein can be found according to the first storage path. The visual networking data packet obtained after encapsulation by the visual networking protocol can ensure that the visual networking data packet can be transmitted in a visual networking environment. The visual networking data packet is sent to a second server through the visual networking, so that the second server parses the visual networking data packet to obtain the target data information, and stores the data content in the target data information according to a pre-generated second storage path, and returns the second storage path; the second storage path is received, and an index of the target data information is generated according to the second storage path, the first storage path and the identification information. When multiple copies of the target data information are obtained, an index is generated for each copy of the target data information. Therefore, in the query process, it is only necessary to determine the corresponding index according to the query condition to find the corresponding storage path, and then obtain the required data. The present invention can not only realize the backup storage of data in the visual networking, but also facilitate the subsequent query of the stored data. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a schematic diagram of the steps of a method for data storage provided by an embodiment of the present invention;
[0059] Figure 2 It is a schematic diagram of the steps of a method for data query provided by an embodiment of the present invention;
[0060] Figure 3 is a signal transmission schematic diagram of a data query method provided by an embodiment of the present invention;
[0061] Figure 4 It is an application architecture diagram of the data query method provided by an embodiment of the present invention;
[0062] Figure 5 is a schematic diagram of a data storage device provided by an embodiment of the present invention;
[0063] Figure 6 is a schematic diagram of a data query device provided by an embodiment of the present invention;
[0064] Figure 7 This is a schematic diagram of a visual network provided by an embodiment of the present invention;
[0065] Figure 8 It is a schematic diagram of the hardware structure of a node server provided by an embodiment of the present invention;
[0066] Fig. 9 It is a schematic diagram of the hardware structure of an access switch provided by an embodiment of the present invention;
[0067] Fig.10 The present invention provides a hardware structure diagram of an Ethernet protocol conversion gateway. DETAILED DESCRIPTION
[0068] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0069] Figure 1 A data storage method provided by an embodiment of the present invention is shown, which is applied to a first server. The method includes the following steps:
[0070] Step 101, obtaining target data information.
[0071] It should be noted that the target data information includes data content and identification information corresponding to the data content; the data content is the data to be stored, and the identification information and the data content are in a one-to-one correspondence, that is, the unique data content can be determined based on the identification information. The identification information can be information related to the data content, such as the name and type of the data content. Of course, it can also be a code that is not related to the data content. The first server can actively obtain the target data information, or it can passively receive the target data information pushed by other devices.
[0072] Step 102, stores the data content according to a pre-generated first storage path, and encapsulates the target data information through a visual networking protocol to obtain a visual networking data packet.
[0073] It should be noted that different data contents can be stored in the same or different first storage paths. The first storage path can be generated according to the identification information to store the data content; or the path generation rule can be pre-configured, and after the target data information is acquired, the first storage path is generated according to the pre-configured path generation rule, and then the target data information is stored according to the first storage path. Of course, a path information table containing multiple first storage paths can also be pre-configured, and after the target data information is acquired, the first storage paths are sequentially extracted according to the path information table to store the target data information.
[0074] In order to enable the target data information to be transmitted in the visual networking environment, it is necessary to encapsulate the target data information through the visual networking protocol to generate a visual networking data packet that can be transmitted in the visual networking environment.
[0075] Step 103, sending the visual network data packet to the second server through the visual network, so that the second server parses the visual network data packet to obtain the target data information, and stores the data content in the target data information according to the pre-generated second storage path, and returns the second storage path.
[0076] It should be noted that the first server and the second server can exchange data through the visual network. After storing the data content, the second server needs to inform the first server of the second storage path so that the first server can directly obtain the data content stored in the second server through the second storage path.
[0077] Step 104: Receive the second storage path, and generate an index of the target data information according to the second storage path, the first storage path, and the identification information.
[0078] It should be noted that the index includes the second storage path, the first storage path and identification information. Each target data information corresponds to an index. When querying the data content, the index can be determined according to the identification information corresponding to the data content, and then the first storage path and the second storage path can be obtained through the determined index, and then the required data content can be obtained. The data content stored in the first storage path and the second storage path is the same, which is the required data content. And if the data content cannot be obtained in one of the storage paths, the data content can also be obtained through the remaining storage paths.
[0079] After the index is generated, the index may be sent to a database for storage, and may also be stored in the first server.
[0080] In an embodiment of the present invention, target data information is obtained; wherein the target data information includes data content and identification information of the corresponding data content; the data content is stored according to a pre-generated first storage path, and the target data information is encapsulated by a visual networking protocol to obtain a visual networking data packet. The data content is stored according to the first storage path, so that the data content stored therein can be found according to the first storage path. The visual networking data packet obtained after encapsulation by the visual networking protocol can ensure that the visual networking data packet can be transmitted in a visual networking environment. The visual networking data packet is sent to a second server through the visual networking, so that the second server parses the visual networking data packet to obtain the target data information, and stores the data content in the target data information according to a pre-generated second storage path, and returns the second storage path; the second storage path is received, and an index of the target data information is generated according to the second storage path, the first storage path and the identification information. When multiple copies of the target data information are obtained, an index is generated for each copy of the target data information. Therefore, in the query process, it is only necessary to determine the corresponding index according to the query condition to find the corresponding storage path, and then obtain the required data. The present invention can not only realize the backup storage of data in the visual networking, but also facilitate the subsequent query of the stored data.
[0081] In order to facilitate the adjustment of the second server for backing up and storing data content, based on the above-mentioned embodiment of the invention, in the embodiment of the present invention, the first server is pre-set with configuration information, and the configuration information includes the terminal number of the first visual network virtual terminal set on the first server and the terminal number of the second visual network virtual terminal set on the second server;
[0082] The destination virtual terminal number protocol field of the visual networking data packet stores the terminal number of the second visual networking virtual terminal; the source virtual terminal number protocol field stores the terminal number of the first visual networking virtual terminal.
[0083] It should be noted that the first server and the second server storing the data content can be adjusted by adjusting the configuration information. The number of the second server can be multiple, and the configuration information includes the terminal numbers of multiple second visual network virtual terminals.
[0084] Preferably, the step of sending the visual network data packet to the second server via the visual network includes: the first visual network virtual terminal sends the visual network data packet to the second visual network virtual terminal via the visual network.
[0085] In order to improve the transmission efficiency of the visual network data packet, based on the above-mentioned embodiment of the invention, in the embodiment of the present invention, the step of the first visual network virtual terminal sending the visual network data packet to the second visual network virtual terminal through the visual network includes:
[0086] The first visual network virtual terminal sends the visual network data packet to the second visual network virtual terminal in the form of packet transmission via the visual network.
[0087] It should be noted that each visual network data packet is divided into multiple data packets and then sent in batches. Preferably, after receiving each batch of data packets, the second visual network virtual terminal confirms whether the number of data packets is consistent with the total number in the message. If not, the first visual network virtual terminal is notified to resend the batch of data packets. If consistent, the next batch of data packets is continued to be received. After all batches of data packets received are fine, all batches of data packets are combined and saved, and after successful saving, a backup success mark is sent to the first visual network virtual terminal. Of course, if the second visual network virtual terminal notifies the first visual network virtual terminal to resend the data packet more than the preset threshold, the first visual network virtual terminal is controlled to stop sending data packets to the second visual network virtual terminal, and generates backup failure identification information or generates backup failure identification information by the second visual network virtual terminal and sends it to the first visual network virtual terminal. Preferably, when generating an index, the identification information of backup success and backup failure can also be added to the index. The preset threshold can be 3, but is not limited to this.
[0088] Based on the above-mentioned embodiments of the invention, in an embodiment of the present invention, the data content is a log file; the identification information is at least one of a unique identifier of a source server of the log file, a name of the log file, and a type of the log file.
[0089] It should be noted that when the first server is a log management server, the second server is a remote storage server. The log management server can obtain multiple types of log files, then save them locally and back them up in the remote storage server. Preferably, the identification information is the unique identifier of the source server of the log file, the name of the log file and the type of the log file. When generating the first storage path according to the identification information, the first storage path of "unique identifier of the source server" -> "year-month" -> "file name-year-month-day.log" can be generated, where "year-month" and "year-month-day" are the specific times of the received log files.
[0090] In order to further improve security, based on the above-mentioned embodiments of the invention, in the embodiment of the present invention, the data content is stored according to the pre-generated first storage path, and the target data information is encapsulated through the visual networking protocol to obtain the visual networking data packet. The steps include:
[0091] Encrypt the log file according to a preset encryption algorithm to obtain an encrypted log file;
[0092] Storing the encrypted log file according to a pre-generated first storage path;
[0093] The encrypted log file and identification information are encapsulated through the visual Internet protocol to obtain a visual Internet data packet.
[0094] It should be noted that when a user queries a log file, the encrypted log file is decrypted and the decrypted log file is displayed to the user. After the log file is encrypted according to a preset encryption algorithm to obtain an encrypted log file, the method further includes: generating a file verification code of the encrypted log file according to a preset verification algorithm.
[0095] The preset verification algorithm is any verification algorithm, preferably, the preset verification algorithm can be a SHA256 algorithm. After generating the file verification code, the file verification code is added to the visual networking data packet. After receiving the visual networking data packet, the second server generates a verification code according to the preset verification algorithm, and compares the generated verification code with the file verification code carried in the visual networking data packet. If they are consistent, there is no problem with the visual networking data packet, otherwise the first server is notified, and the first server resends the visual networking data packet.
[0096] like Figure 2 According to another aspect of the present invention, a data query method is provided, which is applied to a first server, and the method includes:
[0097] Step 201, obtaining target data information; wherein the target data information includes data content and identification information corresponding to the data content.
[0098] Step 202, stores the data content according to a pre-generated first storage path, and encapsulates the target data information through a visual networking protocol to obtain a visual networking data packet.
[0099] Step 203, sending the visual network data packet to the second server through the visual network, so that the second server parses the visual network data packet to obtain the target data information, and stores the data content in the target data information according to the pre-generated second storage path process, and returns the second storage path.
[0100] Step 204: Receive the second storage path, and generate an index of the target data information according to the second storage path, the first storage path, and the identification information.
[0101] It should be noted that the process of storing the target data information in steps 201 to 204 is similar to the process of steps 101 to 104 in the above-mentioned embodiment of the invention, and will not be repeated here.
[0102] Step 205, when receiving the query request sent by the terminal device, determine the target index according to the query condition carried in the query request, wherein the target index is an index that meets the query condition.
[0103] It should be noted that the user can input the query condition through the terminal device, and then the terminal device sends the query request carrying the query condition to the first server. The query condition is related to the index. For example, the index includes the file name, file type, and unique identifier of the source server of the log file, etc., and the query condition can be a query condition composed of one or more of the file name, file type, and unique identifier of the source server of the log file, but is not limited thereto. If the index is stored in the database, when the first server receives the query request, it accesses the database according to the query request to determine the index.
[0104] Step 206: obtain the data content indicated by the first storage path in the target index in the first server; or obtain the data content indicated by the second storage path in the target index in the second server.
[0105] It should be noted that the data content may be obtained preferentially from the first server. If the data content cannot be obtained from the first server, the data content may be obtained from the second server.
[0106] Step 207: Return the acquired data content to the terminal device.
[0107] In an embodiment of the present invention, target data information is obtained; wherein the target data information includes data content and identification information of the corresponding data content; the data content is stored according to a pre-generated first storage path, and the target data information is encapsulated through a visual networking protocol to obtain a visual networking data packet. The data content is stored according to the first storage path, so that the data content stored therein can be found according to the first storage path. The visual networking data packet obtained after encapsulation by the visual networking protocol can ensure that the visual networking data packet can be transmitted in a visual networking environment. The visual networking data packet is sent to a second server through the visual networking, so that the second server parses the visual networking data packet to obtain the target data information, and stores the data content in the target data information according to a pre-generated second storage path, and returns the second storage path; the second storage path is received, and an index of the target data information is generated according to the second storage path, the first storage path and the identification information. When a query request sent by a terminal device is received, a target index is determined according to the query condition carried in the query request, wherein the target index is an index that meets the query condition; the data content indicated by the first storage path in the target index is obtained in the first server; or the data content indicated by the second storage path in the target index is obtained in the second server; and the obtained data content is returned to the terminal device. When multiple copies of target data information are obtained, an index will be generated for each copy of the target data information. Therefore, during the query process, it is only necessary to determine the corresponding index according to the query conditions to find the corresponding storage path and obtain the required data. The present invention can not only realize the backup storage of data in the visual network, but also facilitate the subsequent query of the stored data.
[0108] like Figure 3 As shown, it is a signal transmission diagram of the data query method provided by an embodiment of the present invention; after obtaining the log file, the log management service first encrypts the log file, and then saves the encrypted log file to the local disk. The verification code of the encrypted log file is generated by the SHA256 algorithm. The log management service sends the encrypted log file and the verification code to the remote storage service through the visual network protocol.
[0109] The process of sending encrypted log files and verification codes adopts the packet sending method. After receiving each batch of data packets, the remote storage service confirms whether the number of data packets is consistent with the total number in the message. If not, the log management service needs to resend the file. After the remote storage service receives all the data packets, it saves the file. The remote storage service generates a verification code for the file through the SHA256 algorithm and compares whether the verification code is consistent with the one sent by the log management service. If the content is consistent, it returns the successful file reception to the log management service. If not, it notifies the log management service and the log management service resends all data packets. For easy search, when the log files are saved on the local disk and the remote storage server, they are saved according to the directory level of "source server unique identifier" -> "year-month" -> "file name-year-month-day.log".
[0110] After the log management service confirms that the remote storage service has returned the result normally, it writes the file record information to the data center. For the remote server with abnormal log storage, it will make three attempts. If it still cannot be saved, it will be marked in the data record. The file information includes the file name, local file storage location, virtual terminal number of the remote storage server, remote backup status, file storage time, file type, source server unique identifier, SHA256 checksum, etc.
[0111] The front-end interface of the security management center can filter and query log file records based on server type, file name, file type, and time range, and can preview or download files on the page. When the log management service receives a file preview or download request, it finds the corresponding log file from the local file save path, decrypts the file content, and returns the log file content to the front end. If the log management service does not find the log file locally, it obtains the log file from the remote storage service. Preferably, the protocol used by the data packet sent by the log management service to the remote storage service is shown in Table 1; the protocol used by the data packet sent by the remote storage service to the log management service is shown in Table 2;
[0112] Table 1:
[0113]
[0114] Table 2:
[0115]
[0116] like Figure 4As shown, it is an application architecture diagram of the data query method provided by an embodiment of the present invention; the log collection module collects log files from the log source end, and sends the collected log files to the log management service. The log management service encrypts the log file, saves the encrypted log file locally, and sends the encrypted log file back to the remote storage service through the virtual terminal. The remote storage service stores the encrypted log file and returns the storage result information to the log management service. The log management service generates a record based on the log file and related information, and sends the record to the database. When a user queries or downloads a log file, taking query as an example, the log management service will access the database to query the corresponding log file related information, and then read the corresponding log file locally. If the corresponding log file is not read locally, the corresponding log file is read in the remote service by remote reading.
[0117] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0118] like Figure 5 As shown, a data storage device provided by an embodiment of the present invention is applied to a first server, and the device includes:
[0119] The acquisition module 51 is used to acquire target data information; wherein the target data information includes data content and identification information corresponding to the data content;
[0120] The processing module 52 is used to store the data content according to the pre-generated first storage path, and encapsulate the target data information through the visual networking protocol to obtain a visual networking data packet;
[0121] The sending module 53 is used to send the visual network data packet to the second server through the visual network, so that the second server parses the visual network data packet to obtain the target data information, stores the data content in the target data information according to the pre-generated second storage path, and returns the second storage path;
[0122] The index module 54 is used to receive the second storage path and generate an index of the target data information according to the second storage path, the first storage path and the identification information.
[0123] Optionally, the first server is pre-set with configuration information, the configuration information including the terminal number of the first visual network virtual terminal set on the first server and the terminal number of the second visual network virtual terminal set on the second server;
[0124] The destination virtual terminal number protocol field of the visual networking data packet stores the terminal number of the second visual networking virtual terminal; the source virtual terminal number protocol field stores the terminal number of the first visual networking virtual terminal.
[0125] Optionally, the sending module 53 is specifically used to control the first visual network virtual terminal to send the visual network data packet to the second visual network virtual terminal through the visual network.
[0126] Optionally, the sending module 53 is specifically used to control the first visual network virtual terminal to send the visual network data packet to the second visual network virtual terminal in a packetized manner through the visual network.
[0127] Optionally, the data content is a log file; and the identification information is at least one of a unique identifier of a source server of the log file, a name of the log file, and a type of the log file.
[0128] Optionally, the processing module 52 includes:
[0129] The encryption unit is used to encrypt the log file according to a preset encryption algorithm to obtain an encrypted log file;
[0130] A path unit, used to store the encrypted log file according to a pre-generated first storage path;
[0131] The encapsulation unit is used to encapsulate the encrypted log file and identification information through the visual networking protocol to obtain a visual networking data packet.
[0132] Optionally, the device further comprises:
[0133] The verification code module is used to generate a file verification code for the encrypted log file according to a preset verification algorithm.
[0134] In an embodiment of the present invention, firstly, target data information is obtained; wherein, the target data information includes data content and identification information of the corresponding data content; the data content is stored according to a pre-generated first storage path, and the target data information is encapsulated by a visual networking protocol to obtain a visual networking data packet. The data content is stored according to the first storage path, so that the data content stored therein can be found according to the first storage path. The visual networking data packet obtained after encapsulation by the visual networking protocol can ensure that the visual networking data packet can be transmitted in a visual networking environment. The visual networking data packet is sent to a second server through the visual networking, so that the second server parses the visual networking data packet to obtain the target data information, and stores the data content in the target data information according to a pre-generated second storage path, and returns the second storage path; the second storage path is received, and an index of the target data information is generated according to the second storage path, the first storage path and the identification information. When multiple copies of the target data information are obtained, an index is generated for each copy of the target data information. Therefore, in the query process, it is only necessary to determine the corresponding index according to the query condition to find the corresponding storage path, and then obtain the required data. The present invention can not only realize the backup storage of data in the visual networking, but also facilitate the subsequent query of the stored data.
[0135] Figure 6 A data query device provided by another embodiment of the present invention is shown, which is applied to a first server, and includes:
[0136] The acquisition module 61 is used to acquire target data information; wherein the target data information includes data content and identification information corresponding to the data content;
[0137] The processing module 62 is used to store the data content according to the pre-generated first storage path, and encapsulate the target data information through the visual networking protocol to obtain a visual networking data packet;
[0138] The sending module 63 is used to send the visual network data packet to the second server through the visual network, so that the second server parses the visual network data packet to obtain the target data information, stores the data content in the target data information according to the pre-generated second storage path, and returns the second storage path;
[0139] An index module 64, configured to receive the second storage path, and generate an index of the target data information according to the second storage path, the first storage path and the identification information;
[0140] A determination module 65, configured to determine a target index according to a query condition carried in the query request when receiving a query request sent by a terminal device, wherein the target index is an index that meets the query condition;
[0141] A query module 66, configured to obtain data content indicated by a first storage path in a target index in a first server; or obtain data content indicated by a second storage path in a target index in a second server;
[0142] The feedback module 67 is used to return the acquired data content to the terminal device.
[0143] In an embodiment of the present invention, firstly, target data information is obtained; wherein the target data information includes data content and identification information of the corresponding data content; the data content is stored according to a pre-generated first storage path, and the target data information is encapsulated by a visual networking protocol to obtain a visual networking data packet. The data content is stored according to the first storage path, so that the data content stored therein can be found according to the first storage path. The visual networking data packet obtained after encapsulation by the visual networking protocol can ensure that the visual networking data packet can be transmitted in a visual networking environment. The visual networking data packet is sent to a second server through the visual networking, so that the second server parses the visual networking data packet to obtain the target data information, and stores the data content in the target data information according to a pre-generated second storage path, and returns the second storage path; the second storage path is received, and an index of the target data information is generated according to the second storage path, the first storage path and the identification information. When a query request sent by a terminal device is received, a target index is determined according to the query condition carried in the query request, wherein the target index is an index that meets the query condition; the data content indicated by the first storage path in the target index is obtained in the first server; or the data content indicated by the second storage path in the target index is obtained in the second server; and the obtained data content is returned to the terminal device. When multiple copies of target data information are obtained, an index will be generated for each copy of the target data information. Therefore, during the query process, it is only necessary to determine the corresponding index according to the query conditions to find the corresponding storage path and obtain the required data. The present invention can not only realize the backup storage of data in the visual network, but also facilitate the subsequent query of the stored data.
[0144] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0145] An embodiment of the present invention further discloses 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 method described in any of the above embodiments when executing the computer program.
[0146] An embodiment of the present invention further discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the method for implementing any of the above embodiments.
[0147] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0148] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0149] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0150] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0152] The visual Internet is an important milestone in the development of the Internet. It is a real-time network that can realize real-time transmission of high-definition video and push many Internet applications towards high-definition video and high-definition face-to-face communication.
[0153] The visual network adopts real-time high-definition video exchange technology. It can integrate the required services such as high-definition video conferencing, video monitoring, intelligent monitoring analysis, emergency command, digital radio and television, delayed TV, online teaching, live broadcast, VOD on demand, TV mail, personalized recording (PVR), intranet (self-operated) channels, intelligent video broadcast control, information release and dozens of other video, voice, picture, text, communication, data and other services on a single system platform, and realize high-definition quality video playback through TV or computer.
[0154] In order to enable those skilled in the art to better understand the embodiments of the present invention, the visual network is introduced as follows:
[0155] Some of the technologies used in the visual Internet of Things are as follows:
[0156] Network Technology
[0157] The network technology innovation of visual networking improves the traditional Ethernet to cope with the huge potential video traffic on the network. Different from simple network packet switching (Packet Switching) or network circuit switching (Circuit Switching), visual networking technology uses network packet switching to meet the requirements of Streaming (a data transmission technology that turns the received data into a stable and continuous stream and sends it out continuously, so that the sound heard or the image seen by the user is very stable, and the user can start browsing on the screen before the entire data is transmitted). Visual networking technology has the flexibility, simplicity and low price of packet switching, and the quality and security guarantee of circuit switching, realizing the seamless connection of the whole network switching virtual circuit and data format.
[0158] Switching Technology
[0159] Visual networking uses the two advantages of Ethernet: asynchronism and packet switching. It eliminates Ethernet defects under the premise of full compatibility, and has seamless end-to-end connection across the entire network, directly connects to user terminals, and directly carries IP data packets. User data does not require any format conversion within the entire network. Visual networking is a more advanced form of Ethernet and a real-time switching platform that can achieve large-scale real-time transmission of high-definition video across the entire network, which is currently unattainable on the Internet, and pushes many network video applications towards high definition and unification.
[0160] Server Technology
[0161] The server technology on the visual network and unified video platform is different from the traditional server. Its streaming media transmission is based on connection-oriented. Its data processing capability is independent of traffic and communication time. A single network layer can include signaling and data transmission. For voice and video services, the complexity of streaming media processing on the visual network and unified video platform is much simpler than data processing, and its efficiency is more than 100 times higher than that of traditional servers.
[0162] Storage Technology
[0163] The ultra-high-speed storage technology of the unified video platform adopts the most advanced real-time operating system to adapt to the media content with ultra-large capacity and ultra-large flow, mapping the program information in the server command to the specific hard disk space. The media content no longer passes through the server, but is directly delivered to the user terminal in an instant. The user generally waits for less than 0.2 seconds. The optimized sector distribution greatly reduces the mechanical movement of the hard disk head seeking, and the resource consumption accounts for only 20% of the same level of IP Internet, but it generates 3 times more concurrent traffic than the traditional hard disk array, and the overall efficiency is improved by more than 10 times.
[0164] Network Security Technology
[0165] The structural design of the visual network completely eradicates the network security issues that plague the Internet through separate licensing for each service and complete isolation of equipment and user data. Generally, anti-virus programs and firewalls are not required, and attacks by hackers and viruses are eliminated, providing users with a structurally worry-free and secure network.
[0166] Service Innovation Technology
[0167] The unified video platform integrates services and transmission. Whether it is a single user, a private network user or a network, it is just an automatic connection. User terminals, set-top boxes or PCs are directly connected to the unified video platform to obtain rich and colorful multimedia video services in various forms. The unified video platform uses a "recipe-style" table configuration mode to replace traditional complex application programming. Complex applications can be implemented with very little code, realizing "unlimited" new business innovation.
[0168] The networking of the visual network is as follows:
[0169] Visual networking is a centrally controlled network structure. The network can be a tree network, star network, ring network, etc., but on this basis, there needs to be a centralized control node in the network to control the entire network.
[0170] like Figure 7 As shown in the figure, the visual network is divided into two parts: access network and metropolitan area network.
[0171] The equipment in the access network can be divided into three categories: node server, access switch, and terminal (including various set-top boxes, encoding boards, storage, etc.). The node server is connected to the access switch, and the access switch can be connected to multiple terminals and can be connected to Ethernet.
[0172] The node server is a node in the access network that performs centralized control functions and can control access switches and terminals. The node server can be directly connected to the access switch or directly connected to the terminal.
[0173] Similarly, the devices in the metropolitan area network can also be divided into three categories: metropolitan area servers, node switches, and node servers. The metropolitan area servers are connected to the node switches, and the node switches can be connected to multiple node servers.
[0174] The node server is a node server of the access network part, that is, the node server belongs to both the access network part and the metropolitan area network part.
[0175] The metropolitan area server is a node with centralized control function in the metropolitan area network, which can control the node switch and node server. The metropolitan area server can be directly connected to the node switch or the node server.
[0176] It can be seen from this that the entire visual network is a hierarchical and centrally controlled network structure, and the network controlled by the node server and the metropolitan area server can be various structures such as tree, star, and ring.
[0177] Figuratively speaking, the access network part can form a unified video platform (the part in the circle), and multiple unified video platforms can form a visual network; each unified video platform can be interconnected through the metropolitan area and wide area visual networks.
[0178] Visual networking equipment classification
[0179] 1.1 The devices in the visual network of the embodiment of the present invention can be mainly divided into three categories: servers, switches (including Ethernet gateways), terminals (including various set-top boxes, encoding boards, storage devices, etc.). The visual network as a whole can be divided into a metropolitan area network (or a national network, a global network, etc.) and an access network.
[0180] 1.2 The equipment in the access network can be mainly divided into three categories: node server, access switch (including Ethernet gateway), terminal (including various set-top boxes, encoding boards, storage, etc.).
[0181] The specific hardware structure of each access network device is as follows:
[0182] Node server:
[0183] like Figure 8 As shown, it mainly includes a network interface module 801, a switching engine module 802, a CPU module 803, and a disk array module 804.
[0184] Among them, the packets coming from the network interface module 801, the CPU module 803, and the disk array module 804 all enter the switching engine module 802; the switching engine module 802 performs an operation of checking the address table 805 on the incoming packets, thereby obtaining the packet's guidance information; and according to the packet's guidance information, the packet is stored in the queue of the corresponding packet buffer 806; if the queue of the packet buffer 806 is close to full, it is discarded; the switching engine module 802 polls all packet buffer queues, and forwards if the following conditions are met: 1) the port sending buffer is not full; 2) the queue packet counter is greater than zero. The disk array module 804 mainly implements the control of the hard disk, including the initialization, reading and writing of the hard disk; the CPU module 803 is mainly responsible for the protocol processing between the access switch and the terminal (not shown in the figure), the configuration of the address table 805 (including the downstream protocol packet address table, the upstream protocol packet address table, and the data packet address table), and the configuration of the disk array module 804.
[0185] Access switch:
[0186] like Fig. 9 As shown, it mainly includes a network interface module (a downlink network interface module 901, an uplink network interface module 902), a switching engine module 903 and a CPU module 904.
[0187] Among them, the packet (uplink data) coming from the downlink network interface module 901 enters the packet detection module 905; the packet detection module 905 detects whether the destination address (DA), source address (SA), data packet type and packet length of the packet meet the requirements. If they meet the requirements, the corresponding stream identifier (stream-id) is allocated and enters the switching engine module 903, otherwise it is discarded; the packet (downlink data) coming from the uplink network interface module 902 enters the switching engine module 903; the data packet coming from the CPU module 904 enters the switching engine module 903; the switching engine module 903 processes the incoming packets. The address table 906 is looked up to obtain the packet's guidance information; if the packet entering the switching engine module 903 is from the downstream network interface to the upstream network interface, the packet is stored in the queue of the corresponding packet buffer 907 in combination with the stream identifier (stream-id); if the queue of the packet buffer 907 is nearly full, it is discarded; if the packet entering the switching engine module 903 is not from the downstream network interface to the upstream network interface, the data packet is stored in the queue of the corresponding packet buffer 907 according to the packet's guidance information; if the queue of the packet buffer 907 is nearly full, it is discarded.
[0188] The switching engine module 903 polls all packet buffer queues. In the embodiment of the present invention, there are two situations:
[0189] If the queue is from the downlink network interface to the uplink network interface, forwarding is performed if the following conditions are met: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero; 3) a token generated by the bit rate control module is obtained.
[0190] If the queue is not going from the downstream network interface to the upstream network interface, it is forwarded if the following conditions are met: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero.
[0191] The code rate control module 908 is configured by the CPU module 904 to generate tokens for all packet buffer queues from the downstream network interface to the upstream network interface within a programmable interval to control the code rate of the upstream forwarding.
[0192] The CPU module 904 is mainly responsible for protocol processing with the node server, configuration of the address table 906 , and configuration of the bit rate control module 908 .
[0193] Ethernet protocol conversion gateway :
[0194] like Fig.10As shown, it mainly includes a network interface module (a downlink network interface module 1001, an uplink network interface module 1002), a switching engine module 1003, a CPU module 1004, a packet detection module 1005, a bit rate control module 1008, an address table 1006, a packet buffer 1007 and a MAC adding module 1009, and a MAC deleting module 1010.
[0195] The data packet coming from the downlink network interface module 1001 enters the packet detection module 1005; the packet detection module 1005 detects whether the Ethernet MAC DA, Ethernet MAC SA, Ethernet length or frame type, visual network destination address DA, visual network source address SA, visual network data packet type and packet length of the data packet meet the requirements, and if they meet the requirements, the corresponding stream identifier (stream-id) is assigned; then, the MAC deletion module 1010 subtracts the MAC DA, MAC SA, length or frame type (2byte) and enters the corresponding receiving buffer, otherwise it is discarded;
[0196] The downstream network interface module 1001 detects the sending buffer of the port. If there is a packet, it obtains the Ethernet MAC DA of the corresponding terminal based on the visual network destination address DA of the packet, adds the Ethernet MAC DA of the terminal, the MACSA of the Ethernet protocol conversion gateway, and the Ethernet length or frame type, and sends it.
[0197] The functions of other modules in the Ethernet protocol conversion gateway are similar to those of the access switch.
[0198] terminal:
[0199] It mainly includes network interface module, business processing module and CPU module; for example, the set-top box mainly includes network interface module, audio and video encoding and decoding engine module, CPU module; the encoding board mainly includes network interface module, audio and video encoding engine module, CPU module; the memory mainly includes network interface module, CPU module and disk array module.
[0200] 1.3 The equipment in the metropolitan area network can be divided into three categories: node server, node switch, and metropolitan area server. Among them, the node switch mainly includes network interface module, switching engine module and CPU module; the metropolitan area server mainly includes network interface module, switching engine module and CPU module.
[0201] 2. Definition of Visual Network Data Packet
[0202] 2.1 Access Network Data Packet Definition
[0203] The data packet of the access network mainly includes the following parts: destination address (DA), source address (SA), reserved bytes, payload (PDU), and CRC.
[0204] As shown in the following table, the data packet of the access network mainly includes the following parts:
[0205] DA SA Reserved Payload CRC
[0206] The destination address (DA) consists of 8 bytes. The first byte indicates the type of data packet (such as various protocol packets, multicast data packets, unicast data packets, etc.), with a maximum of 256 possibilities. The second to sixth bytes are the metropolitan area network address, and the seventh and eighth bytes are the access network address.
[0207] The source address (SA) is also composed of 8 bytes and has the same definition as the destination address (DA).
[0208] The reserved bytes consist of 2 bytes.
[0209] The payload part has different lengths depending on the type of datagram. If the datagram type is a protocol packet, the length of the payload part is 64 bytes. If the datagram type is a unicast or multicast data packet, the length of the payload part is 32+1024=1056 bytes. Of course, it is not limited to the above two types.
[0210] CRC consists of 4 bytes and its calculation method follows the standard Ethernet CRC algorithm.
[0211] 2.2 Definition of Metropolitan Area Network Data Packet
[0212] The topology of the metropolitan area network is a graph. There may be two or more connections between two devices, that is, there may be more than two connections between a node switch and a node server, a node switch and a node switch, and a node switch and a node server. However, the metropolitan area network address of a metropolitan area network device is unique. In order to accurately describe the connection relationship between metropolitan area network devices, a parameter: a label is introduced in the embodiment of the present invention to uniquely describe a metropolitan area network device.
[0213] The definition of labels in this specification is similar to the definition of labels in Multi-Protocol Label Switch (MPLS). Assuming that there are two connections between device A and device B, there are two labels for the data packet from device A to device B, and there are two labels for the data packet from device B to device A. Labels are divided into input labels and output labels. Assuming that the label of the data packet entering device A (input label) is 0x0000, the label of the data packet when leaving device A (output label) may become 0x0001. The access process of the metropolitan area network is a centralized access process, which means that the address allocation and label allocation of the metropolitan area network are dominated by the metropolitan area server, and the node switch and node server are only passively executed. This is different from the label allocation of MPLS, which is the result of mutual negotiation between the switch and the server.
[0214] As shown in the following table, the data packets of the metropolitan area network mainly include the following parts:
[0215] DA SA Reserved Label Payload CRC
[0216] That is, destination address (DA), source address (SA), reserved byte (Reserved), label, payload (PDU), CRC. The label format can refer to the following definition: the label is 32 bits, of which the upper 16 bits are reserved and only the lower 16 bits are used. It is located between the reserved bytes and payload of the data packet.
[0217] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0218] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
Claims
1. A data storage method, applied to a first server, characterized in that: The method comprises: Acquire target data information; wherein the target data information includes data content and identification information corresponding to the data content; Storing the data content according to a pre-generated first storage path, and encapsulating the target data information through a visual networking protocol to obtain a visual networking data packet; Sending the visual networking data packet to the second server through the visual networking, so that the second server parses the visual networking data packet to obtain the target data information, stores the data content in the target data information according to a pre-generated second storage path, and returns the second storage path; receiving the second storage path, and generating an index of the target data information according to the second storage path, the first storage path and the identification information; The first server is pre-set with configuration information, the configuration information including the terminal number of the first visual network virtual terminal set on the first server and the terminal number of the second visual network virtual terminal set on the second server; The destination virtual terminal number protocol field of the visual networking data packet stores the terminal number of the second visual networking virtual terminal; the source virtual terminal number protocol field stores the terminal number of the first visual networking virtual terminal; The step of sending the visual network data packet to the second server via the visual network includes: The first visual network virtual terminal sends the visual network data packet to the second visual network virtual terminal through the visual network.
2. The method according to claim 1, characterized in that The step of the first visual network virtual terminal sending the visual network data packet to the second visual network virtual terminal via the visual network includes: The first visual network virtual terminal sends the visual network data packet to the second visual network virtual terminal in a packetized manner via the visual network.
3. The method according to claim 1, characterized in that: The data content is a log file; the identification information is at least one of a unique identifier of a source server of the log file, a name of the log file, and a type of the log file.
4. The method according to claim 3, characterized in that The step of storing the data content according to the pre-generated first storage path and encapsulating the target data information through the visual networking protocol to obtain a visual networking data packet includes: Encrypt the log file according to a preset encryption algorithm to obtain an encrypted log file; Storing the encrypted log file according to a pre-generated first storage path; The encrypted log file and the identification information are encapsulated through the visual networking protocol to obtain a visual networking data packet.
5. The method according to claim 4, characterized in that After the step of encrypting the log file according to a preset encryption algorithm to obtain an encrypted log file, the method further includes: A file verification code for the encrypted log file is generated according to a preset verification algorithm.
6. A data query method, applied to a first server, characterized in that: include: Acquire target data information; wherein the target data information includes data content and identification information corresponding to the data content; Storing the data content according to a pre-generated first storage path, and encapsulating the target data information through a visual networking protocol to obtain a visual networking data packet; Sending the visual networking data packet to the second server through the visual networking, so that the second server parses the visual networking data packet to obtain the target data information, and stores the data content in the target data information according to a pre-generated second storage path process, and returns the second storage path; receiving the second storage path, and generating an index of the target data information according to the second storage path, the first storage path and the identification information; When receiving a query request sent by a terminal device, determining a target index according to a query condition carried in the query request, wherein the target index is an index that meets the query condition; Acquire, in the first server, data content indicated by the first storage path in the target index; or acquire, in the second server, data content indicated by the second storage path in the target index; Returning the acquired data content to the terminal device; The first server is pre-set with configuration information, the configuration information including the terminal number of the first visual network virtual terminal set on the first server and the terminal number of the second visual network virtual terminal set on the second server; The destination virtual terminal number protocol field of the visual networking data packet stores the terminal number of the second visual networking virtual terminal; the source virtual terminal number protocol field stores the terminal number of the first visual networking virtual terminal; The step of sending the visual network data packet to the second server via the visual network includes: The first visual network virtual terminal sends the visual network data packet to the second visual network virtual terminal through the visual network.
7. A data storage device, applied to a first server, characterized in that: The device comprises: An acquisition module, used to acquire target data information; wherein the target data information includes data content and identification information corresponding to the data content; A processing module, used to store the data content according to a pre-generated first storage path, and encapsulate the target data information through a visual networking protocol to obtain a visual networking data packet; A sending module, used to send the visual networking data packet to the second server through the visual networking, so that the second server parses the visual networking data packet to obtain the target data information, stores the data content in the target data information according to a pre-generated second storage path, and returns the second storage path; an index module, configured to receive the second storage path, and generate an index of the target data information according to the second storage path, the first storage path and the identification information; The first server is pre-set with configuration information, the configuration information including the terminal number of the first visual network virtual terminal set on the first server and the terminal number of the second visual network virtual terminal set on the second server; The destination virtual terminal number protocol field of the visual networking data packet stores the terminal number of the second visual networking virtual terminal; the source virtual terminal number protocol field stores the terminal number of the first visual networking virtual terminal; The step of sending the visual network data packet to the second server via the visual network includes: The first visual network virtual terminal sends the visual network data packet to the second visual network virtual terminal through the visual network.
8. A data query device, applied to a first server, characterized in that: include: An acquisition module, used to acquire target data information; wherein the target data information includes data content and identification information corresponding to the data content; A processing module, used to store the data content according to a pre-generated first storage path, and encapsulate the target data information through a visual networking protocol to obtain a visual networking data packet; A sending module, used to send the visual networking data packet to the second server through the visual networking, so that the second server parses the visual networking data packet to obtain the target data information, stores the data content in the target data information according to a pre-generated second storage path, and returns the second storage path; an index module, configured to receive the second storage path, and generate an index of the target data information according to the second storage path, the first storage path and the identification information; A determination module, configured to, upon receiving a query request sent by a terminal device, determine a target index according to a query condition carried in the query request, wherein the target index is an index that meets the query condition; A query module, configured to obtain, in the first server, data content indicated by the first storage path in the target index; or to obtain, in the second server, data content indicated by the second storage path in the target index; A feedback module, used for returning the acquired data content to the terminal device; The first server is pre-set with configuration information, the configuration information including the terminal number of the first visual network virtual terminal set on the first server and the terminal number of the second visual network virtual terminal set on the second server; The destination virtual terminal number protocol field of the visual networking data packet stores the terminal number of the second visual networking virtual terminal; the source virtual terminal number protocol field stores the terminal number of the first visual networking virtual terminal; The step of sending the visual network data packet to the second server via the visual network includes: The first visual network virtual terminal sends the visual network data packet to the second visual network virtual terminal through the visual network.
9. An electronic device comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by the processor, the computer program implements the steps of the data storage method according to any one of claims 1 to 5 or the data query method according to claim 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the data storage method according to any one of claims 1 to 5 or the data query method according to claim 6.
