Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
Please refer to fig. 1, fig. 2, fig. 3, fig. 4 and fig. 5. The embodiment of the specification provides a data processing system. The data processing system may include clients, business servers, a cluster of distributed cache servers, and database servers.
In this embodiment, the client may be implemented by hardware, software, or a combination of hardware and software. The client may be a pc (personal computer), a server, an industrial personal computer (industrial control computer), a mobile smart phone, a tablet electronic device, a portable computer (e.g., a laptop computer, etc.), a Personal Digital Assistant (PDA), a desktop computer, or an electronic device such as an intelligent wearable device. Or the client can also be an application program such as a browser, a microblog client, or a jingdong client. The client may communicate with the service server.
In this embodiment, the service server may be one server, or may be a server cluster including a plurality of servers. The traffic server may communicate with the coordinating server in the cluster of distributed cache servers and the database server, respectively.
In this embodiment, the distributed cache server cluster may be a distributed server cluster for providing a cache service, and may play a role in accessing hotspot data and reducing access pressure of a database server. The distributed cache server cluster may include a coordinating server and a plurality of cache servers. The coordination server is used for managing the plurality of cache servers. The plurality of cache servers may be respectively configured to cache the service data. The distributed cache server cluster can be realized based on architecture technologies such as Memcached or JBOssCache.
In this embodiment, the database server may be one server, or may be a server cluster including a plurality of servers. The database server may be used to store business data. The database server may serve as a data source of the distributed cache server cluster, so that the distributed cache server cluster may cache the service data in the database server. Synchronization rules may be generally utilized to maintain consistency between the traffic data cached by the distributed cache server cluster and the traffic data stored by the database server.
After receiving a data write request from the client, the service server may write service data and a data identifier in the distributed cache server cluster. After receiving a data reading request from the client, the service server may preferentially read service data from the distributed cache server cluster. When the service data can be read from the distributed cache server cluster, the service server may feed back the read service data to the client. When the service data cannot be read from the distributed cache server cluster, the service server can read the service data from the database server; the read service data may be fed back to the client.
In this embodiment, the client may send a data write request to the service server. The business server can receive the data writing request; business data and data identification corresponding to the data writing request can be acquired; the data volume of the service data may be compared with a preset value.
Specifically, the service data may be, for example, account balance, configuration data of an application program, or the like. The data identification may be used to identify the service data. The data identification and the service data can be understood here as a Key-Value pair (Key-Value). The preset value can be determined according to a data volume threshold value of single reading and writing in the distributed cache server cluster. The threshold values of the data amount of different distributed cache server clusters may be the same or different, and thus the preset values may be the same or different. The preset value may be less than or equal to the data amount threshold. For example, the threshold of the data amount of the distributed cache server cluster implemented based on the Memcached architecture technology may be 1M (Megabyte). Then, the preset value may be 1M, or 0.8M, etc.
Specifically, the data write request may carry the service data and the data identifier. The service server may obtain the service data and the data identifier. Or, the data write request may also carry a plurality of field identifications and a plurality of data fields corresponding to the plurality of field identifications. The service server can construct the data identifier according to the field identifiers; the service data may be constructed from the plurality of data fields. For example, the service server may merge the plurality of field identifiers to obtain the data identifier.
In an implementation manner of this embodiment, when the data volume of the service data is less than or equal to a preset value, the service server considers that compression processing and segmentation processing are not required to be performed on the service data; compression flag bits may be added to the service data; the value of the compression flag bit may be set to represent an uncompressed value; a segmentation marker bit may be added to the traffic data; the value of the segmentation marker bit may be set to represent an undivided value; and further, the service data and the data identifier may be sent to the coordination server. The coordination server may receive the service data and the data identifier; a target cache server can be selected from the plurality of cache servers according to the data identification; the traffic data and the data identification may be sent to the target cache server. The target cache server can receive the service data and the data identifier; the service data and the data identifier can be correspondingly stored; a write success message may be sent to the coordinating server. The coordination server may receive a write success message; a message of successful writing may be sent to the service server. The service server can receive a message of successful writing; a message may be sent to the client that the write was successful.
Specifically, the value of the compression flag bit may be used to indicate whether the service data is compressed, and specifically may include a value indicating uncompressed data and a value indicating compressed data. As an example, the value representing the uncompressed may be 0; the value representing the compression may be 1. The value of the segmentation marker bit may include a specific value and a value determined according to the number of segments of the service data. The specific value may be used to indicate that the traffic data is not fragmented. As an example, the specific value may be 0; when the number of the service data to be divided is M, the value of the division flag bit may be M-1.
Specifically, the coordination server may select a target cache server from the plurality of cache servers by using a preset server selection algorithm according to the data identifier. For example, the distributed cache server cluster may include N cache servers. Each cache server may have a server identification. Here, the server identifier may be used to identify the cache server, and may be, for example, an IP address, a MAC address, or a number of the cache server. The server identities of the N cache servers can be A0, A1, A2, …, A (N-1), respectively. Then, the coordinating server may calculate a hash value of the data identification; the target cache server may be selected based on a remainder of the hash value divided by N. Specifically, for example, when the remainder is 0, the coordinating server may select a cache server with a server identifier of a0 as a target cache server; when the remainder is 1, the coordinating server may select a cache server with a server identifier of a1 as a target cache server; by analogy, when the remainder is N-1, the coordination server may select a cache server with a server identifier A (N-1) as a target cache server.
In another implementation manner of this embodiment, when the data volume of the service data is greater than a preset value, the service server considers that the compression processing needs to be performed on the service data; any compression algorithm can be adopted to compress the service data to obtain compressed data; the data amount of the compressed data may be compared with the preset value. The compression algorithm may be, for example, a Zlib compression algorithm, an LZ4 compression algorithm, a Snappy compression algorithm, or a Huffman compression algorithm, among others.
In this embodiment, when the data amount of the compressed data is less than or equal to the preset value, the service server considers that the service data does not need to be segmented; compression flag bits may be added to the compressed data; the value of the compression flag bit may be set to represent a compressed value; a split flag bit may be added to the compressed data; the value of the segmentation marker bit may be set to represent an undivided value; the compressed data and the data identification may then be sent to the coordination server. The coordination server may receive the compressed data and the data identification; a target cache server can be selected from the plurality of cache servers according to the data identification; the compressed data and the data identification may be sent to the target cache server. The target cache server may receive the compressed data and the data identification; the compressed data and the data identifier can be correspondingly stored; a write success message may be sent to the coordinating server. The coordination server may receive a write success message; a message of successful writing may be sent to the service server. The service server can receive a message of successful writing; a message may be sent to the client that the write was successful.
In this embodiment, when the data volume of the compressed data is greater than the preset value, the service server considers that the service data needs to be segmented; the compressed data may be segmented according to the preset value to obtain a plurality of subdata. Specifically, the data amount of each sub data may be less than or equal to the preset value. The data amount of each sub data may be the same or different. The service server may perform segmentation processing on the compressed data by any method. For example, the service server may be based on a formula
And carrying out segmentation processing on the compressed data. M represents the number of partitions (i.e., the number of the plurality of sub data); q represents the data amount of the compressed data; t represents the preset value; []Representing the ceiling operator. Of course, the above formula is only an example, and actually, the service server may also use other formulas or methods to perform the segmentation processing on the compressed data.
The plurality of sub-data may be sequential. And merging the plurality of subdata according to the sequence to obtain the compressed data. Thus, the service server can add a compression flag bit in the first subdata; the value of the compression flag bit may be set to represent a compressed value; a partition flag bit may be added to the first sub data; the value of the split flag bit may be set according to the number of the plurality of sub data. For example, the number of the plurality of sub data may be M. Then, the service server may set the value of the split flag bit to M-1.
The service server may determine, according to the data identifier, a plurality of sub-data identifiers corresponding to the plurality of sub-data using a data identifier determination rule. The sub-data identifiers corresponding to different sub-data may be different. As an example, the data identification may be a key. The number of the plurality of sub data may be M. Then, using the data identity determination rule may result in: the subdata identifier of the first subdata is key, the subdata identifier of the second subdata is key-2, and so on, the subdata identifier of the Mth subdata is key-M.
The service server may send the plurality of sub data and the plurality of sub data identifiers to the coordination server. The coordinating server may receive the plurality of child data and the plurality of child data identifications. For each subdata and the subdata identifier corresponding to the subdata, the coordination server can select a target cache server from the plurality of cache servers according to the subdata identifier; the sub data and the sub data identifier may be sent to the target cache server. The target cache server may receive the subdata and the subdata identifier; the subdata and the subdata identifier can be correspondingly stored; a message that the writing of the sub data is successful may be sent to the coordinator server. After obtaining the message that the writing of the plurality of sub data is successful, the coordination server may send the message that the writing is successful to the service server. The service server can receive a message of successful writing; a message may be sent to the client that the write was successful.
In this embodiment, the client may send a data reading request to the service server. The service server may receive the data reading request; a first data identifier corresponding to the data reading request can be acquired; the first data identification may be sent to the coordinating server. The coordinating server may receive the first data identification; a target cache server can be selected from the plurality of cache servers according to the first data identification; the first data identification may be sent to the target cache server. The target cache server may receive the first data identification; the service data identified by the first data identification can be read locally as first service data; the first traffic data may be sent to the coordination server. The coordination server may receive the first traffic data; the first traffic data may be sent to the traffic server. The service server may receive the first service data.
Specifically, the first service data may include compression flag bits and segmentation flag bits.
Specifically, the data read request may carry the first data identifier. The service server may obtain the first data identifier. Alternatively, the data read request may also carry a plurality of field identifications. The service server may construct the first data identifier according to the plurality of field identifiers. For example, the service server may merge the plurality of field identifiers to obtain the first data identifier.
In an embodiment of this embodiment, the value of the compression flag bit may be a value representing an uncompressed value. The service server considers that the first service data is not compressed and is not sub-data generated by segmentation processing; the first traffic data may be sent to the client. The client may receive the first traffic data. Specifically, the service server may directly send the first service data to the client. Or, the service server may further send the first service data with the compression flag bit and the segmentation flag bit cleared to the client.
In another implementation of this embodiment, the value of the compression flag bit may be a value representing compression. The segmentation marker bit may take on a value that represents an undivided value. The service server considers that the first service data is compressed but not sub-data generated by segmentation processing; the first service data can be decompressed to obtain decompressed service data; the decompressed traffic data may be sent to the client. The client may receive the decompressed traffic data. Specifically, the service server may perform decompression processing on the first service data by using a decompression algorithm matched with the aforementioned compression algorithm. The service server may directly decompress the first service data. Or, the service server may further decompress the first service data from which the compression flag bit and the fragmentation flag bit are cleared.
In another implementation of this embodiment, the value of the compression flag bit may be a value representing compression. The segmentation marker bit may take on values other than values representing an undivided segment. Thus, the service server considers that the first service data is compressed and is sub-data generated by segmentation processing; at least one second data identity may be generated from the first data identity using the aforementioned data identity determination rule. The number of generated second data identifications may be associated with a value of the split flag bit. As an example, the number of the generated second data identifications may be the same as the value of the segmentation flag bit. As an example, the first data identification may be a key. The value of the segmentation marker bit can be M-1. Then M-1 second data identifications may be derived using the aforementioned data identification determination rule. The M-1 second data identifications can be key-2, key-3, … and key-M respectively.
The service server may send the at least one second data identity to the coordination server. The coordinating server may receive the at least one second data identity. For each second data identifier, the coordination server may select a target cache server from the plurality of cache servers according to the second data identifier; the second data identification may be sent to the target cache server. The target cache server may receive the second data identifier; the service data identified by the second data identification can be read locally as second service data; the second traffic data may be sent to the coordination server. The coordination server may receive the second service data; the second service data may be transmitted to the service server. The service server may receive the second service data. The service server may thus obtain at least one second service data corresponding to the at least one second data identifier.
The service server may perform merging processing on the first service data and the at least one second service data to obtain merged data; decompressing the merged data to obtain decompressed service data; the decompressed traffic data may be sent to the client. The client may receive the decompressed traffic data. Specifically, the service server may directly perform merging processing on the first service data and the at least one second service data. Or, the service server may further perform a merging process on the first service data and the at least one second service data from which the compression flag bit and the segmentation flag bit are cleared.
Please refer to fig. 6. Based on the foregoing data processing system embodiment, an embodiment of this specification further provides a data writing method. The data writing method takes the service server as an execution subject and can comprise the following steps.
Step S10: a data write request is received.
The data writing request corresponds to service data and a data identifier.
Step S12: and when the data volume of the service data is larger than a preset value, compressing the service data to obtain compressed data.
Step S14: and sending the compressed data and the data identification to a coordination server.
The service server may send the compressed data and the data identifier to the coordination server. The coordination server may receive the compressed data and the data identification; a write operation may be performed based on the compressed data and the data identification.
In an implementation manner of this embodiment, the service server may add a compression flag bit in the compressed data; the value of the compression flag bit may be set to represent a compressed value; a split flag bit may be added to the compressed data; the value of the segmentation marker bit may be set to represent an undivided value; the compressed data and the data identification may then be sent to a coordination server.
In an implementation manner of this embodiment, the service server may compare the data volume of the compressed data with the preset value. In this embodiment, when the data amount of the compressed data is less than or equal to the preset value, the service server may send the compressed data and the data identifier to the coordination server. In this embodiment, when the data amount of the compressed data is greater than the preset value, the service server may perform segmentation processing on the compressed data according to the preset value to obtain a plurality of sub data; determining a plurality of subdata identifications corresponding to the plurality of subdata according to the data identifications; the plurality of child data and the plurality of child data identifications may be transmitted to the coordinating server. Wherein, the data volume of each subdata can be less than or equal to the preset value; the data amount of each sub data may be the same or different. The coordination server may receive the plurality of subdata and the plurality of subdata identifications; a write operation may be performed based on the plurality of child data and the plurality of child data identifications. Further, the plurality of sub-data may be sequential. Thus, the service server can add a compression flag bit in the first subdata; the value of the compression flag bit may be set to represent a compressed value; a partition flag bit may be added to the first sub data; the value of the segmentation flag bit can be set according to the number of the plurality of subdata; and further, the plurality of sub data and the plurality of sub data identifiers may be sent to the coordination server.
In an implementation manner of this embodiment, when the data volume of the service data is less than or equal to the preset value, the service server may send the service data and the data identifier to a coordination server. The coordination server may receive the service data and the data identifier; a write operation may be performed based on the service data and the data identification. Further, the service server may also add a compression flag bit in the service data; the value of the compression flag bit may be set to represent an uncompressed value; a segmentation marker bit may be added to the traffic data; the value of the segmentation marker bit may be set to represent an undivided value; and then the service data and the data identification can be sent to a coordination server.
In this embodiment, the service server may receive a data write request; when the data volume of the service data is larger than a preset value, compressing the service data to obtain compressed data; the compressed data and the data identification may be sent to a coordination server; such that the coordination server performs a write operation based on the compressed data and the data identification. Therefore, by compressing the service data, the data volume of data written into a single cache server can be reduced; therefore, the load of a single cache server is reduced, and the stability of the distributed cache server cluster is improved.
Please refer to fig. 7. Based on the foregoing data processing system embodiment, another data writing method is also provided in the embodiments of the present specification. The data writing method takes the service server as an execution subject and can comprise the following steps.
Step S20: a data write request is received.
The data writing request corresponds to service data and a data identifier.
Step S22: and when the data volume of the service data is larger than a preset value, segmenting the service data according to the preset value to obtain a plurality of subdata.
Step S24: and determining a plurality of subdata identifications corresponding to the plurality of subdata according to the data identifications.
Step S26: and sending the plurality of subdata and the plurality of subdata identifications to a coordination server.
The service server may send the plurality of sub data and the plurality of sub data identifiers to a coordination server. The coordination server may receive the plurality of subdata and the plurality of subdata identifications; a write operation may be performed based on the plurality of child data and the plurality of child data identifications.
In an implementation manner of this embodiment, the plurality of sub-data may have a sequential order. Thus, the service server can add a compression flag bit in the first subdata; the value of the compression flag bit may be set to represent an uncompressed value; a partition flag bit may be added to the first sub data; the value of the segmentation flag bit can be set according to the number of the plurality of subdata; and further, the plurality of sub data and the plurality of sub data identifiers may be sent to the coordination server.
In an implementation manner of this embodiment, when the data volume of the service data is less than or equal to the preset value, the service server may send the service data and the data identifier to a coordination server. The coordination server may receive the service data and the data identifier; a write operation may be performed based on the service data and the data identification. Further, the service server may also add a compression flag bit in the service data; the value of the compression flag bit may be set to represent an uncompressed value; a segmentation marker bit may be added to the traffic data; the value of the segmentation marker bit may be set to represent an undivided value; and then the service data and the data identification can be sent to a coordination server. The coordination server may receive the service data and the data identifier; a write operation may be performed based on the service data and the data identification.
In this embodiment, the service server may receive a data write request; when the data volume of the service data is larger than a preset value, the service data is segmented according to the preset value to obtain a plurality of subdata; determining a plurality of subdata identifications corresponding to the plurality of subdata according to the data identifications; the plurality of subdata and the plurality of subdata identifications may be sent to a coordination server; to facilitate the coordinating server to perform a write operation based on the plurality of child data and the plurality of child data identifications. Thus, the service data is divided; the divided subdata can be dispersedly stored in the plurality of cache servers; the data volume of data written into a single cache server can be reduced; therefore, the load of a single cache server is reduced, and the stability of the distributed cache server cluster is improved.
Please refer to fig. 8. Based on the foregoing data processing system embodiment, an embodiment of this specification further provides a data reading method. The data reading method takes the service server as an execution subject and can comprise the following steps.
Step S30: a data read request is received.
The data reading request corresponds to a first data identification.
Step S32: and sending the first data identification to a coordination server.
Step S34: and receiving the first service data which is fed back by the coordination server and read according to the first data identifier.
The first traffic data may include compression flag bits.
Step S36: and when the value of the compression flag bit is a numerical value representing compression, decompressing the first service data to obtain decompressed service data.
Step S38: and feeding back the decompressed service data.
In an implementation manner of this embodiment, when the value of the compression flag bit is a value indicating that the compression flag bit is not compressed, the service server may feed back the first service data.
In an implementation manner of this embodiment, the first service data may further include a partition flag bit. When the value of the segmentation flag bit indicates an undivided numerical value and the value of the compression flag bit indicates a compressed numerical value, the service server may decompress the first service data to obtain decompressed service data.
In an implementation manner of this embodiment, the first service data may further include a partition flag bit. When the value of the segmentation marker bit is a value other than a value representing non-segmentation and the value of the compression marker bit is a value representing compression, the service server may generate at least one second data identifier according to the value of the segmentation marker bit and the first data identifier; the at least one second data identity may be sent to a coordination server; at least one second service data read according to the at least one second data identifier and fed back by the coordination server can be received; the first service data and the at least one second service data may be merged to obtain merged data; the merged data may be decompressed to obtain decompressed service data.
In this embodiment, the service server may receive a data reading request; the first data identification may be sent to a coordinating server; first service data which is fed back by a coordination server and read according to the first data identification can be received, wherein the first service data comprises a compression mark bit; when the value of the compression flag bit is a value representing compression, decompressing the first service data to obtain decompressed service data; the decompressed traffic data may be fed back. This can reduce the amount of data read from a single cache server; therefore, the load of a single cache server is reduced, and the stability of the distributed cache server cluster is improved.
Please refer to fig. 9. Based on the foregoing data processing system embodiment, another data reading method is also provided in the embodiments of the present specification. The data reading method takes the service server as an execution subject and can comprise the following steps.
Step S40: a data read request is received.
The data reading request corresponds to a first data identification.
Step S42: and sending the first data identification to a coordination server.
Step S44: and receiving the first service data which is fed back by the coordination server and read according to the first data identifier.
The first traffic data may include compression flag bits.
Step S46: and when the value of the compression mark bit is a numerical value representing the uncompressed state, feeding back the first service data.
In an implementation manner of this embodiment, the first service data may further include a partition flag bit. When the value of the segmentation flag bit indicates an undivided numerical value and the value of the compression flag bit indicates a compressed numerical value, the service server may feed back the first service data.
In an implementation manner of this embodiment, the first service data may further include a partition flag bit. When the value of the segmentation marker bit is a value other than a value representing non-segmentation and the value of the compression marker bit is a value representing compression, the service server may generate at least one second data identifier according to the value of the segmentation marker bit and the first data identifier; the at least one second data identity may be sent to a coordination server; at least one second service data read according to the at least one second data identifier and fed back by the coordination server can be received; the first service data and the at least one second service data may be merged to obtain merged data; the merged data may be fed back.
In this embodiment, the service server may receive a data reading request; the first data identification may be sent to a coordinating server; first service data which is fed back by a coordination server and read according to the first data identification can be received, wherein the first service data comprises a compression mark bit; the first service data may be fed back when the value of the compression flag bit is a value indicating that the compression is not performed. This can reduce the amount of data read from a single cache server; therefore, the load of a single cache server is reduced, and the stability of the distributed cache server cluster is improved.
Please refer to fig. 10. Based on the foregoing data processing system embodiment, another data reading method is also provided in the embodiments of the present specification. The data reading method takes the service server as an execution subject and can comprise the following steps.
Step S50: a data read request is received.
The data reading request corresponds to a first data identification.
Step S52: sending the first data identification to a coordination server;
step S54: and receiving the first service data which is fed back by the coordination server and read according to the first data identifier.
The first traffic data includes a fragmentation flag bit.
Step S56: and when the value of the segmentation marking bit is a numerical value representing that the segmentation marking bit is not segmented, feeding back the first service data.
In this embodiment, the service server may receive a data reading request; the first data identification may be sent to a coordinating server; first service data which is fed back by a coordination server and read according to the first data identification can be received, wherein the first service data comprises a segmentation mark bit; the first service data may be fed back when the segmentation flag bit takes a value indicating that the segmentation flag bit is not segmented. This can reduce the amount of data read from a single cache server; therefore, the load of a single cache server is reduced, and the stability of the distributed cache server cluster is improved.
Please refer to fig. 11. Based on the foregoing data processing system embodiment, another data reading method is also provided in the embodiments of the present specification. The data reading method takes the service server as an execution subject and can comprise the following steps.
Step S60: a data read request is received.
The data reading request corresponds to a first data identification.
Step S62: sending the first data identification to a coordination server;
step S64: and receiving the first service data which is fed back by the coordination server and read according to the first data identifier.
The first traffic data includes a fragmentation flag bit.
Step S66: and when the value of the segmentation marking bit is other than the value representing the non-segmentation, generating at least one second data identifier according to the value of the segmentation marking bit and the first data identifier.
Step S68: and sending the at least one second data identification to a coordination server.
Step S70: and receiving at least one second service datum which is fed back by the coordination server and read according to the at least one second data identifier.
Step S72: and merging the first service data and the at least one second service data to obtain merged data.
Step S74: and feeding back the combined data.
In this embodiment, the service server may receive a data reading request; the first data identification may be sent to a coordinating server; first service data which is fed back by a coordination server and read according to the first data identification can be received, wherein the first service data comprises a segmentation mark bit; when the value of the segmentation marker bit is other than the value representing the non-segmentation, at least one second data identifier is generated according to the value of the segmentation marker bit and the first data identifier; the at least one second data identity may be sent to a coordination server; at least one second service data read according to the at least one second data identifier and fed back by the coordination server can be received; the first service data and the at least one second service data may be merged to obtain merged data; the merged data may be fed back. This can reduce the amount of data read from a single cache server; therefore, the load of a single cache server is reduced, and the stability of the distributed cache server cluster is improved.
Please refer to fig. 12. Based on the data writing method embodiment corresponding to fig. 6, an embodiment of the present specification further provides a data writing device. The data writing apparatus may include the following units.
A receiving unit 80 for receiving a data write request; the data writing request corresponds to service data and a data identifier;
a compressing unit 82, configured to compress the service data to obtain compressed data when the data volume of the service data is greater than a preset value;
a sending unit 84, configured to send the compressed data and the data identifier to a coordination server; such that the coordination server performs a write operation based on the compressed data and the data identification.
Please refer to fig. 18. Based on the data writing method embodiment corresponding to fig. 6, an embodiment of the present specification further provides a server. The server may include a memory and a processor.
In this embodiment, the memory may be implemented in any suitable manner. For example, the memory may be a read-only memory, a mechanical hard disk, a solid state disk, a U disk, or the like. The memory may be used to store computer instructions.
In this embodiment, the processor may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The processor may execute the computer instructions to perform the steps of: receiving a data write request; the data writing request corresponds to service data and a data identifier; when the data volume of the service data is larger than a preset value, compressing the service data to obtain compressed data; sending the compressed data and the data identifier to a coordination server; such that the coordination server performs a write operation based on the compressed data and the data identification.
Please refer to fig. 13. Based on the data writing method embodiment corresponding to fig. 7, the present specification embodiment further provides a data writing device. The data writing apparatus may include the following units.
A receiving unit 90 for receiving a data write request; the data writing request corresponds to service data and a data identifier;
a dividing unit 92, configured to, when the data amount of the service data is greater than a preset value, divide the service data according to the preset value to obtain a plurality of sub data; the data volume of each subdata is smaller than or equal to the preset value;
a determining unit 94, configured to determine, according to the data identifier, a plurality of sub-data identifiers corresponding to the plurality of sub-data;
a sending unit 96, configured to send the multiple pieces of sub data and the multiple pieces of sub data identifiers to a coordination server; to facilitate the coordinating server to perform a write operation based on the plurality of child data and the plurality of child data identifications.
Please refer to fig. 18. Based on the data writing method embodiment corresponding to fig. 7, an embodiment of the present specification further provides a server. The server may include a memory and a processor.
In this embodiment, the memory may be implemented in any suitable manner. For example, the memory may be a read-only memory, a mechanical hard disk, a solid state disk, a U disk, or the like. The memory may be used to store computer instructions.
In this embodiment, the processor may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The processor may execute the computer instructions to perform the steps of: receiving a data write request; the data writing request corresponds to service data and a data identifier; when the data volume of the service data is larger than a preset value, segmenting the service data according to the preset value to obtain a plurality of subdata; the data volume of each subdata is smaller than or equal to the preset value; determining a plurality of subdata identifications corresponding to the plurality of subdata according to the data identifications; sending the plurality of subdata and the plurality of subdata identifications to a coordination server; to facilitate the coordinating server to perform a write operation based on the plurality of child data and the plurality of child data identifications.
Please refer to fig. 14. Based on the data reading method embodiment corresponding to fig. 8, the embodiment of this specification further provides a data reading apparatus. The data reading apparatus may include the following units.
A first receiving unit 100 for receiving a data read request; the data reading request corresponds to a first data identifier;
a sending unit, configured to send the first data identifier to a coordination server;
a second receiving unit 102, configured to receive the first service data read according to the first data identifier and fed back by the coordination server; the first service data comprises compression flag bits;
a decompression unit 104, configured to decompress the first service data when the value of the compression flag bit is a value indicating compression, to obtain decompressed service data;
a feedback unit 106, configured to feedback the decompressed service data.
Please refer to fig. 18. Based on the data reading method embodiment corresponding to fig. 8, an embodiment of the present specification further provides a server. The server may include a memory and a processor.
In this embodiment, the memory may be implemented in any suitable manner. For example, the memory may be a read-only memory, a mechanical hard disk, a solid state disk, a U disk, or the like. The memory may be used to store computer instructions.
In this embodiment, the processor may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The processor may execute the computer instructions to perform the steps of: receiving a data reading request; the data reading request corresponds to a first data identifier; sending the first data identification to a coordination server; receiving first service data which are fed back by the coordination server and read according to the first data identification; the first service data comprises compression flag bits; when the value of the compression flag bit is a numerical value representing compression, decompressing the first service data to obtain decompressed service data; and feeding back the decompressed service data.
Please refer to fig. 15. Based on the data reading method embodiment corresponding to fig. 9, the embodiment of this specification further provides a data reading apparatus. The data reading apparatus may include the following units.
A first receiving unit 110, configured to receive a data reading request; the data reading request corresponds to a first data identifier;
a sending unit 112, configured to send the first data identifier to a coordination server;
a second receiving unit 114, configured to receive the first service data read according to the first data identifier and fed back by the coordination server; the first service data comprises compression flag bits;
a feedback unit 116, configured to feed back the first service data when the value of the compression flag bit is an uncompressed value.
Please refer to fig. 18. Based on the data reading method embodiment corresponding to fig. 9, an embodiment of the present specification further provides a server. The server may include a memory and a processor.
In this embodiment, the memory may be implemented in any suitable manner. For example, the memory may be a read-only memory, a mechanical hard disk, a solid state disk, a U disk, or the like. The memory may be used to store computer instructions.
In this embodiment, the processor may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The processor may execute the computer instructions to perform the steps of: receiving a data reading request; the data reading request corresponds to a first data identifier; sending the first data identification to a coordination server; receiving first service data which are fed back by the coordination server and read according to the first data identification; the first service data comprises compression flag bits; and when the value of the compression mark bit is a numerical value representing the uncompressed state, feeding back the first service data.
Please refer to fig. 16. Based on the data reading method embodiment corresponding to fig. 10, the embodiment of this specification further provides a data reading apparatus. The data reading apparatus may include the following units.
A first receiving unit 120, configured to receive a data reading request; the data reading request corresponds to a first data identifier;
a sending unit 122, configured to send the first data identifier to a coordination server;
a second receiving unit 124, configured to receive the first service data read according to the first data identifier and fed back by the coordination server; the first service data comprises a segmentation marker bit;
a feedback unit 126, configured to feed back the first service data when the segmentation flag bit takes a value indicating that the segmentation flag bit is not segmented.
Please refer to fig. 18. Based on the data reading method embodiment corresponding to fig. 10, an embodiment of the present specification further provides a server. The server may include a memory and a processor.
In this embodiment, the memory may be implemented in any suitable manner. For example, the memory may be a read-only memory, a mechanical hard disk, a solid state disk, a U disk, or the like. The memory may be used to store computer instructions.
In this embodiment, the processor may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The processor may execute the computer instructions to perform the steps of: receiving a data reading request; the data reading request corresponds to a first data identifier; sending the first data identification to a coordination server; receiving first service data which are fed back by the coordination server and read according to the first data identification; the first service data comprises a segmentation marker bit; and when the value of the segmentation marking bit is a numerical value representing that the segmentation marking bit is not segmented, feeding back the first service data.
Please refer to fig. 17. Based on the data reading method embodiment corresponding to fig. 11, the embodiment of this specification further provides a data reading apparatus. The data reading apparatus may include the following units.
A first receiving unit 130 for receiving a data read request; the data reading request corresponds to a first data identifier;
a first sending unit 132, configured to send the first data identifier to a coordination server;
a second receiving unit 134, configured to receive the first service data read according to the first data identifier and fed back by the coordination server; the first service data comprises a segmentation marker bit;
a generating unit 136, configured to generate at least one second data identifier according to the value of the division flag bit and the first data identifier when the value of the division flag bit is a value other than a value indicating that the division is not performed;
a second sending unit 138, configured to send the at least one second data identifier to the coordination server;
a third receiving unit 140, configured to receive at least one second service data read according to the at least one second data identifier and fed back by the coordination server;
a merging unit 142, configured to merge the first service data and the at least one second service data to obtain merged data;
a feedback unit 144, configured to feed back the merged data.
Please refer to fig. 18. Based on the data reading method embodiment corresponding to fig. 11, an embodiment of the present specification further provides a server. The server may include a memory and a processor.
In this embodiment, the memory may be implemented in any suitable manner. For example, the memory may be a read-only memory, a mechanical hard disk, a solid state disk, a U disk, or the like. The memory may be used to store computer instructions.
In this embodiment, the processor may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The processor may execute the computer instructions to perform the steps of: receiving a data reading request; the data reading request corresponds to a first data identifier; sending the first data identification to a coordination server; receiving first service data which are fed back by the coordination server and read according to the first data identification; the first service data comprises a segmentation marker bit; when the value of the segmentation marking bit is other than the value representing the non-segmentation, generating at least one second data identifier according to the value of the segmentation marking bit and the first data identifier; sending the at least one second data identifier to a coordination server; receiving at least one second service data which is fed back by the coordination server and read according to the at least one second data identifier; merging the first service data and the at least one second service data to obtain merged data; and feeding back the combined data.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and the same or similar parts in each embodiment may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, as for the data writing method, the data writing device, the data reading method, the data reading device, and the server embodiment, since they are basically similar to the data processing system embodiment, the description is simple, and the relevant points can be referred to the partial description of the data processing system embodiment.
After reading this specification, persons skilled in the art will appreciate that any combination of some or all of the embodiments set forth herein, without inventive faculty, is within the scope of the disclosure and protection of this specification.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate a dedicated integrated circuit chip 2. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardbyscript Description Language (vhr Description Language), and the like, which are currently used by Hardware compiler-software (Hardware Description Language-software). It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, 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.
From the above description of the embodiments, it is clear to those skilled in the art that the present specification can be implemented by software plus a necessary general hardware platform. Based on such understanding, the technical solutions of the present specification may be essentially or partially implemented in the form of software products, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present specification.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The description is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
While the specification has been described with examples, those skilled in the art will appreciate that there are numerous variations and permutations of the specification that do not depart from the spirit of the specification, and it is intended that the appended claims include such variations and modifications that do not depart from the spirit of the specification.