CN114969062A - Data processing method and device, electronic equipment and computer storage medium - Google Patents

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

Info

Publication number
CN114969062A
CN114969062A CN202110205808.3A CN202110205808A CN114969062A CN 114969062 A CN114969062 A CN 114969062A CN 202110205808 A CN202110205808 A CN 202110205808A CN 114969062 A CN114969062 A CN 114969062A
Authority
CN
China
Prior art keywords
data
cloud storage
storage server
service
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110205808.3A
Other languages
Chinese (zh)
Inventor
张健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202110205808.3A priority Critical patent/CN114969062A/en
Publication of CN114969062A publication Critical patent/CN114969062A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0635Configuration or reconfiguration of storage systems by changing the path, e.g. traffic rerouting, path reconfiguration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

The disclosure relates to a data processing method, a data processing device, an electronic apparatus, and a computer storage medium. The method is applied to a service server and comprises the following steps: receiving a first service request from a terminal; under the condition that the first service request is a reading request, returning a first message carrying a reading position to the terminal so that the terminal can read data from the cloud storage server according to the reading position; and under the condition that the first service request is a write-in request, returning a second message carrying the authentication identifier to the terminal so that the terminal can access the cloud storage server according to the authentication identifier to write data into the cloud storage server. The embodiment of the disclosure not only can effectively save a large amount of cost, but also can improve the service processing efficiency.

Description

Data processing method and device, electronic equipment and computer storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of cloud data, and more particularly, to a data processing method and apparatus, an electronic device, and a computer storage medium.
Background
The cloud storage server has the advantages of being low in cost, capable of achieving remote centralized management, free of limitation of regions and flow, high in safety and the like, and therefore more and more enterprises can select the cloud storage server to store business data.
In the case of selecting to use the cloud storage server, the terminal and the cloud storage server perform data interaction through a business server of an enterprise, for example, the business server needs to download data from the cloud storage server and send the data to the terminal, and the business server needs to cache the data from the terminal and upload the data to the cloud storage server. However, in a highly concurrent scenario where the access volume of the service server is increased, it is difficult for the service server to support the above data interaction process. At present, most of the strategies for dealing with the high concurrency scenario are to perform horizontal expansion on the business side, for example, purchasing storage capacity resources such as a disk or a memory, or adding a cache layer, and the like, which requires a large cost.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a new technical solution for coping with a high concurrency scenario of the internet.
According to a first aspect of the present disclosure, there is provided a data processing method applied to a service server, the method including: receiving a first service request from a terminal; under the condition that the first service request is a reading request, returning a first message carrying a reading position to the terminal so that the terminal can read data from the cloud storage server according to the reading position; and under the condition that the first service request is a write-in request, returning a second message carrying the authentication identifier to the terminal so that the terminal can access the cloud storage server according to the authentication identifier to write data into the cloud storage server.
Optionally, before returning the second message carrying the authentication identifier to the terminal, the method further includes: and encrypting a secret key of a cloud storage server which is configured in the service server in advance to generate an authentication identifier.
Optionally, the reading position includes a domain name of the cloud storage server and a storage address of the data to be read in the cloud storage server, so that the terminal can access the cloud storage server according to the domain name of the cloud storage server and read the data to be read from the cloud storage server according to the storage address of the data to be read in the cloud storage server.
Optionally, the reading position includes a domain name of the service server and a data identifier of the data to be read, so that the terminal can access the cloud storage server through the domain name server according to the domain name of the service server and read the data to be read from the cloud storage server according to the data identifier of the data to be read; the mapping relation from the domain name of the service server to the domain name of the cloud storage server is pre-configured in the domain name server.
Optionally, the method further includes: sending query messages to a cloud storage server at preset intervals; receiving data updating information returned by the cloud storage server according to the query message; wherein, the data updating information comprises: updating data identification of data in preset time and a storage address of the data in a cloud storage server; and updating the service database according to the data updating information.
Optionally, the method further includes: receiving a callback message from a cloud storage server; the callback message carries a data identifier of updated data and a storage address of the data in the cloud storage server; and updating the service database according to the callback message.
Optionally, the data related to the first service request is unstructured data; the method further comprises the following steps: receiving a second service request from the terminal; wherein, the data related to the second service request is structural data; under the condition that the second service request is a reading request, acquiring data from the cloud storage server and sending the data to the terminal; and acquiring data from the terminal and storing the data into the cloud storage server under the condition that the second service request is a write request.
According to a second aspect of the present disclosure, there is also provided a data processing method applied to a terminal, the method including: sending a first service request to a service server; under the condition that the first service request is a reading request, receiving a first message which is returned by the service server and carries a reading position, and reading data from the cloud storage server according to the reading position; and under the condition that the first service request is a write-in request, receiving a second message which is returned by the service server and carries an authentication identifier, and accessing the cloud storage server according to the authentication identifier to write data into the cloud storage server.
According to a third aspect of the present disclosure, there is also provided a data processing apparatus applied to a service server, the apparatus including: the receiving module is used for receiving a first service request from a terminal; the processing module is used for returning a first message carrying a reading position to the terminal under the condition that the first service request received by the receiving module is a reading request, so that the terminal can read data from the cloud storage server according to the reading position; the processing module is further configured to return a second message carrying the authentication identifier to the terminal when the first service request received by the receiving module is a write-in request, so that the terminal accesses the cloud storage server according to the authentication identifier to write data into the cloud storage server.
According to a fourth aspect of the present disclosure, there is also provided a data processing apparatus applied to a terminal, the apparatus including: the sending module is used for sending a first service request to a service server; the receiving module is used for receiving a first message which is returned by the service server and carries a reading position under the condition that the first service request sent by the sending module is a reading request; the processing module is used for reading data from the cloud storage server according to the reading position under the condition that the receiving module receives a first message which is returned by the service server and carries the reading position; the receiving module is further used for receiving a second message which is returned by the service server and carries the authentication identifier under the condition that the first service request sent by the sending module is a write-in request; and the processing module is also used for accessing the cloud storage server according to the authentication identifier to write data into the server under the condition that the receiving module receives a second message which is returned by the service server and carries the authentication identifier.
According to a fifth aspect of the present disclosure, there is also provided an electronic device comprising a memory for storing a computer program and a processor; the processor is adapted to execute the computer program to implement the method according to the first or second aspect of the present disclosure.
According to a sixth aspect of the present disclosure, there is also provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method according to the first or second aspect of the present disclosure.
The method has the advantages that the first service request from the terminal can be divided into a reading request and a writing request on the service server side, the terminal can read data from the cloud storage server according to the reading position by returning the first message carrying the reading position to the terminal under the condition that the first service request is the reading request, and compared with the condition that the current service server needs to download data from the cloud storage server for the terminal to read, in the embodiment of the disclosure, the service side does not need to be transversely expanded, so that a large amount of cost is effectively saved, and meanwhile, the reading request of the terminal can be met; in the case that the first service request is a write-in request, the terminal accesses the cloud storage server according to the authentication identifier by returning a second message carrying the authentication identifier to the terminal to write data into the cloud storage server, and compared with the case that the current service server needs to cache the data written by the terminal first so as to write the data into the cloud storage server, in the embodiment of the disclosure, the service side does not need to be expanded horizontally, so that a large amount of cost is effectively saved, and meanwhile, the write-in request of the terminal can be met. In addition, the embodiment of the disclosure does not need a service server to transfer data, thereby saving bandwidth resources for processing the write-in request, and the service server only needs to perform simple calculation with short consumed time, thereby improving the service processing efficiency.
Other features of embodiments of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the embodiments of the disclosure.
Fig. 1 shows a schematic diagram of a terminal and a cloud storage server performing data interaction through a service server;
FIG. 2 is a schematic flow chart diagram of a data processing method according to some embodiments of the present disclosure;
FIG. 3 is a schematic flow diagram of another data processing method according to some embodiments of the present disclosure;
FIG. 4 is a schematic flow chart diagram of yet another data processing method according to some embodiments of the present disclosure;
FIG. 5 is a schematic flow chart diagram of yet another data processing method according to some embodiments of the present disclosure;
FIG. 6 is a schematic flow chart diagram of yet another data processing method according to some embodiments of the present disclosure;
FIG. 7 is a schematic flow chart diagram of yet another data processing method according to some embodiments of the present disclosure;
FIG. 8 is a functional block diagram of a data processing apparatus according to some embodiments of the present disclosure;
FIG. 9 is a functional block diagram of another data processing apparatus according to some embodiments of the present disclosure;
FIG. 10 is a hardware architecture diagram of an electronic device according to some embodiments.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Fig. 1 shows a schematic diagram of a terminal and a cloud storage server performing data interaction through a service server. As shown in fig. 1, a user of a service server writes data into the service server through a terminal, the service server caches the data, and writes the data into a cloud storage server; when reading the data, an operator sends a request to the service server through the terminal, the service server downloads corresponding data from the cloud storage server according to the request, and the terminal reads the data from the service server.
In the internet, a large number of users upload data to a service server through a terminal every moment, and a large number of users download cloud data to the terminal through the service server. In this case, the service server needs to handle huge data traffic every day (the data traffic per day is usually more than 500 PB), and can cope with a high concurrency scenario with a large amount of access at any time.
For example, for an internet enterprise that deals with social media such as internet (e.g., forums, social networking sites, micro blogs, etc.), which typically has an enormous volume of internet users, such as tens of millions or billions of users, a business server of the internet enterprise needs to process a large amount of data each time period. In this case, the internet enterprise usually also holds various operation activities, so as to stimulate the user to access the website of the internet enterprise or access the application program (client) of the internet enterprise, and a large number of users access the service server of the internet enterprise within the open time of the operation activities, in this case, the service server of the internet enterprise needs to cope with a high concurrency scenario of the increase of the access amount; alternatively, when some hot events occur, the discussion volume of the internet social media will rise sharply, in which case the business server of the internet enterprise also needs to deal with the high concurrency scenario of the surge of access volume.
In practical situations, the strategy for dealing with the high concurrency scenario is to perform horizontal expansion on the traffic side. For example, purchasing storage capacity resources such as a disk and a memory, or adding a cache layer, etc., to increase the amount of data that can be cached by the service server. However, the purchase of the storage capacity resource requires a large purchase cost, and the addition of the cache layer requires a large maintenance cost, resulting in a large cost. In addition, although the current and speed limitation on the service side can cope with the high concurrency scenario, and the cost is lower compared with the policy, this method will limit the access of the user and hurt the user experience.
In order to solve the existing problems, the embodiments of the present disclosure provide a data processing method.
< first embodiment of the method >
Fig. 2 is a flow diagram of a data processing method according to some embodiments of the present disclosure. As shown in fig. 2, the method is applied to a service server. The data processing method of the present embodiment may include the following steps S210 to S230:
step S210, receiving a first service request from the terminal.
The first service request may be a read request requesting to read data from the service server, or may be a write request requesting to write data to the service server.
In some examples, the data involved in the first service request is unstructured data. The unstructured data is, for example, data generated by social media, such as text, pictures, audio, and video, which are uploaded or downloaded by a user through the social media.
In some examples, the data involved in the first service request is static data. For example, static files in which the data accessed in different requests are the same, such as pictures, audio, video, files in a website (e.g., files suffixed by html, css, or js), software installation packages, compressed package files, and so forth.
The type of the first service request includes: read requests and write requests. There are various ways of obtaining the type of the first service request. For example, identifying that the first service request is a read request or a write request according to the encapsulation parameters of the first service request; as another example, the first service request is identified as a read request or a write request, etc. based on a field in the first service request. The embodiment of the present disclosure does not limit the manner of obtaining the type of the first service request, as long as the type of the first service request can be obtained.
After the type of the first service request is obtained, different steps may be performed according to different obtaining results. Wherein, in case that the first service request is a read request, step S220 is executed; in case the first service request is a write request, step S230 is performed.
Step S220: and under the condition that the first service request is a reading request, returning a first message carrying a reading position to the terminal so that the terminal can read data from the cloud storage server according to the reading position.
The reading position contains specific position information of the data to be read (namely, the data requested to be read by the first service request), and the terminal can access the position of the data to be read according to the specific position information and read the data to be read stored in the position. The read location is, for example, a Uniform Resource Locator (URL) of the data to be read.
In some examples, the reading position includes a domain name of the cloud storage server and a storage address of the data to be read in the cloud storage server, so that the terminal can access the cloud storage server according to the domain name of the cloud storage server and read the data to be read from the cloud storage server according to the storage address of the data to be read in the cloud storage server.
Illustratively, the cloud storage server stores data based on object storage service (OBS), in which case the data of the cloud storage server is stored in a corresponding bucket, and the storage addresses include: and the bucket identification of the bucket corresponding to the data to be read.
For example, if the domain name of the cloud storage server is "xxx. And the service server sends the URL to the terminal, and the terminal can acquire data corresponding to the file 123 from the cloud storage server according to the URL.
In other examples, the internet enterprise does not want to expose the domain name of the cloud storage server used by the internet enterprise due to actual needs, and in order to meet the above requirements of the internet enterprise, the reading position contains the domain name of the service server and the data identifier of the data to be read, and does not contain the domain name of the cloud storage server. In this case, for a domain name server that provides a domain name for a service server, a mapping relationship from the domain name of the service server to the domain name of the cloud storage server is configured in advance in the domain name server, and the mapping relationship is, for example, a CNAME record (or called alias record) in which the domain name of the service server points to the domain name of the cloud storage server. In the cloud storage server, a binding relationship between a domain name of a service server and a bucket corresponding to the service server is pre-established, and the bucket corresponding to the service server is used for storing data of the service server.
In this case, after a first message carrying a reading position is returned to the terminal, the terminal acquires a domain name of a service server in the reading position, an access request carrying the domain name of the service server is sent to the DNS server, the DNS server resolves the received domain name of the service server, and then sends the access request to the domain name server, the domain name server obtains the domain name of the cloud storage server according to the mapping relationship, and returns the access request carrying the domain name of the cloud storage server to the DNS server, the DNS server sends the access request to the cloud storage server according to the received domain name of the cloud storage server, so that the access request is sent to the cloud storage server, and after that, the terminal reads data to be read from the cloud storage server according to a data identifier of the data to be read.
For example, if the cloud storage server stores data based on the object storage service, the data of the cloud storage server is stored in a corresponding bucket, in this case, after receiving the reading position, the terminal accesses a domain name server corresponding to the domain name through a DNS server according to the domain name of the service server in the reading position, a mapping relationship from the domain name of the service server to the domain name of the cloud storage server is preconfigured in the domain name server, the domain name server directs an access address of the terminal to the cloud storage server through the DNS server according to the mapping relationship, a binding relationship between the domain name of the service server and a bucket is preconfigured in the cloud storage server, the cloud storage server directs the access address of the terminal to the bucket bound to the domain name of the service server according to the binding relationship, and finally, the terminal reads the data to be read from the bucket according to the data identifier of the data to be read.
For example, if the domain name of the cloud storage server is "xxx. Com/file 123. After receiving the URL, the terminal accesses a domain name server of abc.com according to the URL, a mapping relation abc.com → xxx.closed.com is stored in the domain name server, the domain name server points an access address of the terminal to a cloud storage server according to the mapping relation, the cloud storage server is pre-configured with a binding relation between abc.com and a storage bucket, the cloud storage server points the access address of the terminal to the storage bucket bound with abc.com according to the binding relation, and finally, data corresponding to the file 123 can be acquired from the storage bucket according to a data identifier 'file 123' in the URL.
Step S230: and under the condition that the first service request is a write-in request, returning a second message carrying the authentication identifier to the terminal so that the terminal can access the cloud storage server according to the authentication identifier to write data into the cloud storage server.
When the first service request is a write request, the security of the write request from the terminal needs to be verified by setting an authentication identifier to ensure the security of data in the cloud storage server due to the risk of tampering the data stored in the cloud storage server.
The authentication identifier may be, for example, a string of characters (the string of characters is also commonly referred to as a token), which contains a key of the cloud storage server. And after receiving the authentication identifier, the cloud storage server acquires and decrypts the key of the storage server contained in the authentication identifier, and allows the terminal to write data into the cloud storage server under the condition of successful decryption.
Before performing step S210, the service server may receive a secret key of the cloud storage server sent by the cloud storage server in advance, generate the authentication identifier according to the secret key of the cloud storage server, and then store the authentication identifier in the service database or the cache of the service server.
And under the condition that the first service request is received and is a write-in request, the service server extracts the authentication identifier from the service database or the cache of the service server and sends the authentication identifier to the terminal. And after receiving the access request, the cloud storage service decrypts the key in the authentication identifier, and allows the terminal to write data into the cloud storage server when the decryption is successful.
The cloud storage server can determine whether the terminal is allowed to access according to the received authentication identification from the terminal, and the authentication identification carried by the terminal during access comes from the service server, so that the cloud storage server authenticates the authentication identification from the terminal, and actually authenticates both the service server and the terminal at the same time, thereby ensuring the security of data in the cloud storage server. And other malicious requests are prevented from tampering the data in the cloud storage server.
It can be understood that, in order to ensure the security of the data in the cloud storage server, in step S210, the first message may also carry the authentication identifier, and in this case, after receiving the authentication identifier, the cloud storage server decrypts the key of the cloud storage server included in the authentication identifier, and after the decryption succeeds, allows the terminal to read the data from the cloud storage server.
As shown in fig. 3, after step S230 is executed, the embodiment of the present disclosure may further execute steps S310 to S330 as follows:
step S310: and sending a query message to the cloud storage server at preset intervals.
In the case that the cloud storage server stores data based on the object storage service, the data of the cloud storage server is stored in a corresponding bucket, and the query message may include identification information for identifying the bucket corresponding to the business server. For example, the query message may include bucket identifiers of buckets corresponding to the service servers; for another example, in a case that a binding relationship between the domain name of the service server and the bucket is preconfigured in the cloud storage server (see the corresponding description in step S230), the query message may include the domain name of the service server, so that the cloud storage server determines the bucket corresponding to the service server according to the domain name of the service server and the binding relationship.
The preset time can be set by a person skilled in the art according to actual situations, and the embodiment of the disclosure does not limit this.
Step S320: receiving data updating information returned by the cloud storage server according to the query message; wherein, the data updating information comprises: the data identification of the data updated within the preset time and the storage address of the data in the cloud storage server.
For example, in the case that the cloud storage server stores data based on the object storage service, the cloud storage server queries a bucket corresponding to the business server according to the query message, generates a storage address of the data in the cloud storage server according to a bucket identifier of the bucket, and returns a data identifier of the data updated by the bucket within a preset time and the storage address. The storage address contains a bucket identifier of a bucket corresponding to the service server.
Step S330: and updating the service database according to the data updating information.
And updating the storage address of the data identifier into the storage address of the data in the data updating information according to the data identifier of the updated data in the data updating information, so that the reading position carrying the storage address is sent to the terminal when a reading request aiming at the data from the terminal is received next time. In addition, the data identification of the updated data in the data updating information can be counted, so that the purposes of counting and sensing the content and the times of uploading the data are achieved.
As shown in fig. 4, after performing step S230, the embodiment of the present disclosure may further perform the following steps S410 to S420:
step S410: receiving a callback message from a cloud storage server; and the callback message carries the data identifier of the updated data and the storage address of the data in the cloud storage server.
In this step, the storage address is, for example, a bucket identifier of a bucket of the data in the cloud storage server.
Step S420: and updating the service database according to the callback message.
And updating the storage address of the data identifier into the storage address of the data in the data updating information according to the data identifier of the updated data in the callback message, so that the reading position carrying the storage address is sent to the terminal when a reading request aiming at the data from the terminal is received next time. In addition, the data identification of the updated data in the callback message can be counted, so that the purpose of counting and sensing the content and the times of the uploaded data is achieved.
In some embodiments, in the case that the data related to the first service request is non-structural data, as shown in fig. 5, the method of the embodiment of the present disclosure further includes steps S510 to S540:
step S510: a second service request is received from the terminal.
The data involved in the second service request are structured data, for example, the implemented data may be logically represented in a two-dimensional table structure.
Step S520: and acquiring the type of the second service request.
The type of the second service request and the manner of obtaining the type of the second service request are respectively the same as the type of the first service request and the manner of obtaining the type of the first service request in step S210, which may specifically refer to the corresponding description in step S210, and details are not described here.
After the type of the second service request is obtained, different steps may be performed according to different obtaining results. Wherein, in case that the second service request is a read request, step S530 is executed; in the case where the second service request is a write request, step S540 is performed.
Step S530: and under the condition that the second service request is a reading request, acquiring data from the cloud storage server and sending the data to the terminal.
And the service server downloads data from the cloud storage server to the local according to the reading request, and then sends the downloaded data to the terminal so as to respond to the reading request from the terminal.
Step S540: and acquiring data from the terminal and storing the data into the cloud storage server under the condition that the second service request is a write request.
The service server obtains data from the terminal according to the write-in request, caches the data to the local, and then sends the cached data to the cloud storage server so as to respond to the write-in request from the terminal.
Typically, high concurrency scenarios occur only during a certain period of time, such as the time when an internet enterprise is open to operational activities, which typically occurs when the amount of data is dramatically reduced. Based on this, as shown in fig. 6, the embodiment of the present disclosure may further perform the following steps S610 to S640:
step S610: and judging whether the data flow processed by the service processor is less than or equal to a preset threshold value at preset time intervals.
If the judgment result is yes, the data flow processed by the service processor is smaller than or equal to a preset threshold value; executing steps S620-S650; if the judgment result is negative, the data flow processed by the service processor is larger than a preset threshold value; steps S210 to S230 are performed.
Step S620: a first service request is received from a terminal.
The execution process of step S620 is the same as step S210, and reference may be made to the corresponding description in step S210, which is not described herein again.
Step S630: and under the condition that the first service request is a reading request, acquiring data from the cloud storage server and sending the data to the terminal.
Step S640: and acquiring data from the terminal and storing the data in the cloud storage server under the condition that the first service request is a write request.
< method example two >
Fig. 7 is a flow chart illustrating a further data processing method applied to a terminal according to some embodiments of the present disclosure. As shown in fig. 7, the data processing method may include the following step S710S 730:
step S710: and sending the first service request to a service server.
The first service request is the same as the first service request in step S210, and specific reference may be made to the corresponding description in step S210, which is not described herein again.
Step S720: and under the condition that the first service request is a reading request, receiving a first message which is returned by the service server and carries a reading position, and reading data from the cloud storage server according to the reading position.
The execution process of this step may refer to the corresponding description in step S230, and is not described herein again.
Step S730: and under the condition that the first service request is a write-in request, receiving a second message which is returned by the service server and carries an authentication identifier, and accessing the cloud storage server according to the authentication identifier to write data into the cloud storage server.
The execution process of this step may refer to the corresponding description in step S230, and is not described herein again.
< apparatus embodiment >
Fig. 8 is a functional block diagram of a data processing apparatus according to some embodiments of the present disclosure. As shown in fig. 8, the data processing apparatus 80 is applied to a service server, and the data processing apparatus 80 includes: a receiving module 81 and a processing module 82.
The receiving module 81 is configured to receive a first service request from a terminal.
The processing module 82 is configured to, when the first service request received by the receiving module 81 is a read request, return a first message carrying a read position to the terminal, so that the terminal reads data from the cloud storage server according to the read position.
The processing module 82 is further configured to, when the first service request received by the receiving module 81 is a write request, return a second message carrying an authentication identifier to the terminal, so that the terminal accesses the cloud storage server according to the authentication identifier to write data into the cloud storage server.
In some embodiments, the data processing apparatus further comprises: and the generating module is used for encrypting a secret key of the cloud storage server which is configured in the service server in advance so as to generate the authentication identification.
In some embodiments, the reading position includes a domain name of the cloud storage server and a storage address of the data to be read in the cloud storage server, so that the terminal can access the cloud storage server according to the domain name of the cloud storage server and read the data to be read from the cloud storage server according to the storage address of the data to be read in the cloud storage server.
In some embodiments, the reading position includes a domain name of the service server and a data identifier of the data to be read, so that the terminal accesses the cloud storage server through the domain name server according to the domain name of the service server, and reads the data to be read from the cloud storage server according to the data identifier of the data to be read; the mapping relation from the domain name of the service server to the domain name of the cloud storage server is pre-configured in the domain name server.
In some embodiments, the data processing apparatus further comprises: the updating module is used for sending query messages to the cloud storage server at intervals of preset time; receiving data updating information returned by the cloud storage server according to the query message; wherein, the data updating information comprises: updating data identification of data in preset time and a storage address of the data in a cloud storage server; and updating the service database according to the data updating information.
In some embodiments, the data processing apparatus further comprises: the updating module is used for receiving callback messages from the cloud storage server; the callback message carries a data identifier of updated data and a storage address of the data in the cloud storage server; and updating the service database according to the callback message.
In some embodiments, the data involved in the first service request is unstructured data; the data processing apparatus further includes: the second service request module is used for receiving a second service request from the terminal; wherein, the data related to the second service request is structural data; under the condition that the second service request is a reading request, acquiring data from the cloud storage server and sending the data to the terminal; and acquiring data from the terminal and storing the data in the cloud storage server under the condition that the second service request is a write request.
Fig. 9 is a functional block diagram of a data processing apparatus according to some embodiments of the present disclosure. As shown in fig. 9, the data processing apparatus 90 applied to a terminal includes: a sending module 91, a receiving module 92 and a processing module 93.
A sending module 91, configured to send the first service request to the service server.
The receiving module 92 is configured to receive a first message carrying a reading position, which is returned by the service server, when the first service request sent by the sending module 91 is a reading request.
And the processing module 93 is configured to, when the receiving module 92 receives the first message carrying the reading position and returned by the service server, read data from the cloud storage server according to the reading position.
The receiving module 92 is further configured to receive, when the first service request sent by the sending module 91 is a write request, a second message carrying the authentication identifier and returned by the service server.
The processing module 93 is further configured to, when the receiving module 92 receives a second message carrying the authentication identifier and returned by the service server, access the cloud storage server according to the authentication identifier to write data into the server.
Fig. 10 is a hardware architecture diagram of an electronic device according to some embodiments of the present disclosure.
As shown in fig. 10, the electronic device 1000 comprises a processor 1010 and a memory 1020, the memory 1020 being adapted to store an executable computer program, the processor 1010 being adapted to perform a method according to any of the above method embodiments, under control of the computer program.
The electronic device 1000 may be a service server or a terminal. The terminal can be a mobile terminal such as a mobile phone, a tablet computer, and a vehicle-mounted computer.
The modules of the electronic device 1000 may be implemented by the processor 1010 executing the computer program stored in the memory 1020 in the embodiment, or may be implemented by other circuit structures, which is not limited herein.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer-readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.

Claims (12)

1. A data processing method is applied to a service server, and the method comprises the following steps:
receiving a first service request from a terminal;
under the condition that the first service request is a reading request, returning a first message carrying a reading position to the terminal so that the terminal can read data from a cloud storage server according to the reading position;
and under the condition that the first service request is a write-in request, returning a second message carrying an authentication identifier to the terminal so that the terminal can access the cloud storage server according to the authentication identifier to write data into the cloud storage server.
2. The data processing method according to claim 1, wherein before returning a second message carrying an authentication identifier to the terminal, the method further comprises:
and encrypting a key of the cloud storage server pre-configured in the service server to generate the authentication identifier.
3. The data processing method according to claim 1, wherein the reading position includes a domain name of the cloud storage server and a storage address of the data to be read in the cloud storage server, so that the terminal accesses the cloud storage server according to the domain name of the cloud storage server and reads the data to be read from the cloud storage server according to the storage address of the data to be read in the cloud storage server.
4. The data processing method according to claim 1, wherein the reading position includes a domain name of the service server and a data identifier of data to be read, so that the terminal accesses the cloud storage server through the domain name server according to the domain name of the service server, and reads the data to be read from the cloud storage server according to the data identifier of the data to be read;
and the domain name server is pre-configured with a mapping relation from the domain name of the service server to the domain name of the cloud storage server.
5. A data processing method according to claim 3 or 4, characterized in that the method further comprises:
sending query messages to the cloud storage server at intervals of preset time;
receiving data updating information returned by the cloud storage server according to the query message; wherein the data update information includes: the data identification of the updated data in the preset time and the storage address of the data in the cloud storage server;
and updating the service database according to the data updating information.
6. A data processing method according to claim 3 or 4, characterized in that the method further comprises:
receiving a callback message from the cloud storage server; the callback message carries a data identifier of updated data and a storage address of the data in the cloud storage server;
and updating the service database according to the callback message.
7. The data processing method of claim 1, wherein the data related to the first service request is unstructured data;
the method further comprises the following steps:
receiving a second service request from the terminal; wherein, the data related to the second service request is structural data;
under the condition that the second service request is a reading request, acquiring data from a cloud storage server and sending the data to a terminal;
and acquiring data from the terminal and storing the data into the cloud storage server under the condition that the second service request is a write request.
8. A data processing method is applied to a terminal, and the method comprises the following steps:
sending a first service request to a service server;
under the condition that the first service request is a reading request, receiving a first message which is returned by the service server and carries a reading position, and reading data from a cloud storage server according to the reading position;
and under the condition that the first service request is a write-in request, receiving a second message which is returned by the service server and carries an authentication identifier, and accessing the cloud storage server according to the authentication identifier to write data into the cloud storage server.
9. A data processing apparatus, applied to a service server, the apparatus comprising:
the receiving module is used for receiving a first service request from a terminal;
the processing module is configured to return a first message carrying a reading position to the terminal when the first service request received by the receiving module is a reading request, so that the terminal reads data from a cloud storage server according to the reading position;
the processing module is further configured to return a second message carrying an authentication identifier to the terminal when the first service request received by the receiving module is a write-in request, so that the terminal accesses the cloud storage server according to the authentication identifier to write data into the cloud storage server.
10. A data processing apparatus, applied to a terminal, the apparatus comprising:
the sending module is used for sending a first service request to a service server;
a receiving module, configured to receive a first message carrying a reading position and returned by the service server when the first service request sent by the sending module is a reading request;
the processing module is used for reading data from the cloud storage server according to the reading position under the condition that the receiving module receives a first message which is returned by the service server and carries the reading position;
the receiving module is further configured to receive a second message carrying an authentication identifier and returned by the service server when the first service request sent by the sending module is a write request;
the processing module is further configured to, when the receiving module receives a second message carrying an authentication identifier returned by the service server, access the cloud storage server according to the authentication identifier to write data into the server.
11. An electronic device comprising a memory and a processor, the memory for storing a computer program; the processor is adapted to execute the computer program to implement the method according to any of claims 1-8.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the method according to any one of claims 1-8.
CN202110205808.3A 2021-02-24 2021-02-24 Data processing method and device, electronic equipment and computer storage medium Pending CN114969062A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110205808.3A CN114969062A (en) 2021-02-24 2021-02-24 Data processing method and device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110205808.3A CN114969062A (en) 2021-02-24 2021-02-24 Data processing method and device, electronic equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN114969062A true CN114969062A (en) 2022-08-30

Family

ID=82973395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110205808.3A Pending CN114969062A (en) 2021-02-24 2021-02-24 Data processing method and device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN114969062A (en)

Similar Documents

Publication Publication Date Title
US8914856B1 (en) Synchronization of networked storage systems and third party systems
EP3203709B1 (en) Cloud service server and method for managing cloud service server
US20130215126A1 (en) Managing Font Distribution
US10972576B2 (en) Content acceleration for cross-site resources by CDN
US10659516B2 (en) Data caching and resource request response
US9876846B2 (en) Data transmission
US20170371625A1 (en) Content delivery method
CN109521956B (en) Cloud storage method, device, equipment and storage medium based on block chain
CN109542862B (en) Method, device and system for controlling mounting of file system
CN108449187B (en) Token refreshing method and device
US20170366501A1 (en) Domain name service information propagation
US9350735B1 (en) Context-based dynamic information rights management
US10671686B2 (en) Processing webpage data
US11176274B2 (en) Protecting user data
CN109088872B (en) Using method and device of cloud platform with service life, electronic equipment and medium
CN108880923A (en) The method and apparatus that policer operation applied to application server is requested
US8396969B1 (en) Domain name buckets in a hosted storage system
US9948694B2 (en) Addressing application program interface format modifications to ensure client compatibility
CN112905990A (en) Access method, client, server and access system
CN112818038A (en) Data management method based on combination of block chain and IPFS (Internet protocol file system) and related equipment
US10068065B2 (en) Assignment of a machine-readable link to content as a payoff
CN111988405B (en) Message rewriting method of load balancing device and load balancing device
CN114969062A (en) Data processing method and device, electronic equipment and computer storage medium
CN112182603B (en) Anti-crawler method and device
CN112448931B (en) Network hijacking monitoring method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination