WO2021147773A1 - Data processing method and apparatus, electronic device and computer-readable storage medium - Google Patents

Data processing method and apparatus, electronic device and computer-readable storage medium Download PDF

Info

Publication number
WO2021147773A1
WO2021147773A1 PCT/CN2021/072002 CN2021072002W WO2021147773A1 WO 2021147773 A1 WO2021147773 A1 WO 2021147773A1 CN 2021072002 W CN2021072002 W CN 2021072002W WO 2021147773 A1 WO2021147773 A1 WO 2021147773A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
information
assignment
current
acquisition
Prior art date
Application number
PCT/CN2021/072002
Other languages
French (fr)
Chinese (zh)
Inventor
陈洋
付秋雷
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2021147773A1 publication Critical patent/WO2021147773A1/en

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/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • 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/28Databases characterised by their database models, e.g. relational or object models

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed are a data processing method and apparatus, an electronic device and a computer-readable storage medium. The method comprises: receiving a data assignment request, wherein the data assignment request carries assignment information; acquiring the assignment information; and executing, according to the assignment information, a data assignment operation in an assignment target database corresponding to assignment target database identification information, wherein a content value stored in the assignment target database is correspondingly provided with additional information. The technical solution does not need to rely on Lua scripts and transaction characteristics of Redis, and there is no need to interact with Redis multiple times. Therefore, the applicability is relatively high, and performance loss can also be effectively prevented.

Description

数据处理方法、装置、电子设备及计算机可读存储介质Data processing method, device, electronic equipment and computer readable storage medium
本申请要求2020年01月23日递交的申请号为202010076772.9、发明创造名称为“数据处理方法、装置、电子设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on January 23, 2020 with the application number 202010076772.9 and the invention titled "data processing method, device, electronic equipment and computer readable storage medium", the entire content of which is incorporated by reference In this application.
技术领域Technical field
本发明实施例涉及数据处理技术领域,具体涉及一种数据处理方法、装置、电子设备及计算机可读存储介质。The embodiments of the present invention relate to the field of data processing technology, and in particular to a data processing method, device, electronic equipment, and computer-readable storage medium.
背景技术Background technique
随着数据技术的发展,对于数据存储的需求也越来越多,比如在Redis数据存储系统中,业务需要为一个hash(哈希)存储结构中的某个字段field单独设置过期时间,比如,若一个用户代表一个hash结构,用户的每次签到代表一个field,每次签到都存在一个有效期,这就需要为每个field单独设置过期时间,当某个field过期就代表该次签到失效,相应的数据会被自动从hash中删除,最终通过统计hash的长度,就可以得到该用户当前有效签到的次数。现有技术中,通常通过将一个field的过期时间单独写入一个Redis的zset数据结构中,然后内部启动一个异步线程去周期性的检测该过期时间,一旦发现该field过期,就调用hdel删除命令从hash中删除这个field,来实现为field设置单独的过期时间。上述方案虽然能够实现为filed单独设置过期时间,但是其严重依赖redis的lua脚本和事务特性,因此适用性较差,另外,上述方案需要与redis进行多次交互,进而会带来性能的损失。With the development of data technology, there is an increasing demand for data storage. For example, in the Redis data storage system, the business needs to set an expiration time for a field in a hash (hash) storage structure, for example, If a user represents a hash structure, each check-in of the user represents a field, and each check-in has an expiration date. This requires a separate expiration time for each field. When a field expires, it means that the check-in is invalid. The data will be automatically deleted from the hash. Finally, by counting the length of the hash, you can get the number of valid check-ins for the user currently. In the prior art, the expiration time of a field is usually written into a Redis zset data structure separately, and then an asynchronous thread is started internally to periodically detect the expiration time. Once the field is found to be expired, the hdel delete command is called Delete this field from the hash to set a separate expiration time for the field. Although the above solution can be implemented to set the expiration time separately for filed, it relies heavily on the lua script and transaction characteristics of redis, so its applicability is poor. In addition, the above solution requires multiple interactions with redis, which will cause performance loss.
发明内容Summary of the invention
本发明实施例提供一种数据处理方法、装置、电子设备及计算机可读存储介质。The embodiments of the present invention provide a data processing method, device, electronic equipment, and computer-readable storage medium.
第一方面,本发明实施例中提供了一种数据处理方法。In the first aspect, an embodiment of the present invention provides a data processing method.
具体的,所述数据处理方法,包括:Specifically, the data processing method includes:
接收数据赋值请求,其中,所述数据赋值请求携带有赋值信息,所述赋值信息包括以下信息中的至少一种:赋值目标数据库标识信息、赋值目标子键值、赋值目标字段信 息、与所述赋值目标字段信息对应的目标内容值以及与所述目标内容值对应的目标附加信息,所述目标附加信息包括目标超时信息;A data assignment request is received, wherein the data assignment request carries assignment information, and the assignment information includes at least one of the following information: assignment target database identification information, assignment target subkey value, assignment target field information, and the Assigning a target content value corresponding to the target field information and target additional information corresponding to the target content value, where the target additional information includes target timeout information;
获取所述赋值信息;Obtaining the assignment information;
根据所述赋值信息在所述赋值目标数据库标识信息对应的赋值目标数据库中执行数据赋值操作,其中,所述赋值目标数据库中存储的内容值对应设置有附加信息。A data assignment operation is performed in the assignment target database corresponding to the assignment target database identification information according to the assignment information, wherein the content value stored in the assignment target database is correspondingly set with additional information.
结合第一方面,本发明实施例在第一方面的第一种实现方式中,所述目标附加信息还包括目标版本信息。With reference to the first aspect, in the first implementation manner of the first aspect of the embodiment of the present invention, the target additional information further includes target version information.
结合第一方面和第一方面的第一种实现方式,本发明实施例在第一方面的第二种实现方式中,所述根据所述赋值信息在所述赋值目标数据库标识信息对应的赋值目标数据库中执行数据赋值操作,被实施为:Combining the first aspect and the first implementation manner of the first aspect, in the second implementation manner of the first aspect of the embodiment of the present invention, the assignment target corresponding to the identification information in the assignment target database according to the assignment information The data assignment operation performed in the database is implemented as:
根据所述赋值目标数据库标识信息确定赋值目标数据库;Determining an assignment target database according to the identification information of the assignment target database;
在所述赋值目标数据库中查找所述赋值目标子键值和赋值目标字段信息;Searching the assignment target subkey value and the assignment target field information in the assignment target database;
当所述赋值目标数据库中不存在所述赋值目标子键值和赋值目标字段信息时,根据所述赋值目标子键值和赋值目标字段信息创建目标子键值和目标字段,并将所述目标内容值写入至所述目标字段中,当根据所述目标内容值确定需要为其设置附加信息时,为所述目标内容值设置初始附加信息;When the assignment target subkey value and assignment target field information do not exist in the assignment target database, a target subkey value and a target field are created according to the assignment target subkey value and assignment target field information, and the target The content value is written into the target field, and when it is determined that additional information needs to be set for the target content value, initial additional information is set for the target content value;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标超时信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,将所述当前内容值替换为所述目标内容值;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information does not include target timeout information, obtain the current content value corresponding to the assignment target field information and the current The current timeout information corresponding to the content value, replacing the current content value with the target content value;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标超时信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,将所述当前内容值替换为所述目标内容值,将所述当前超时信息替换为所述目标超时信息;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information includes target timeout information, obtain the current content value corresponding to the assignment target field information and the current content Current timeout information corresponding to the value, replacing the current content value with the target content value, and replacing the current timeout information with the target timeout information;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标版本信息或者所述目标版本信息为预设版本信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information does not include target version information or the target version information is preset version information, the assignment target is acquired The current content value corresponding to the field information and the current version information corresponding to the current content value, replacing the current content value with the target content value, and progressively updating the current version information;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标版本信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,比较所述目标版本信息与所述当前版本信息,当所述 目标版本信息与所述当前版本信息相同时,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新,当所述目标版本信息与所述当前版本信息不相同时,返回赋值错误消息。When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information includes target version information, obtain the current content value corresponding to the assignment target field information and the current content Value corresponding to the current version information, compare the target version information with the current version information, when the target version information is the same as the current version information, replace the current content value with the target content value, and The current version information is progressively updated, and when the target version information is not the same as the current version information, an assignment error message is returned.
结合第一方面、第一方面的第一种实现方式和第一方面的第二种实现方式,本公开在第一方面的第三种实现方式中,所述将所述当前超时信息替换为所述目标超时信息,被实施为:In combination with the first aspect, the first implementation manner of the first aspect, and the second implementation manner of the first aspect, in the third implementation manner of the first aspect of the present disclosure, the current timeout information is replaced by all The target timeout information is implemented as:
将所述目标超时信息转换为目标超时时间,并使用所述目标超时时间替换所述当前超时信息。The target timeout information is converted into a target timeout time, and the target timeout time is used to replace the current timeout information.
结合第一方面的第一种实现方式、第一方面的第二种实现方式和第一方面的第三种实现方式,本公开在第一方面的第四种实现方式中,还包括:Combining the first implementation manner of the first aspect, the second implementation manner of the first aspect, and the third implementation manner of the first aspect, in the fourth implementation manner of the first aspect, the present disclosure further includes:
响应于接收到数据获取请求,获取所述数据获取请求携带的获取信息,并根据所述获取信息获取得到相应的目标数据或消息,返回所述目标数据或消息,其中,所述获取信息包括以下信息中的至少一种:获取目标数据库标识信息、获取目标子键值、获取目标字段信息。In response to receiving the data acquisition request, acquire the acquisition information carried in the data acquisition request, acquire corresponding target data or message according to the acquisition information, and return the target data or message, where the acquisition information includes the following At least one of the information: obtaining target database identification information, obtaining target subkey values, and obtaining target field information.
结合第一方面、第一方面的第一种实现方式、第一方面的第二种实现方式、第一方面的第三种实现方式和第一方面的第四种实现方式,本公开在第一方面的第五种实现方式中,所述根据所述获取信息获取得到相应的目标数据或消息,返回所述目标数据或消息,被实施为:Combining the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, the third implementation manner of the first aspect, and the fourth implementation manner of the first aspect, the present disclosure is described in the first aspect. In a fifth implementation manner of the aspect, the obtaining corresponding target data or message according to the obtained information, and returning the target data or message is implemented as:
根据所述获取目标数据库标识信息确定获取目标数据库;Determining the acquisition target database according to the identification information of the acquisition target database;
在所述获取目标数据库中根据所述获取信息获取得到相应的目标数据或消息,并返回所述目标数据或消息。The corresponding target data or message is acquired in the acquisition target database according to the acquisition information, and the target data or message is returned.
结合第一方面、第一方面的第一种实现方式、第一方面的第二种实现方式、第一方面的第三种实现方式、第一方面的第四种实现方式和第一方面的第五种实现方式,本公开在第一方面的第六种实现方式中,所述在所述获取目标数据库中根据所述获取信息获取得到相应的目标数据或消息,并返回所述目标数据或消息,被实施为:Combining the first aspect, the first implementation of the first aspect, the second implementation of the first aspect, the third implementation of the first aspect, the fourth implementation of the first aspect, and the first implementation of the first aspect Five implementation manners. In the sixth implementation manner of the first aspect of the present disclosure, the corresponding target data or message is acquired according to the acquisition information in the acquisition target database, and the target data or message is returned , Is implemented as:
在所述获取目标数据库中查找所述获取目标字段;Search the acquisition target field in the acquisition target database;
当所述获取目标数据库中不存在所述获取目标字段时,返回数据不存在消息;When the acquisition target field does not exist in the acquisition target database, a message that data does not exist is returned;
当所述获取目标数据库中存在所述获取目标字段时,获取与所述获取目标字段对应的获取目标内容值以及与所述获取目标内容值对应的当前超时信息;When the acquisition target field exists in the acquisition target database, acquiring the acquisition target content value corresponding to the acquisition target field and the current timeout information corresponding to the acquisition target content value;
若所述当前超时信息为预设超时信息,返回所述获取目标内容值;If the current timeout information is preset timeout information, return the acquisition target content value;
若所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段已过期,删除所述获取目标数据库中的获取目标字段,并返回数据已过期消息;If the current timeout information is not the preset timeout information, and it is determined that the acquisition target field has expired according to the comparison between the current timeout information and the current time, delete the acquisition target field in the acquisition target database, and return Data has expired message;
若所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段未过期,返回与所述获取目标字段对应的获取目标内容值。If the current timeout information is not the preset timeout information, and it is determined that the acquisition target field has not expired according to the comparison between the current timeout information and the current time, the acquisition target content value corresponding to the acquisition target field is returned.
第二方面,本发明实施例中提供了一种数据处理装置。In the second aspect, an embodiment of the present invention provides a data processing device.
具体的,所述数据处理装置,包括:Specifically, the data processing device includes:
接收模块,接收数据赋值请求,其中,所述数据赋值请求携带有赋值信息,所述赋值信息包括以下信息中的至少一种:赋值目标数据库标识信息、赋值目标子键值、赋值目标字段信息、与所述赋值目标字段信息对应的目标内容值以及与所述目标内容值对应的目标附加信息,所述目标附加信息包括目标超时信息;The receiving module receives a data assignment request, wherein the data assignment request carries assignment information, and the assignment information includes at least one of the following information: assignment target database identification information, assignment target subkey value, assignment target field information, A target content value corresponding to the assignment target field information and target additional information corresponding to the target content value, where the target additional information includes target timeout information;
获取模块,被配置为获取所述赋值信息;An obtaining module configured to obtain the assignment information;
执行模块,被配置为根据所述赋值信息在所述赋值目标数据库标识信息对应的赋值目标数据库中执行数据赋值操作,其中,所述赋值目标数据库中存储的内容值对应设置有附加信息。The execution module is configured to perform a data assignment operation in the assignment target database corresponding to the assignment target database identification information according to the assignment information, wherein the content value stored in the assignment target database is correspondingly set with additional information.
结合第二方面,本发明实施例在第二方面的第一种实现方式中,所述目标附加信息还包括目标版本信息。With reference to the second aspect, in the first implementation manner of the second aspect of the embodiment of the present invention, the target additional information further includes target version information.
结合第二方面和第二方面的第一种实现方式,本发明实施例在第二方面的第二种实现方式中,所述执行模块被配置为:With reference to the second aspect and the first implementation manner of the second aspect, in the second implementation manner of the second aspect of the embodiment of the present invention, the execution module is configured as:
根据所述赋值目标数据库标识信息确定赋值目标数据库;Determining an assignment target database according to the identification information of the assignment target database;
在所述赋值目标数据库中查找所述赋值目标子键值和赋值目标字段信息;Searching the assignment target subkey value and the assignment target field information in the assignment target database;
当所述赋值目标数据库中不存在所述赋值目标子键值和赋值目标字段信息时,根据所述赋值目标子键值和赋值目标字段信息创建目标子键值和目标字段,并将所述目标内容值写入至所述目标字段中,当根据所述目标内容值确定需要为其设置附加信息时,为所述目标内容值设置初始附加信息;When the assignment target subkey value and assignment target field information do not exist in the assignment target database, a target subkey value and a target field are created according to the assignment target subkey value and assignment target field information, and the target The content value is written into the target field, and when it is determined that additional information needs to be set for the target content value, initial additional information is set for the target content value;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标超时信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,将所述当前内容值替换为所述目标内容值;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information does not include target timeout information, obtain the current content value corresponding to the assignment target field information and the current The current timeout information corresponding to the content value, replacing the current content value with the target content value;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标超时信息时,获取所述赋值目标字段信息对应的当前内容值以及所述 当前内容值对应的当前超时信息,将所述当前内容值替换为所述目标内容值,将所述当前超时信息替换为所述目标超时信息;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information includes target timeout information, obtain the current content value corresponding to the assignment target field information and the current content Current timeout information corresponding to the value, replacing the current content value with the target content value, and replacing the current timeout information with the target timeout information;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标版本信息或者所述目标版本信息为预设版本信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information does not include target version information or the target version information is preset version information, the assignment target is acquired The current content value corresponding to the field information and the current version information corresponding to the current content value, replacing the current content value with the target content value, and progressively updating the current version information;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标版本信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,比较所述目标版本信息与所述当前版本信息,当所述目标版本信息与所述当前版本信息相同时,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新,当所述目标版本信息与所述当前版本信息不相同时,返回赋值错误消息。When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information includes target version information, obtain the current content value corresponding to the assignment target field information and the current content Value corresponding to the current version information, compare the target version information with the current version information, when the target version information is the same as the current version information, replace the current content value with the target content value, and The current version information is progressively updated, and when the target version information is not the same as the current version information, an assignment error message is returned.
结合第二方面、第二方面的第一种实现方式和第二方面的第二种实现方式,本公开在第二方面的第三种实现方式中,所述将所述当前超时信息替换为所述目标超时信息的部分,被配置为:In combination with the second aspect, the first implementation manner of the second aspect, and the second implementation manner of the second aspect, in the third implementation manner of the second aspect of the present disclosure, the current timeout information is replaced by all The part of the target timeout information is configured as:
将所述目标超时信息转换为目标超时时间,并使用所述目标超时时间替换所述当前超时信息。The target timeout information is converted into a target timeout time, and the target timeout time is used to replace the current timeout information.
结合第二方面的第一种实现方式、第二方面的第二种实现方式和第二方面的第三种实现方式,本公开在第二方面的第四种实现方式中,还包括:In combination with the first implementation manner of the second aspect, the second implementation manner of the second aspect, and the third implementation manner of the second aspect, in the fourth implementation manner of the second aspect, the present disclosure further includes:
数据获取模块,被配置为响应于接收到数据获取请求,获取所述数据获取请求携带的获取信息,并根据所述获取信息获取得到相应的目标数据或消息,返回所述目标数据或消息,其中,所述获取信息包括以下信息中的至少一种:获取目标数据库标识信息、获取目标子键值、获取目标字段信息。The data acquisition module is configured to, in response to receiving a data acquisition request, acquire acquisition information carried in the data acquisition request, acquire corresponding target data or message according to the acquisition information, and return the target data or message, where The acquisition information includes at least one of the following information: acquiring target database identification information, acquiring target subkey values, and acquiring target field information.
结合第二方面、第二方面的第一种实现方式、第二方面的第二种实现方式、第二方面的第三种实现方式和第二方面的第四种实现方式,本公开在第二方面的第五种实现方式中,所述根据所述获取信息获取得到相应的目标数据或消息,返回所述目标数据或消息,被实施为:Combining the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, the third implementation manner of the second aspect, and the fourth implementation manner of the second aspect, the present disclosure In a fifth implementation manner of the aspect, the obtaining corresponding target data or message according to the obtained information, and returning the target data or message is implemented as:
根据所述获取目标数据库标识信息确定获取目标数据库;Determining the acquisition target database according to the identification information of the acquisition target database;
在所述获取目标数据库中根据所述获取信息获取得到相应的目标数据或消息,并返回所述目标数据或消息。The corresponding target data or message is acquired in the acquisition target database according to the acquisition information, and the target data or message is returned.
结合第二方面、第二方面的第一种实现方式、第二方面的第二种实现方式、第二方面的第三种实现方式、第二方面的第四种实现方式和第二方面的第五种实现方式,本公开在第二方面的第六种实现方式中,所述在所述获取目标数据库中根据所述获取信息获取得到相应的目标数据或消息,并返回所述目标数据或消息的部分,被实施为:Combining the second aspect, the first implementation of the second aspect, the second implementation of the second aspect, the third implementation of the second aspect, the fourth implementation of the second aspect, and the first implementation of the second aspect Five implementations. In the sixth implementation of the second aspect of the present disclosure, the corresponding target data or message is acquired according to the acquisition information in the acquisition target database, and the target data or message is returned The part is implemented as:
在所述获取目标数据库中查找所述获取目标字段;Search the acquisition target field in the acquisition target database;
当所述获取目标数据库中不存在所述获取目标字段时,返回数据不存在消息;When the acquisition target field does not exist in the acquisition target database, a message that data does not exist is returned;
当所述获取目标数据库中存在所述获取目标字段时,获取与所述获取目标字段对应的获取目标内容值以及与所述获取目标内容值对应的当前超时信息;When the acquisition target field exists in the acquisition target database, acquiring the acquisition target content value corresponding to the acquisition target field and the current timeout information corresponding to the acquisition target content value;
若所述当前超时信息为预设超时信息,返回所述获取目标内容值;If the current timeout information is preset timeout information, return the acquisition target content value;
若所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段已过期,删除所述获取目标数据库中的获取目标字段,并返回数据已过期消息;If the current timeout information is not the preset timeout information, and it is determined that the acquisition target field has expired according to the comparison between the current timeout information and the current time, delete the acquisition target field in the acquisition target database, and return Data has expired message;
若所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段未过期,返回与所述获取目标字段对应的获取目标内容值。If the current timeout information is not the preset timeout information, and it is determined that the acquisition target field has not expired according to the comparison between the current timeout information and the current time, the acquisition target content value corresponding to the acquisition target field is returned.
第三方面,本发明实施例提供了一种电子设备,包括存储器和处理器,所述存储器用于存储一条或多条支持数据处理装置执行上述数据处理方法的计算机指令,所述处理器被配置为用于执行所述存储器中存储的计算机指令。所述数据处理装置还可以包括通信接口,用于数据处理装置与其他设备或通信网络通信。In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, the memory is configured to store one or more computer instructions that support a data processing device to execute the above data processing method, and the processor is configured It is used to execute computer instructions stored in the memory. The data processing device may also include a communication interface for the data processing device to communicate with other equipment or a communication network.
第四方面,本发明实施例提供了一种计算机可读存储介质,用于存储数据处理装置所用的计算机指令,其包含用于执行上述数据处理方法为数据处理装置所涉及的计算机指令。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium for storing computer instructions used by a data processing device, which includes computer instructions related to the data processing device for executing the above-mentioned data processing method.
本发明实施例提供的技术方案可包括以下有益效果:The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
上述技术方案通过为Redis数据存储系统hash存储结构中的字段field对应的value内容值设置过期时间和/或版本信息等附加信息来实现对于数据的单独控制。该技术方案由于是在value内容值层面上进行的附加信息维度设置,无需依赖redis的lua脚本和事务特性,也无需与redis进行多次交互,因此适用性较强,同时,还能够有效避免性能的损失。The above technical solution implements independent control of data by setting additional information such as expiration time and/or version information for the value content value corresponding to the field field in the hash storage structure of the Redis data storage system. Since this technical solution is an additional information dimension setting at the value content level, it does not need to rely on the lua script and transaction characteristics of redis, and does not need to interact with redis multiple times, so it has strong applicability and can effectively avoid performance. Loss.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本发明实施例。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the embodiments of the present invention.
附图说明Description of the drawings
结合附图,通过以下非限制性实施方式的详细描述,本发明实施例的其它特征、目的和优点将变得更加明显。在附图中:With reference to the accompanying drawings, through the following detailed description of the non-limiting implementation manners, other features, objectives, and advantages of the embodiments of the present invention will become more apparent. In the attached picture:
图1示出根据本发明一实施方式的数据处理方法的流程图;Fig. 1 shows a flowchart of a data processing method according to an embodiment of the present invention;
图2为根据本公开一实施方式的数据处理方法的数据赋值流程图;Fig. 2 is a data assignment flowchart of a data processing method according to an embodiment of the present disclosure;
图3为根据本公开一实施方式的数据处理方法的数据获取流程图;Fig. 3 is a data acquisition flowchart of a data processing method according to an embodiment of the present disclosure;
图4示出根据本发明一实施方式的数据处理装置的结构框图;FIG. 4 shows a structural block diagram of a data processing device according to an embodiment of the present invention;
图5是适于用来实现根据本发明一实施方式的数据处理方法的计算机系统的结构示意图。FIG. 5 is a schematic structural diagram of a computer system suitable for implementing a data processing method according to an embodiment of the present invention.
具体实施方式Detailed ways
下文中,将参考附图详细描述本发明实施例的示例性实施方式,以使本领域技术人员可容易地实现它们。此外,为了清楚起见,在附图中省略了与描述示例性实施方式无关的部分。Hereinafter, exemplary implementations of the embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts that are not related to the description of the exemplary embodiments are omitted in the drawings.
在本发明实施例中,应理解,诸如“包括”或“具有”等的术语旨在指示本说明书中所公开的特征、数字、步骤、行为、部件、部分或其组合的存在,并且不欲排除一个或多个其他特征、数字、步骤、行为、部件、部分或其组合存在或被添加的可能性。In the embodiments of the present invention, it should be understood that terms such as "including" or "having" are intended to indicate the existence of the features, numbers, steps, behaviors, components, parts, or combinations thereof disclosed in this specification, and are not intended to The possibility that one or more other features, numbers, steps, behaviors, components, parts or combinations thereof exist or be added is excluded.
另外还需要说明的是,在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本发明实施例。In addition, it should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other if there is no conflict. The embodiments of the present invention will be described in detail below with reference to the drawings and in conjunction with the embodiments.
本发明实施例提供的技术方案通过为Redis数据存储系统hash存储结构中的字段field对应的value内容值设置过期时间和/或版本信息等附加信息来实现对于数据的单独控制。该技术方案由于是在value内容值层面上进行的附加信息维度设置,无需依赖redis的lua脚本和事务特性,也无需与redis进行多次交互,因此适用性较强,同时,还能够有效避免性能的损失。The technical solution provided by the embodiment of the present invention realizes independent control of data by setting additional information such as expiration time and/or version information for the value content value corresponding to the field field in the hash storage structure of the Redis data storage system. Since this technical solution is an additional information dimension setting at the value content level, it does not need to rely on the lua script and transaction characteristics of redis, and does not need to interact with redis multiple times, so it has strong applicability and can effectively avoid performance. Loss.
图1示出根据本发明一实施方式的数据处理方法的流程图,适用于数据处理服务器,如图1所示,所述数据处理方法包括以下步骤S101-S103:Fig. 1 shows a flowchart of a data processing method according to an embodiment of the present invention, which is suitable for a data processing server. As shown in Fig. 1, the data processing method includes the following steps S101-S103:
在步骤S101中,接收数据赋值请求,其中,所述数据赋值请求携带有赋值信息,所述赋值信息包括以下信息中的至少一种:赋值目标数据库标识信息、赋值目标子键值、赋值目标字段信息、与所述赋值目标字段信息对应的目标内容值以及与所述目标内容值对应的目标附加信息,所述目标附加信息包括目标超时信息;In step S101, a data assignment request is received, wherein the data assignment request carries assignment information, and the assignment information includes at least one of the following information: assignment target database identification information, assignment target subkey value, assignment target field Information, a target content value corresponding to the assignment target field information, and target additional information corresponding to the target content value, where the target additional information includes target timeout information;
在步骤S102中,获取所述赋值信息;In step S102, the assignment information is obtained;
在步骤S103中,根据所述赋值信息在所述赋值目标数据库标识信息对应的赋值目标数据库中执行数据赋值操作,其中,所述赋值目标数据库中存储的内容值对应设置有附加信息。In step S103, a data assignment operation is performed in the assignment target database corresponding to the assignment target database identification information according to the assignment information, wherein the content value stored in the assignment target database is correspondingly set with additional information.
上文提及,随着数据技术的发展,对于数据存储的需求也越来越多,比如在Redis数据存储系统中,业务需要为一个hash(哈希)存储结构中的某个字段field单独设置过期时间,比如,若一个用户代表一个hash结构,用户的每次签到代表一个field,每次签到都存在一个有效期,这就需要为每个field单独设置过期时间,当某个field过期就代表该次签到失效,相应的数据会被自动从hash中删除,最终通过统计hash的长度,就可以得到该用户当前有效签到的次数。现有技术中,通常通过将一个field的过期时间单独写入一个Redis的zset数据结构中,然后内部启动一个异步线程去周期性的检测该过期时间,一旦发现该field过期,就调用hdel删除命令从hash中删除这个field,来实现为field设置单独的过期时间。上述方案虽然能够实现为filed单独设置过期时间,但是其严重依赖redis的lua脚本和事务特性,因此适用性较差,另外,上述方案需要与redis进行多次交互,进而会带来性能的损失。As mentioned above, with the development of data technology, there are more and more requirements for data storage. For example, in the Redis data storage system, the business needs to be set separately for a field in a hash (hash) storage structure Expiration time, for example, if a user represents a hash structure, each check-in of the user represents a field, and each check-in has an expiration date. This requires a separate expiration time for each field. When a field expires, it represents that If the second check-in is invalid, the corresponding data will be automatically deleted from the hash. Finally, by counting the length of the hash, you can get the current number of valid check-ins for the user. In the prior art, the expiration time of a field is usually written into a Redis zset data structure separately, and then an asynchronous thread is started internally to periodically detect the expiration time. Once the field is found to be expired, the hdel delete command is called Delete this field from the hash to set a separate expiration time for the field. Although the above solution can be implemented to set the expiration time separately for filed, it relies heavily on the lua script and transaction characteristics of redis, so its applicability is poor. In addition, the above solution requires multiple interactions with redis, which will cause performance loss.
考虑到上述问题,在该实施方式中,提出一种数据处理方法,该方法通过为Redis数据存储系统hash存储结构中的字段field对应的value内容值设置过期时间和/或版本信息等附加信息来实现对于数据的单独控制。该技术方案由于是在value内容值层面上进行的附加信息维度设置,无需依赖redis的lua脚本和事务特性,也无需与redis进行多次交互,因此适用性较强,同时,还能够有效避免性能的损失。Considering the above problems, in this embodiment, a data processing method is proposed. The method sets additional information such as expiration time and/or version information for the value content value corresponding to the field field in the hash storage structure of the Redis data storage system. Achieve individual control of data. Since this technical solution is an additional information dimension setting at the value content level, it does not need to rely on the lua script and transaction characteristics of redis, and does not need to interact with redis multiple times, so it has strong applicability and can effectively avoid performance. Loss.
在本发明一实施方式中,所述数据处理方法适用于双层key-value(键-值)结构数据的应用场景,在该应用场景中,具有主key和子key,而所述数据处理方法主要用于对于子key数据进行处理。In an embodiment of the present invention, the data processing method is suitable for an application scenario of double-layer key-value (key-value) structured data. In this application scenario, there is a main key and a sub-key, and the data processing method mainly Used to process sub-key data.
在本发明一实施方式中,所述数据赋值请求指的是用于使得所述数据处理服务器执行与所述数据赋值请求相应的数据赋值操作的请求。所述数据赋值请求是由数据赋值请求方发出的,其中,所述数据赋值请求方既可以为用户,还可以为某一应用,再或者也可以为其他能够发出数据赋值请求的主体,比如某一客户端等等,本发明对其不作具体限定。In an embodiment of the present invention, the data assignment request refers to a request for causing the data processing server to perform a data assignment operation corresponding to the data assignment request. The data assignment request is issued by the data assignment requester, where the data assignment requester can be either a user, an application, or another subject that can issue a data assignment request, such as a certain application. A client, etc., which are not specifically limited by the present invention.
在本发明一实施方式中,所述赋值信息用于表征数据赋值请求方的数据赋值要求,以使所述数据处理服务器能够根据所述赋值信息进行数据赋值操作。In an embodiment of the present invention, the assignment information is used to characterize the data assignment requirements of the data assignment requester, so that the data processing server can perform data assignment operations based on the assignment information.
其中,所述赋值信息可包括以下信息中的至少一种:赋值目标数据库标识信息、赋值目标子键值、赋值目标字段信息、与所述赋值目标字段信息对应的目标内容值以及与所述目标内容值对应的目标附加信息,其中,所述赋值目标数据库标识信息指的是用于对于将要进行赋值操作的数据库进行区别性标识的信息,比如可以为将要进行赋值操作的数据库的名称或ID等等;所述赋值目标子键值指的是将要进行赋值操作的子键值信息;所述赋值目标字段信息指的是将要进行赋值操作的字段信息;所述目标内容值指的是将要进行赋值操作的字段所对应的内容值,即将要写入至所述赋值目标数据库中的内容值;所述目标附加信息指的是与所述目标内容值对应的、与所述目标内容值相关的、相比现有技术新增的信息,在本发明一实施方式中,所述目标附加信息可包括目标超时信息,在本发明另一实施方式中,所述目标附加信息还可包括目标版本信息,当然,所述目标附加信息还可包括更多类型的附加信息,所述目标附加信息的具体内容可根据实际应用的需要进行设置,本公开对其不作具体限定。Wherein, the assignment information may include at least one of the following information: assignment target database identification information, assignment target sub-key value, assignment target field information, target content value corresponding to the assignment target field information, and target content value corresponding to the assignment target field information. Target additional information corresponding to the content value, where the assignment target database identification information refers to information used to distinguish the database that will be assigned, such as the name or ID of the database that will be assigned, etc. Etc.; the assignment target subkey value refers to the subkey value information that will be assigned; the assignment target field information refers to the field information that will be assigned; the target content value refers to the assignment to be performed The content value corresponding to the operated field is the content value to be written into the assignment target database; the target additional information refers to the content value corresponding to the target content value and related to the target content value. Compared with the newly added information in the prior art, in one embodiment of the present invention, the target additional information may include target timeout information, and in another embodiment of the present invention, the target additional information may also include target version information, Of course, the target additional information may also include more types of additional information, and the specific content of the target additional information may be set according to the needs of actual applications, which is not specifically limited in the present disclosure.
在获取得到所述赋值信息之后,所述数据处理服务器就可以根据所述赋值信息在所述赋值目标数据库标识信息对应的赋值目标数据库中执行与所述赋值信息相应的数据赋值操作,其中,所述赋值目标数据库中存储的内容值对应设置有附加信息,在执行了数据赋值操作之后,所得到的目标数据也对应存储有附加信息,以对所述目标数据进行附加解释、描述或限制。After obtaining the assignment information, the data processing server can execute the data assignment operation corresponding to the assignment information in the assignment target database corresponding to the assignment target database identification information according to the assignment information, where all The content value stored in the assignment target database is correspondingly set with additional information. After the data assignment operation is performed, the obtained target data is also correspondingly stored with additional information to provide additional explanation, description or restriction on the target data.
为了描述的方便,接下来以超时附加信息和版本附加信息作为目标附加信息为例对于本公开进行解释和说明。需要说明的是,所述超时附加信息和版本附加信息既可以分开存储在与内容值对应的位置处,也可以合并存储在与内容值对应的位置处,以节省存储空间,另外,根据实际应用的需要,也可以将所述超时附加信息和版本附加信息分别以一个键值的形式存储在Redis中,总之,所述超时附加信息和版本附加信息的存储方式和存储位置可根据实际应用的需要进行选择和确定,本公开对其不作具体限制。For the convenience of description, the following uses timeout additional information and version additional information as target additional information as examples to explain and illustrate the present disclosure. It should be noted that the timeout additional information and version additional information can be stored separately in the location corresponding to the content value, or can be combined and stored in the location corresponding to the content value to save storage space. In addition, according to actual applications If necessary, the timeout additional information and version additional information can also be stored in Redis in the form of a key value. In short, the storage method and storage location of the timeout additional information and version additional information can be based on actual application needs. For selection and determination, the present disclosure does not specifically limit it.
在本发明一实施方式中,所述步骤S103,即根据所述赋值信息在所述赋值目标数据库标识信息对应的赋值目标数据库中执行数据赋值操作的步骤,可被实施为:In an embodiment of the present invention, the step S103, that is, the step of performing a data assignment operation in the assignment target database corresponding to the assignment target database identification information according to the assignment information, can be implemented as:
根据所述赋值目标数据库标识信息确定赋值目标数据库;Determining an assignment target database according to the identification information of the assignment target database;
在所述赋值目标数据库中查找所述赋值目标子键值和赋值目标字段信息;Searching the assignment target subkey value and the assignment target field information in the assignment target database;
当所述赋值目标数据库中不存在所述赋值目标子键值和赋值目标字段信息时,根据所述赋值目标子键值和赋值目标字段信息创建目标子键值和目标字段,并将所述目标内容值写入至所述目标字段中,当根据所述目标内容值确定需要为其设置附加信息时,为 所述目标内容值设置初始附加信息;When the assignment target subkey value and assignment target field information do not exist in the assignment target database, a target subkey value and a target field are created according to the assignment target subkey value and assignment target field information, and the target The content value is written into the target field, and when it is determined that additional information needs to be set for the target content value, initial additional information is set for the target content value;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标超时信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,将所述当前内容值替换为所述目标内容值;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information does not include target timeout information, obtain the current content value corresponding to the assignment target field information and the current The current timeout information corresponding to the content value, replacing the current content value with the target content value;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标超时信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,将所述当前内容值替换为所述目标内容值,将所述当前超时信息替换为所述目标超时信息;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information includes target timeout information, obtain the current content value corresponding to the assignment target field information and the current content Current timeout information corresponding to the value, replacing the current content value with the target content value, and replacing the current timeout information with the target timeout information;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标版本信息或者所述目标版本信息为预设版本信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information does not include target version information or the target version information is preset version information, the assignment target is acquired The current content value corresponding to the field information and the current version information corresponding to the current content value, replacing the current content value with the target content value, and progressively updating the current version information;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标版本信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,比较所述目标版本信息与所述当前版本信息,当所述目标版本信息与所述当前版本信息相同时,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新,当所述目标版本信息与所述当前版本信息不相同时,返回赋值错误消息。When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information includes target version information, obtain the current content value corresponding to the assignment target field information and the current content Value corresponding to the current version information, compare the target version information with the current version information, when the target version information is the same as the current version information, replace the current content value with the target content value, and The current version information is progressively updated, and when the target version information is not the same as the current version information, an assignment error message is returned.
在该实施方式中,在根据所述赋值信息在所述赋值目标数据库中执行数据赋值操作时,首先根据所述赋值信息中的赋值目标数据库标识信息确定将要进行数据赋值操作的赋值目标数据库;然后在所述赋值目标数据库中根据所述赋值信息中的赋值目标子键值和赋值目标字段信息进行查找,查找结果存在以下几种情况:In this embodiment, when performing a data assignment operation in the assignment target database according to the assignment information, first determine the assignment target database that will perform the data assignment operation according to the assignment target database identification information in the assignment information; then In the assignment target database, search is performed according to the assignment target subkey value and the assignment target field information in the assignment information, and the search results have the following situations:
A.所述赋值目标数据库中不存在所述赋值目标子键值和赋值目标字段信息,那么就需要根据所述赋值信息中的赋值目标子键值和赋值目标字段信息在所述赋值目标数据库中创建目标子键值和目标字段,然后再将所述目标内容值写入至所述目标字段对应的位置中,当根据所述目标内容值确定需要为其设置附加信息时,为所述目标内容值设置初始附加信息,比如,若所述目标内容值为ex(秒级别相对超时时间)/exat(秒级别绝对超时时间)/px(毫秒级别相对超时时间)/pxat(毫秒级别绝对超时时间)等参数,则需要为其设置超时附加信息,若所述目标内容值为ver(版本)等参数,则需要为其设置版本附加信息,其中,所述初始附加信息可以为本领域技术人员预先设置的初始附 加信息,比如0等等。A. The assignment target subkey value and assignment target field information does not exist in the assignment target database, so it is necessary to store the assignment target subkey value and assignment target field information in the assignment target database according to the assignment target subkey value and assignment target field information in the assignment information Create a target subkey value and a target field, and then write the target content value into the position corresponding to the target field. When it is determined according to the target content value that additional information needs to be set for the target content, The value sets the initial additional information, for example, if the target content value is ex (relative timeout time at second level)/exat (absolute timeout time at second level)/px (relative timeout time at millisecond level)/pxat (absolute timeout time at millisecond level) If the target content value is ver (version) and other parameters, you need to set the version additional information for it. The initial additional information can be preset by those skilled in the art. The initial additional information, such as 0 and so on.
B.所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标超时信息,这说明所述赋值目标字段对应的目标内容值无需新设置超时附加信息,此时可获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,直接将所述当前内容值替换为所述目标内容值即可。B. The assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information does not include target timeout information, which means that the target content value corresponding to the assignment target field does not need to set a new timeout Additional information. At this time, the current content value corresponding to the assignment target field information and the current timeout information corresponding to the current content value can be obtained, and the current content value can be directly replaced with the target content value.
C.所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标超时信息,这说明所述赋值目标字段对应的目标内容值需要新设置超时附加信息,此时可获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,分别将所述当前内容值替换为所述目标内容值,将所述当前超时信息替换为所述目标超时信息,在本发明一实施方式中,所述将所述当前超时信息替换为所述目标超时信息,可被实施为:将所述目标超时信息转换为目标超时时间,比如2019年12月1日8:00,并使用所述目标超时时间替换所述当前超时信息,时间转换之后就可很方便地与当前时间进行比较以确定相应的数据是否已超时或超期。C. The assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information includes target timeout information, which indicates that the target content value corresponding to the assignment target field needs to be newly set with a timeout addition Information, the current content value corresponding to the assignment target field information and the current timeout information corresponding to the current content value can be obtained at this time, the current content value is replaced with the target content value, and the current timeout information Replaced with the target timeout information. In an embodiment of the present invention, the replacing the current timeout information with the target timeout information can be implemented as: converting the target timeout information into a target timeout time, such as At 8:00 on December 1, 2019, and replace the current timeout information with the target timeout time, after the time is converted, it can be easily compared with the current time to determine whether the corresponding data has timed out or expired.
D.所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标版本信息或者所述目标版本信息为预设版本信息,其中,所述预设版本信息为本领域技术人员预先设置的版本信息,比如其可以为0或其他值,所述目标版本信息的缺失以及预设版本信息的设置说明无需对于所述目标内容值对应的版本附加信息进行校验即可进行内容值的修改,此时可直接获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,将所述当前内容值替换为所述目标内容值,并在替换之后对于所述内容值对应的当前版本信息进行递进更新,比如,在替换前的版本信息的基础上增加一更新递进值,例如,若替换前的版本信息为2,更新递进值为1,则替换之后的版本信息可变为2+1=3。D. The assignment target sub-key and assignment target field information exist in the assignment target database, and the assignment information does not include target version information or the target version information is preset version information, wherein the preset Suppose the version information is the version information preset by those skilled in the art, for example, it can be 0 or other values. The lack of the target version information and the setting description of the preset version information do not require additional version information corresponding to the target content value The content value can be modified after verification. At this time, the current content value corresponding to the assignment target field information and the current version information corresponding to the current content value can be directly obtained, and the current content value can be replaced with the target The content value, and the current version information corresponding to the content value is progressively updated after the replacement, for example, an update progressive value is added to the version information before the replacement, for example, if the version information before the replacement is 2 , The update progression value is 1, then the version information after replacement can be changed to 2+1=3.
E.所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标版本信息,这说明需要对于所述目标内容值对应的版本附加信息进行校验,校验通过之后才可进行内容值的修改,比如当所述目标版本信息与所述赋值目标字段信息对应的当前内容值对应的当前版本信息一致时,才可对内容值进行修改,此时先获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,然后对于所述目标版本信息与所述当前版本信息进行比较,当所述目标版本信息与所述当前版本信息相同时,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新,若所述目标版本信息与所述当前版本信息不相同,则返回赋值错 误消息,其中,所述赋值错误消息还可携带有赋值错误原因。E. The assignment target subkey value and assignment target field information exist in the assignment target database, and the assignment information includes target version information, which indicates that the version additional information corresponding to the target content value needs to be verified After the verification is passed, the content value can be modified. For example, when the target version information is consistent with the current version information corresponding to the current content value corresponding to the assignment target field information, the content value can be modified. First obtain the current content value corresponding to the assignment target field information and the current version information corresponding to the current content value, and then compare the target version information with the current version information. When the current version information is the same, the current content value is replaced with the target content value, and the current version information is progressively updated. If the target version information is not the same as the current version information, the assignment is returned An error message, where the assignment error message may also carry the reason for the assignment error.
在本发明一实施方式中,所述方法还包括根据接收到的数据获取请求获取数据的步骤,即所述数据处理方法包括以下步骤:In an embodiment of the present invention, the method further includes the step of acquiring data according to the received data acquisition request, that is, the data processing method includes the following steps:
接收数据赋值请求,其中,所述数据赋值请求携带有赋值信息,所述赋值信息包括以下信息中的至少一种:赋值目标数据库标识信息、赋值目标子键值、赋值目标字段信息、与所述赋值目标字段信息对应的目标内容值以及与所述目标内容值对应的目标附加信息,所述目标附加信息包括目标超时信息;A data assignment request is received, wherein the data assignment request carries assignment information, and the assignment information includes at least one of the following information: assignment target database identification information, assignment target subkey value, assignment target field information, and the Assigning a target content value corresponding to the target field information and target additional information corresponding to the target content value, where the target additional information includes target timeout information;
获取所述赋值信息;Obtaining the assignment information;
根据所述赋值信息在所述赋值目标数据库标识信息对应的赋值目标数据库中执行数据赋值操作,其中,所述赋值目标数据库中存储的内容值对应设置有附加信息;Performing a data assignment operation in the assignment target database corresponding to the assignment target database identification information according to the assignment information, wherein the content value stored in the assignment target database is correspondingly set with additional information;
响应于接收到数据获取请求,获取所述数据获取请求携带的获取信息,并根据所述获取信息获取得到相应的目标数据或消息,返回所述目标数据或消息,其中,所述获取信息包括以下信息中的至少一种:获取目标数据库标识信息、获取目标子键值、获取目标字段信息。In response to receiving the data acquisition request, acquire the acquisition information carried in the data acquisition request, acquire corresponding target data or message according to the acquisition information, and return the target data or message, where the acquisition information includes the following At least one of the information: obtaining target database identification information, obtaining target subkey values, and obtaining target field information.
在本发明一实施方式中,所述数据获取请求指的是用于使得所述数据处理服务器执行与所述数据获取请求相应的数据获取操作的请求。所述数据获取请求是由数据获取请求方发出的,其中,所述数据获取请求方既可以为用户,还可以为某一应用,再或者也可以为其他能够发出数据获取请求的主体,比如某一客户端等等,本发明对其不作具体限定。In an embodiment of the present invention, the data acquisition request refers to a request for causing the data processing server to perform a data acquisition operation corresponding to the data acquisition request. The data acquisition request is issued by a data acquisition requester, where the data acquisition requester may be a user, an application, or another subject that can issue a data acquisition request, such as a certain application. A client, etc., which are not specifically limited by the present invention.
在本发明一实施方式中,所述获取信息用于表征数据获取请求方的数据获取要求,以使所述数据处理服务器能够根据所述获取信息进行数据获取操作。In an embodiment of the present invention, the acquisition information is used to characterize the data acquisition requirements of the data acquisition requester, so that the data processing server can perform data acquisition operations based on the acquisition information.
其中,所述获取信息可包括以下信息中的至少一种:获取目标数据库标识信息、获取目标子键值、获取目标字段信息,其中,所述获取目标数据库标识信息指的是用于对于将要进行数据获取操作的数据库进行区别性标识的信息,比如可以为将要进行数据获取操作的数据库的名称或ID等等;所述获取目标子键值指的是将要进行数据获取操作的子键值信息;所述获取目标字段信息指的是将要进行数据获取操作的字段信息。Wherein, the acquisition information may include at least one of the following information: acquiring target database identification information, acquiring target subkey values, and acquiring target field information, where the acquiring target database identification information refers to The information for distinguishing identification of the database of the data acquisition operation, for example, may be the name or ID of the database that will perform the data acquisition operation, etc.; the acquisition target subkey value refers to the subkey value information of the data acquisition operation to be performed; The acquisition target field information refers to the field information for which the data acquisition operation will be performed.
在本发明一实施方式中,所述根据所述获取信息获取得到相应的目标数据或消息,返回所述目标数据或消息的步骤,可被实施为:In an embodiment of the present invention, the step of obtaining the corresponding target data or message according to the obtained information and returning the target data or message may be implemented as:
根据所述获取目标数据库标识信息确定获取目标数据库;Determining the acquisition target database according to the identification information of the acquisition target database;
在所述获取目标数据库中根据所述获取信息获取得到相应的目标数据或消息,并返 回所述目标数据或消息。The corresponding target data or message is acquired in the acquisition target database according to the acquisition information, and the target data or message is returned.
在该实施方式中,在接收到数据获取请求,并获取得到所述数据获取请求携带的获取信息之后,就可以根据所述获取信息中的获取目标数据库标识信息确定对应的获取目标数据库,然后在所述获取目标数据库中执行与所述获取信息相应的数据获取操作,最后将获取得到的目标数据返回给所述数据获取请求方,若未获取到所述数据获取请求方想要的数据,则向所述数据获取请求方发送相应的消息。In this embodiment, after receiving the data acquisition request and acquiring the acquisition information carried in the data acquisition request, the corresponding acquisition target database can be determined according to the acquisition target database identification information in the acquisition information, and then The data acquisition operation corresponding to the acquisition information is executed in the acquisition target database, and finally the acquired target data is returned to the data acquisition requester. If the data desired by the data acquisition requester is not acquired, then Send a corresponding message to the data acquisition requester.
在本发明一实施方式中,所述在所述获取目标数据库中根据所述获取信息获取得到相应的目标数据或消息,并返回所述目标数据或消息,可被实施为:In an embodiment of the present invention, the acquisition of corresponding target data or messages in the acquisition target database according to the acquisition information, and returning the target data or messages may be implemented as follows:
在所述获取目标数据库中查找所述获取目标字段;Search the acquisition target field in the acquisition target database;
当所述获取目标数据库中不存在所述获取目标字段时,返回数据不存在消息;When the acquisition target field does not exist in the acquisition target database, a message that data does not exist is returned;
当所述获取目标数据库中存在所述获取目标字段时,获取与所述获取目标字段对应的获取目标内容值以及与所述获取目标内容值对应的当前超时信息;When the acquisition target field exists in the acquisition target database, acquiring the acquisition target content value corresponding to the acquisition target field and the current timeout information corresponding to the acquisition target content value;
若所述当前超时信息为预设超时信息,返回所述获取目标内容值;If the current timeout information is preset timeout information, return the acquisition target content value;
若所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段已过期,删除所述获取目标数据库中的获取目标字段,并返回数据已过期消息;If the current timeout information is not the preset timeout information, and it is determined that the acquisition target field has expired according to the comparison between the current timeout information and the current time, delete the acquisition target field in the acquisition target database, and return Data has expired message;
若所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段未过期,返回与所述获取目标字段对应的获取目标内容值。If the current timeout information is not the preset timeout information, and it is determined that the acquisition target field has not expired according to the comparison between the current timeout information and the current time, the acquisition target content value corresponding to the acquisition target field is returned.
在该实施方式中,在根据所述获取信息执行数据获取操作时,首先根据所述获取信息中的获取目标数据库标识信息确定将要进行数据获取操作的获取目标数据库;然后在所述获取目标数据库中根据所述获取信息中的获取目标子键值和获取目标字段信息进行查找,查找结果存在以下几种情况:In this embodiment, when performing a data acquisition operation based on the acquisition information, first determine the acquisition target database that will perform the data acquisition operation according to the acquisition target database identification information in the acquisition information; then in the acquisition target database According to the acquisition target subkey value and the acquisition target field information in the acquisition information, the search results have the following situations:
F.所述获取目标数据库中不存在所述获取目标字段,意味着所述获取目标数据库中未存储有所述获取目标字段对应的内容值,则向所述数据获取请求方返回数据不存在消息;F. The acquisition target field does not exist in the acquisition target database, which means that the content value corresponding to the acquisition target field is not stored in the acquisition target database, and the data acquisition requester returns a data non-existent message ;
G.所述获取目标数据库中存在所述获取目标字段,则获取与所述获取目标字段对应的获取目标内容值以及与所述获取目标内容值对应的当前超时信息,此时,又存在以下几种情况:G. If the acquisition target field exists in the acquisition target database, the acquisition target content value corresponding to the acquisition target field and the current timeout information corresponding to the acquisition target content value are acquired. At this time, there are the following Situation:
G1.所述当前超时信息为预设超时信息,其中,所述预设超时信息为本领域技术人员预先设置的超时信息,比如其可以为0或其他值,其用于表征所述获取目标内容值没 有超时的限制,此时可直接将所述获取目标内容值返回给所述数据获取请求方;G1. The current timeout information is preset timeout information, where the preset timeout information is timeout information preset by those skilled in the art, for example, it can be 0 or other values, which are used to characterize the acquisition target content There is no timeout restriction on the value, and at this time, the acquisition target content value can be directly returned to the data acquisition requester;
G2.所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段已过期,说明所述获取目标字段对应的内容值已不可用,此时需要删除所述获取目标数据库中的获取目标字段及其对应的内容值,并向所述数据获取请求方返回数据已过期消息;G2. The current timeout information is not the preset timeout information, and it is determined that the acquisition target field has expired based on the comparison between the current timeout information and the current time, indicating that the content value corresponding to the acquisition target field is no longer available At this time, it is necessary to delete the acquisition target field and its corresponding content value in the acquisition target database, and return a message that the data has expired to the data acquisition requester;
G3.所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段未过期,说明所述获取目标字段对应的内容值是有效的,则将所述获取目标内容值返回给所述数据获取请求方。G3. The current timeout information is not the preset timeout information, and it is determined that the acquisition target field has not expired based on the comparison between the current timeout information and the current time, indicating that the content value corresponding to the acquisition target field is valid , Then the acquisition target content value is returned to the data acquisition requester.
图2为根据本公开一实施方式的数据处理方法的数据赋值流程图,如图2所示,在执行数据赋值操作时,首先获取数据赋值请求中携带的赋值信息,然后在根据赋值目标数据库标识信息确定的赋值目标数据库中查找赋值目标子键值和赋值目标字段信息,若所述赋值目标子键值和赋值目标字段信息不存在,则创建目标子键值和目标字段,写入目标内容值,为目标内容值设置初始附加信息0;若所述赋值目标子键值和赋值目标字段信息存在,则获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息和/或当前版本信息,若所述赋值信息中不包括目标版本信息或者所述目标版本信息为预设版本信息0,则将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新;若所述赋值信息中包括非预设版本信息的目标版本信息,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,若所述目标版本信息与所述当前版本信息不相同,返回版本错误消息,若所述目标版本信息与所述当前版本信息相同,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新。然后检测所述赋值信息中是否包括目标超时信息,若不包括,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,将所述当前内容值替换为所述目标内容值,若包括,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,将所述当前内容值替换为所述目标内容值,将所述当前超时信息替换为所述目标超时信息。Fig. 2 is a data assignment flow chart of a data processing method according to an embodiment of the present disclosure. As shown in Fig. 2, when performing a data assignment operation, first obtain the assignment information carried in the data assignment request, and then identify according to the assignment target database Find the assignment target subkey value and assignment target field information in the assignment target database determined by the information, if the assignment target subkey value and assignment target field information does not exist, create the target subkey value and target field, and write the target content value , Set initial additional information 0 for the target content value; if the assignment target subkey value and assignment target field information exist, obtain the current content value corresponding to the assignment target field information and the current timeout information corresponding to the current content value And/or current version information, if the assignment information does not include target version information or the target version information is preset version information 0, then the current content value is replaced with the target content value, and the The current version information is updated progressively; if the assignment information includes target version information other than the preset version information, the current content value corresponding to the assignment target field information and the current version information corresponding to the current content value are obtained, if If the target version information is different from the current version information, a version error message is returned. If the target version information is the same as the current version information, the current content value is replaced with the target content value, and the The current version information is updated progressively. Then detect whether the assignment information includes target timeout information, if not, obtain the current content value corresponding to the assignment target field information and the current timeout information corresponding to the current content value, and replace the current content value with the current content value. If the target content value includes, obtain the current content value corresponding to the assignment target field information and the current timeout information corresponding to the current content value, replace the current content value with the target content value, and replace the current The timeout information is replaced with the target timeout information.
图3为根据本公开一实施方式的数据处理方法的数据获取流程图,如图3所示,在执行数据获取操作时,首先获取数据获取请求中携带的获取信息,然后在根据获取目标数据库标识信息确定的获取目标数据库中查找获取目标字段信息,若不存在,向所述数据获取请求方返回数据不存在消息,若存在,获取与所述获取目标字段对应的获取目标内容值以及与所述获取目标内容值对应的当前超时信息,若所述当前超时信息不为预设 超时信息0,比较所述当前超时信息与当前时间判断是否已超时,若超时,删除所述获取目标数据库中的获取目标字段,并向所述数据获取请求方返回数据已过期消息,若未超时,则向所述数据获取请求方返回与所述获取目标字段对应的获取目标内容值。FIG. 3 is a data acquisition flowchart of a data processing method according to an embodiment of the present disclosure. As shown in FIG. 3, when performing a data acquisition operation, first acquire the acquisition information carried in the data acquisition request, and then obtain the data according to the target database identification Search and obtain target field information in the acquisition target database determined by the information. If it does not exist, return a data non-existent message to the data acquisition requester. If it exists, obtain the acquisition target content value corresponding to the acquisition target field and the Obtain the current timeout information corresponding to the target content value. If the current timeout information is not preset timeout information 0, compare the current timeout information with the current time to determine whether it has timed out, and if it times out, delete the acquisition in the acquisition target database Target field, and return a data expired message to the data acquisition requester, and if it does not expire, return the acquisition target content value corresponding to the acquisition target field to the data acquisition requester.
上述技术方案通过直接在field对应的value数据结构中内置超时信息和版本信息,来实现field对应过期时间和版本信息的单独设置,进而实现在数据的读写过程中直接在redis内部完成对过期时间和版本信息的检查和判断,上述请求本身是原子的,因此可以不依赖redis的lua脚本和事务特性,同时数据读写过程中上述数据处理服务器和redis只需要一次交互通信,进而能够大大提高性能。另外,上述技术方案不依赖客户端实现,因此可以应用于任何语言的redis客户端。The above technical solution realizes the separate setting of the expiration time and version information corresponding to the field by directly embedding the timeout information and version information in the value data structure corresponding to the field, and then realizes the completion of the expiration time directly in redis during the data reading and writing process In addition to the check and judgment of version information, the above request itself is atomic, so it does not rely on the lua script and transaction characteristics of redis. At the same time, the data processing server and redis only need to communicate once during the data reading and writing process, which can greatly improve performance . In addition, the above technical solution does not rely on client implementation, so it can be applied to redis clients in any language.
下述为本发明装置实施例,可以用于执行本发明方法实施例。The following are device embodiments of the present invention, which can be used to implement the method embodiments of the present invention.
图4示出根据本发明一实施方式的数据处理装置的结构框图,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部,可实现为数据处理服务器。如图4所示,所述数据处理装置包括:Fig. 4 shows a structural block diagram of a data processing device according to an embodiment of the present invention. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of the two, and can be implemented as a data processing server. As shown in Figure 4, the data processing device includes:
接收模块401,被配置为接收数据赋值请求,其中,所述数据赋值请求携带有赋值信息,所述赋值信息包括以下信息中的至少一种:赋值目标数据库标识信息、赋值目标子键值、赋值目标字段信息、与所述赋值目标字段信息对应的目标内容值以及与所述目标内容值对应的目标附加信息,所述目标附加信息包括目标超时信息;The receiving module 401 is configured to receive a data assignment request, wherein the data assignment request carries assignment information, and the assignment information includes at least one of the following information: assignment target database identification information, assignment target subkey, assignment Target field information, a target content value corresponding to the assignment target field information, and target additional information corresponding to the target content value, where the target additional information includes target timeout information;
获取模块402,被配置为获取所述赋值信息;The obtaining module 402 is configured to obtain the assignment information;
执行模块403,被配置为根据所述赋值信息在所述赋值目标数据库标识信息对应的赋值目标数据库中执行数据赋值操作,其中,所述赋值目标数据库中存储的内容值对应设置有附加信息。The execution module 403 is configured to perform a data assignment operation in the assignment target database corresponding to the assignment target database identification information according to the assignment information, wherein the content value stored in the assignment target database is correspondingly set with additional information.
上文提及,随着数据技术的发展,对于数据存储的需求也越来越多,比如在Redis数据存储系统中,业务需要为一个hash(哈希)存储结构中的某个字段field单独设置过期时间,比如,若一个用户代表一个hash结构,用户的每次签到代表一个field,每次签到都存在一个有效期,这就需要为每个field单独设置过期时间,当某个field过期就代表该次签到失效,相应的数据会被自动从hash中删除,最终通过统计hash的长度,就可以得到该用户当前有效签到的次数。现有技术中,通常通过将一个field的过期时间单独写入一个Redis的zset数据结构中,然后内部启动一个异步线程去周期性的检测该过期时间,一旦发现该field过期,就调用hdel删除命令从hash中删除这个field,来实现为field设置单独的过期时间。上述方案虽然能够实现为filed单独设置 过期时间,但是其严重依赖redis的lua脚本和事务特性,因此适用性较差,另外,上述方案需要与redis进行多次交互,进而会带来性能的损失。As mentioned above, with the development of data technology, there are more and more requirements for data storage. For example, in the Redis data storage system, the business needs to be set separately for a field in a hash (hash) storage structure Expiration time, for example, if a user represents a hash structure, each check-in of the user represents a field, and each check-in has an expiration date. This requires a separate expiration time for each field. When a field expires, it represents that If the second check-in is invalid, the corresponding data will be automatically deleted from the hash. Finally, by counting the length of the hash, you can get the current number of valid check-ins for the user. In the prior art, the expiration time of a field is usually written into a Redis zset data structure separately, and then an asynchronous thread is started internally to periodically detect the expiration time. Once the field is found to be expired, the hdel delete command is called Delete this field from the hash to set a separate expiration time for the field. Although the above solution can be implemented to set a separate expiration time for filed, it relies heavily on the lua script and transaction characteristics of redis, so its applicability is poor. In addition, the above solution requires multiple interactions with redis, which will cause performance loss.
考虑到上述问题,在该实施方式中,提出一种数据处理装置,该装置通过为Redis数据存储系统hash存储结构中的字段field对应的value内容值设置过期时间和/或版本信息等附加信息来实现对于数据的单独控制。该技术方案由于是在value内容值层面上进行的附加信息维度设置,无需依赖redis的lua脚本和事务特性,也无需与redis进行多次交互,因此适用性较强,同时,还能够有效避免性能的损失。Considering the above problems, in this embodiment, a data processing device is proposed, which sets additional information such as expiration time and/or version information for the value content value corresponding to the field field in the hash storage structure of the Redis data storage system. Achieve individual control of data. Since this technical solution is an additional information dimension setting at the value content level, it does not need to rely on the lua script and transaction characteristics of redis, and does not need to interact with redis multiple times, so it has strong applicability and can effectively avoid performance. Loss.
在本发明一实施方式中,所述数据处理装置适用于双层key-value(键-值)结构数据的应用场景,在该应用场景中,具有主key和子key,而所述数据处理装置主要用于对于子key数据进行处理。In one embodiment of the present invention, the data processing device is suitable for a dual-layer key-value (key-value) structured data application scenario. In this application scenario, there is a main key and a sub-key, and the data processing device mainly Used to process sub-key data.
在本发明一实施方式中,所述数据赋值请求指的是用于使得所述数据处理服务器执行与所述数据赋值请求相应的数据赋值操作的请求。所述数据赋值请求是由数据赋值请求方发出的,其中,所述数据赋值请求方既可以为用户,还可以为某一应用,再或者也可以为其他能够发出数据赋值请求的主体,比如某一客户端等等,本发明对其不作具体限定。In an embodiment of the present invention, the data assignment request refers to a request for causing the data processing server to perform a data assignment operation corresponding to the data assignment request. The data assignment request is issued by the data assignment requester, where the data assignment requester can be either a user, an application, or another subject that can issue a data assignment request, such as a certain application. A client, etc., which are not specifically limited by the present invention.
在本发明一实施方式中,所述赋值信息用于表征数据赋值请求方的数据赋值要求,以使所述数据处理服务器能够根据所述赋值信息进行数据赋值操作。In an embodiment of the present invention, the assignment information is used to characterize the data assignment requirements of the data assignment requester, so that the data processing server can perform data assignment operations based on the assignment information.
其中,所述赋值信息可包括以下信息中的至少一种:赋值目标数据库标识信息、赋值目标子键值、赋值目标字段信息、与所述赋值目标字段信息对应的目标内容值以及与所述目标内容值对应的目标附加信息,其中,所述赋值目标数据库标识信息指的是用于对于将要进行赋值操作的数据库进行区别性标识的信息,比如可以为将要进行赋值操作的数据库的名称或ID等等;所述赋值目标子键值指的是将要进行赋值操作的子键值信息;所述赋值目标字段信息指的是将要进行赋值操作的字段信息;所述目标内容值指的是将要进行赋值操作的字段所对应的内容值,即将要写入至所述赋值目标数据库中的内容值;所述目标附加信息指的是与所述目标内容值对应的、与所述目标内容值相关的、相比现有技术新增的信息,在本发明一实施方式中,所述目标附加信息可包括目标超时信息,在本发明另一实施方式中,所述目标附加信息还可包括目标版本信息,当然,所述目标附加信息还可包括更多类型的附加信息,所述目标附加信息的具体内容可根据实际应用的需要进行设置,本公开对其不作具体限定。Wherein, the assignment information may include at least one of the following information: assignment target database identification information, assignment target sub-key value, assignment target field information, target content value corresponding to the assignment target field information, and target content value corresponding to the assignment target field information. Target additional information corresponding to the content value, where the assignment target database identification information refers to information used to distinguish the database that will be assigned, such as the name or ID of the database that will be assigned, etc. Etc.; the assignment target subkey value refers to the subkey value information that will be assigned; the assignment target field information refers to the field information that will be assigned; the target content value refers to the assignment to be performed The content value corresponding to the operated field is the content value to be written into the assignment target database; the target additional information refers to the content value corresponding to the target content value and related to the target content value. Compared with the newly added information in the prior art, in one embodiment of the present invention, the target additional information may include target timeout information, and in another embodiment of the present invention, the target additional information may also include target version information, Of course, the target additional information may also include more types of additional information, and the specific content of the target additional information may be set according to the needs of actual applications, which is not specifically limited in the present disclosure.
在获取得到所述赋值信息之后,所述数据处理服务器就可以根据所述赋值信息在所 述赋值目标数据库标识信息对应的赋值目标数据库中执行与所述赋值信息相应的数据赋值操作,其中,所述赋值目标数据库中存储的内容值对应设置有附加信息,在执行了数据赋值操作之后,所得到的目标数据也对应存储有附加信息,以对所述目标数据进行附加解释、描述或限制。After obtaining the assignment information, the data processing server can execute the data assignment operation corresponding to the assignment information in the assignment target database corresponding to the assignment target database identification information according to the assignment information, where all The content value stored in the assignment target database is correspondingly set with additional information. After the data assignment operation is performed, the obtained target data is also correspondingly stored with additional information to provide additional explanation, description or restriction on the target data.
为了描述的方便,接下来以超时附加信息和版本附加信息作为目标附加信息为例对于本公开进行解释和说明,即在本发明一实施方式中,所述超时附加信息和版本附加信息既可以分开存储在与内容值对应的位置处,也可以合并存储在与内容值对应的位置处,以节省存储空间,另外,根据实际应用的需要,也可以将所述超时附加信息和版本附加信息分别以一个键值的形式存储在Redis中,总之,所述超时附加信息和版本附加信息的存储方式和存储位置可根据实际应用的需要进行选择和确定,本公开对其不作具体限制。For the convenience of description, the following will explain and illustrate the present disclosure by taking timeout additional information and version additional information as target additional information as an example. That is, in an embodiment of the present invention, the timeout additional information and version additional information can be separated. Stored at the location corresponding to the content value, or combined and stored at the location corresponding to the content value to save storage space. In addition, according to actual application needs, the timeout additional information and version additional information can also be separately A key value is stored in Redis. In short, the storage mode and storage location of the timeout additional information and version additional information can be selected and determined according to actual application needs, and this disclosure does not specifically limit it.
在本发明一实施方式中,所述执行模块403可被配置为:In an embodiment of the present invention, the execution module 403 may be configured as:
根据所述赋值目标数据库标识信息确定赋值目标数据库;Determining an assignment target database according to the identification information of the assignment target database;
在所述赋值目标数据库中查找所述赋值目标子键值和赋值目标字段信息;Searching the assignment target subkey value and the assignment target field information in the assignment target database;
当所述赋值目标数据库中不存在所述赋值目标子键值和赋值目标字段信息时,根据所述赋值目标子键值和赋值目标字段信息创建目标子键值和目标字段,并将所述目标内容值写入至所述目标字段中,当根据所述目标内容值确定需要为其设置附加信息时,为所述目标内容值设置初始附加信息;When the assignment target subkey value and assignment target field information do not exist in the assignment target database, a target subkey value and a target field are created according to the assignment target subkey value and assignment target field information, and the target The content value is written into the target field, and when it is determined that additional information needs to be set for the target content value, initial additional information is set for the target content value;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标超时信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,将所述当前内容值替换为所述目标内容值;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information does not include target timeout information, obtain the current content value corresponding to the assignment target field information and the current The current timeout information corresponding to the content value, replacing the current content value with the target content value;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标超时信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,将所述当前内容值替换为所述目标内容值,将所述当前超时信息替换为所述目标超时信息;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information includes target timeout information, obtain the current content value corresponding to the assignment target field information and the current content Current timeout information corresponding to the value, replacing the current content value with the target content value, and replacing the current timeout information with the target timeout information;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标版本信息或者所述目标版本信息为预设版本信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information does not include target version information or the target version information is preset version information, the assignment target is acquired The current content value corresponding to the field information and the current version information corresponding to the current content value, replacing the current content value with the target content value, and progressively updating the current version information;
当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋 值信息中包括目标版本信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,比较所述目标版本信息与所述当前版本信息,当所述目标版本信息与所述当前版本信息相同时,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新,当所述目标版本信息与所述当前版本信息不相同时,返回赋值错误消息。When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information includes target version information, obtain the current content value corresponding to the assignment target field information and the current content Value corresponding to the current version information, compare the target version information with the current version information, when the target version information is the same as the current version information, replace the current content value with the target content value, and The current version information is progressively updated, and when the target version information is not the same as the current version information, an assignment error message is returned.
在该实施方式中,在根据所述赋值信息在所述赋值目标数据库中执行数据赋值操作时,首先根据所述赋值信息中的赋值目标数据库标识信息确定将要进行数据赋值操作的赋值目标数据库;然后在所述赋值目标数据库中根据所述赋值信息中的赋值目标子键值和赋值目标字段信息进行查找,查找结果存在以下几种情况:In this embodiment, when performing a data assignment operation in the assignment target database according to the assignment information, first determine the assignment target database that will perform the data assignment operation according to the assignment target database identification information in the assignment information; then In the assignment target database, search is performed according to the assignment target subkey value and the assignment target field information in the assignment information, and the search results have the following situations:
A.所述赋值目标数据库中不存在所述赋值目标子键值和赋值目标字段信息,那么就需要根据所述赋值信息中的赋值目标子键值和赋值目标字段信息在所述赋值目标数据库中创建目标子键值和目标字段,然后再将所述目标内容值写入至所述目标字段对应的位置中,当根据所述目标内容值确定需要为其设置附加信息时,为所述目标内容值设置初始附加信息,比如,若所述目标内容值为ex(秒级别相对超时时间)/exat(秒级别绝对超时时间)/px(毫秒级别相对超时时间)/pxat(毫秒级别绝对超时时间)等参数,则需要为其设置超时附加信息,若所述目标内容值为ver(版本)等参数,则需要为其设置版本附加信息,其中,所述初始附加信息可以为本领域技术人员预先设置的初始附加信息,比如0等等。A. The assignment target subkey value and assignment target field information does not exist in the assignment target database, so it is necessary to store the assignment target subkey value and assignment target field information in the assignment target database according to the assignment target subkey value and assignment target field information in the assignment information Create a target subkey value and a target field, and then write the target content value into the position corresponding to the target field. When it is determined according to the target content value that additional information needs to be set for the target content, The value sets the initial additional information, for example, if the target content value is ex (relative timeout time at second level)/exat (absolute timeout time at second level)/px (relative timeout time at millisecond level)/pxat (absolute timeout time at millisecond level) If the target content value is ver (version) and other parameters, you need to set the version additional information for it. The initial additional information can be preset by those skilled in the art. The initial additional information, such as 0 and so on.
B.所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标超时信息,这说明所述赋值目标字段对应的目标内容值无需新设置超时附加信息,此时可获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,直接将所述当前内容值替换为所述目标内容值即可。B. The assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information does not include target timeout information, which means that the target content value corresponding to the assignment target field does not need to set a new timeout Additional information. At this time, the current content value corresponding to the assignment target field information and the current timeout information corresponding to the current content value can be obtained, and the current content value can be directly replaced with the target content value.
C.所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标超时信息,这说明所述赋值目标字段对应的目标内容值需要新设置超时附加信息,此时可获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,分别将所述当前内容值替换为所述目标内容值,将所述当前超时信息替换为所述目标超时信息,在本发明一实施方式中,所述将所述当前超时信息替换为所述目标超时信息,可被实施为:将所述目标超时信息转换为目标超时时间,比如2019年12月1日8:00,并使用所述目标超时时间替换所述当前超时信息,时间转换之后就可很方便地与当前时间进行比较以确定相应的数据是否已超时或超期。C. The assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information includes target timeout information, which indicates that the target content value corresponding to the assignment target field needs to be newly set with a timeout addition Information, the current content value corresponding to the assignment target field information and the current timeout information corresponding to the current content value can be obtained at this time, the current content value is replaced with the target content value, and the current timeout information Replaced with the target timeout information. In an embodiment of the present invention, the replacing the current timeout information with the target timeout information can be implemented as: converting the target timeout information into a target timeout time, such as At 8:00 on December 1, 2019, and replace the current timeout information with the target timeout time, after the time is converted, it can be easily compared with the current time to determine whether the corresponding data has timed out or expired.
D.所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标版本信息或者所述目标版本信息为预设版本信息,其中,所述预设版本信息为本领域技术人员预先设置的版本信息,比如其可以为0或其他值,所述目标版本信息的缺失以及预设版本信息的设置说明无需对于所述目标内容值对应的版本附加信息进行校验即可进行内容值的修改,此时可直接获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,将所述当前内容值替换为所述目标内容值,并在替换之后对于所述内容值对应的当前版本信息进行递进更新,比如,在替换前的版本信息的基础上增加一更新递进值,例如,若替换前的版本信息为2,更新递进值为1,则替换之后的版本信息可变为2+1=3。D. The assignment target sub-key and assignment target field information exist in the assignment target database, and the assignment information does not include target version information or the target version information is preset version information, wherein the preset Suppose the version information is the version information preset by those skilled in the art, for example, it can be 0 or other values. The lack of the target version information and the setting description of the preset version information do not require additional version information corresponding to the target content value The content value can be modified after verification. At this time, the current content value corresponding to the assignment target field information and the current version information corresponding to the current content value can be directly obtained, and the current content value can be replaced with the target The content value, and the current version information corresponding to the content value is progressively updated after the replacement, for example, an update progressive value is added to the version information before the replacement, for example, if the version information before the replacement is 2 , The update progression value is 1, then the version information after replacement can be changed to 2+1=3.
E.所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标版本信息,这说明需要对于所述目标内容值对应的版本附加信息进行校验,校验通过之后才可进行内容值的修改,比如当所述目标版本信息与所述赋值目标字段信息对应的当前内容值对应的当前版本信息一致时,才可对内容值进行修改,此时先获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,然后对于所述目标版本信息与所述当前版本信息进行比较,当所述目标版本信息与所述当前版本信息相同时,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新,若所述目标版本信息与所述当前版本信息不相同,则返回赋值错误消息,其中,所述赋值错误消息还可携带有赋值错误原因。E. The assignment target subkey value and assignment target field information exist in the assignment target database, and the assignment information includes target version information, which indicates that the version additional information corresponding to the target content value needs to be verified After the verification is passed, the content value can be modified. For example, when the target version information is consistent with the current version information corresponding to the current content value corresponding to the assignment target field information, the content value can be modified. First obtain the current content value corresponding to the assignment target field information and the current version information corresponding to the current content value, and then compare the target version information with the current version information. When the current version information is the same, the current content value is replaced with the target content value, and the current version information is progressively updated. If the target version information is not the same as the current version information, the assignment is returned An error message, where the assignment error message may also carry the reason for the assignment error.
在本发明一实施方式中,所述装置还包括根据接收到的数据获取请求获取数据的部分,即所述数据处理装置包括:In an embodiment of the present invention, the device further includes a part for acquiring data according to the received data acquisition request, that is, the data processing device includes:
接收模块,被配置为接收数据赋值请求,其中,所述数据赋值请求携带有赋值信息,其中,所述赋值信息包括以下信息中的至少一种:赋值目标数据库标识信息、赋值目标子键值、赋值目标字段信息、与所述赋值目标字段信息对应的目标内容值以及与所述目标内容值对应的目标附加信息,其中,所述目标附加信息包括目标超时信息;The receiving module is configured to receive a data assignment request, wherein the data assignment request carries assignment information, wherein the assignment information includes at least one of the following information: assignment target database identification information, assignment target subkey, Assignment target field information, a target content value corresponding to the assignment target field information, and target additional information corresponding to the target content value, wherein the target additional information includes target timeout information;
获取模块,被配置为获取所述赋值信息;An obtaining module configured to obtain the assignment information;
执行模块,被配置为根据所述赋值信息在所述赋值目标数据库标识信息对应的赋值目标数据库中执行数据赋值操作,其中,所述赋值目标数据库中存储的内容值对应设置有附加信息;The execution module is configured to perform a data assignment operation in the assignment target database corresponding to the assignment target database identification information according to the assignment information, wherein the content value stored in the assignment target database is correspondingly set with additional information;
数据获取模块,被配置为响应于接收到数据获取请求,获取所述数据获取请求携带的获取信息,并根据所述获取信息获取得到相应的目标数据或消息,返回所述目标数据 或消息,其中,所述获取信息包括以下信息中的至少一种:获取目标数据库标识信息、获取目标子键值、获取目标字段信息。The data acquisition module is configured to, in response to receiving a data acquisition request, acquire acquisition information carried in the data acquisition request, acquire corresponding target data or message according to the acquisition information, and return the target data or message, where The acquisition information includes at least one of the following information: acquiring target database identification information, acquiring target subkey values, and acquiring target field information.
在本发明一实施方式中,所述数据获取请求指的是用于使得所述数据处理服务器执行与所述数据获取请求相应的数据获取操作的请求。所述数据获取请求是由数据获取请求方发出的,其中,所述数据获取请求方既可以为用户,还可以为某一应用,再或者也可以为其他能够发出数据获取请求的主体,比如某一客户端等等,本发明对其不作具体限定。In an embodiment of the present invention, the data acquisition request refers to a request for causing the data processing server to perform a data acquisition operation corresponding to the data acquisition request. The data acquisition request is issued by a data acquisition requester, where the data acquisition requester may be a user, an application, or another subject that can issue a data acquisition request, such as a certain application. A client, etc., which are not specifically limited by the present invention.
在本发明一实施方式中,所述获取信息用于表征数据获取请求方的数据获取要求,以使所述数据处理服务器能够根据所述获取信息进行数据获取操作。In an embodiment of the present invention, the acquisition information is used to characterize the data acquisition requirements of the data acquisition requester, so that the data processing server can perform data acquisition operations based on the acquisition information.
其中,所述获取信息可包括以下信息中的至少一种:获取目标数据库标识信息、获取目标子键值、获取目标字段信息,其中,所述获取目标数据库标识信息指的是用于对于将要进行数据获取操作的数据库进行区别性标识的信息,比如可以为将要进行数据获取操作的数据库的名称或ID等等;所述获取目标子键值指的是将要进行数据获取操作的子键值信息;所述获取目标字段信息指的是将要进行数据获取操作的字段信息。Wherein, the acquisition information may include at least one of the following information: acquiring target database identification information, acquiring target subkey values, and acquiring target field information, where the acquiring target database identification information refers to The information for distinguishing identification of the database of the data acquisition operation, for example, may be the name or ID of the database that will perform the data acquisition operation, etc.; the acquisition target subkey value refers to the subkey value information of the data acquisition operation to be performed; The acquisition target field information refers to the field information for which the data acquisition operation will be performed.
在本发明一实施方式中,所述根据所述获取信息获取得到相应的目标数据或消息,返回所述目标数据或消息的部分,可被配置为:In an embodiment of the present invention, the part of obtaining the corresponding target data or message according to the obtained information and returning the target data or message may be configured as:
根据所述获取目标数据库标识信息确定获取目标数据库;Determining the acquisition target database according to the identification information of the acquisition target database;
在所述获取目标数据库中根据所述获取信息获取得到相应的目标数据或消息,并返回所述目标数据或消息。The corresponding target data or message is acquired in the acquisition target database according to the acquisition information, and the target data or message is returned.
在该实施方式中,在接收到数据获取请求,并获取得到所述数据获取请求携带的获取信息之后,就可以根据所述获取信息中的获取目标数据库标识信息确定对应的获取目标数据库,然后在所述获取目标数据库中执行与所述获取信息相应的数据获取操作,最后将获取得到的目标数据返回给所述数据获取请求方,若未获取到所述数据获取请求方想要的数据,则向所述数据获取请求方发送相应的消息。In this embodiment, after receiving the data acquisition request and acquiring the acquisition information carried in the data acquisition request, the corresponding acquisition target database can be determined according to the acquisition target database identification information in the acquisition information, and then The data acquisition operation corresponding to the acquisition information is executed in the acquisition target database, and finally the acquired target data is returned to the data acquisition requester. If the data desired by the data acquisition requester is not acquired, then Send a corresponding message to the data acquisition requester.
在本发明一实施方式中,所述在所述获取目标数据库中根据所述获取信息获取得到相应的目标数据或消息,并返回所述目标数据或消息的部分,可被配置为:In an embodiment of the present invention, the part of obtaining corresponding target data or message according to the obtaining information in the obtaining target database and returning the target data or message may be configured as:
在所述获取目标数据库中查找所述获取目标字段;Search the acquisition target field in the acquisition target database;
当所述获取目标数据库中不存在所述获取目标字段时,返回数据不存在消息;When the acquisition target field does not exist in the acquisition target database, a message that data does not exist is returned;
当所述获取目标数据库中存在所述获取目标字段时,获取与所述获取目标字段对应的获取目标内容值以及与所述获取目标内容值对应的当前超时信息;When the acquisition target field exists in the acquisition target database, acquiring the acquisition target content value corresponding to the acquisition target field and the current timeout information corresponding to the acquisition target content value;
若所述当前超时信息为预设超时信息,返回所述获取目标内容值;If the current timeout information is preset timeout information, return the acquisition target content value;
若所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段已过期,删除所述获取目标数据库中的获取目标字段,并返回数据已过期消息;If the current timeout information is not the preset timeout information, and it is determined that the acquisition target field has expired according to the comparison between the current timeout information and the current time, delete the acquisition target field in the acquisition target database, and return Data has expired message;
若所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段未过期,返回与所述获取目标字段对应的获取目标内容值。If the current timeout information is not the preset timeout information, and it is determined that the acquisition target field has not expired according to the comparison between the current timeout information and the current time, the acquisition target content value corresponding to the acquisition target field is returned.
在该实施方式中,在根据所述获取信息执行数据获取操作时,首先根据所述获取信息中的获取目标数据库标识信息确定将要进行数据获取操作的获取目标数据库;然后在所述获取目标数据库中根据所述获取信息中的获取目标子键值和获取目标字段信息进行查找,查找结果存在以下几种情况:In this embodiment, when performing a data acquisition operation based on the acquisition information, first determine the acquisition target database that will perform the data acquisition operation according to the acquisition target database identification information in the acquisition information; then in the acquisition target database According to the acquisition target subkey value and the acquisition target field information in the acquisition information, the search results have the following situations:
F.所述获取目标数据库中不存在所述获取目标字段,意味着所述获取目标数据库中未存储有所述获取目标字段对应的内容值,则向所述数据获取请求方返回数据不存在消息;F. The acquisition target field does not exist in the acquisition target database, which means that the content value corresponding to the acquisition target field is not stored in the acquisition target database, and the data acquisition requester returns a data non-existent message ;
G.所述获取目标数据库中存在所述获取目标字段,则获取与所述获取目标字段对应的获取目标内容值以及与所述获取目标内容值对应的当前超时信息,此时,又存在以下几种情况:G. If the acquisition target field exists in the acquisition target database, the acquisition target content value corresponding to the acquisition target field and the current timeout information corresponding to the acquisition target content value are acquired. At this time, there are the following Situation:
G1.所述当前超时信息为预设超时信息,其中,所述预设超时信息为本领域技术人员预先设置的超时信息,比如其可以为0或其他值,其用于表征所述获取目标内容值没有超时的限制,此时可直接将所述获取目标内容值返回给所述数据获取请求方;G1. The current timeout information is preset timeout information, where the preset timeout information is timeout information preset by those skilled in the art, for example, it can be 0 or other values, which are used to characterize the acquisition target content There is no timeout restriction on the value, and at this time, the acquisition target content value can be directly returned to the data acquisition requester;
G2.所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段已过期,说明所述获取目标字段对应的内容值已不可用,此时需要删除所述获取目标数据库中的获取目标字段及其对应的内容值,并向所述数据获取请求方返回数据已过期消息;G2. The current timeout information is not the preset timeout information, and it is determined that the acquisition target field has expired based on the comparison between the current timeout information and the current time, indicating that the content value corresponding to the acquisition target field is no longer available At this time, it is necessary to delete the acquisition target field and its corresponding content value in the acquisition target database, and return a message that the data has expired to the data acquisition requester;
G3.所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段未过期,说明所述获取目标字段对应的内容值是有效的,则将所述获取目标内容值返回给所述数据获取请求方。G3. The current timeout information is not the preset timeout information, and it is determined that the acquisition target field has not expired based on the comparison between the current timeout information and the current time, indicating that the content value corresponding to the acquisition target field is valid , Then the acquisition target content value is returned to the data acquisition requester.
本发明实施例还公开了一种电子设备,所述电子设备包括存储器和处理器;其中,The embodiment of the present invention also discloses an electronic device, the electronic device includes a memory and a processor; wherein,
所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现上述任一方法步骤。The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement any of the above method steps.
图5适于用来实现根据本发明实施方式的数据处理方法的计算机系统的结构示意 图。Fig. 5 is a schematic structural diagram of a computer system suitable for implementing the data processing method according to an embodiment of the present invention.
如图5所示,计算机系统500包括处理单元501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储部分508加载到随机访问存储器(RAM)503中的程序而执行上述实施方式中的各种处理。在RAM503中,还存储有系统500操作所需的各种程序和数据。处理单元501、ROM502以及RAM503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。As shown in FIG. 5, the computer system 500 includes a processing unit 501, which can execute the above-mentioned implementation according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503 Various treatments in the way. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The processing unit 501, ROM502, and RAM503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to the bus 504.
以下部件连接至I/O接口505:包括键盘、鼠标等的输入部分506;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分507;包括硬盘等的存储部分508;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分509。通信部分509经由诸如因特网的网络执行通信处理。驱动器510也根据需要连接至I/O接口505。可拆卸介质511,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器510上,以便于从其上读出的计算机程序根据需要被安装入存储部分508。其中,所述处理单元501可实现为CPU、GPU、FPGA、NPU等处理单元。The following components are connected to the I/O interface 505: an input part 506 including a keyboard, a mouse, etc.; an output part 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and speakers, etc.; a storage part 508 including a hard disk, etc. ; And a communication section 509 including a network interface card such as a LAN card, a modem, and the like. The communication section 509 performs communication processing via a network such as the Internet. The driver 510 is also connected to the I/O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that the computer program read therefrom is installed into the storage portion 508 as needed. Wherein, the processing unit 501 may be implemented as a processing unit such as a CPU, GPU, FPGA, and NPU.
特别地,根据本发明的实施方式,上文描述的方法可以被实现为计算机软件程序。例如,本发明的实施方式包括一种计算机程序产品,其包括有形地包含在及其可读介质上的计算机程序,所述计算机程序包含用于执行所述数据处理方法的程序代码。在这样的实施方式中,该计算机程序可以通过通信部分509从网络上被下载和安装,和/或从可拆卸介质511被安装。In particular, according to the embodiments of the present invention, the method described above can be implemented as a computer software program. For example, the embodiment of the present invention includes a computer program product, which includes a computer program tangibly contained on a readable medium thereof, and the computer program includes program code for executing the data processing method. In such an embodiment, the computer program may be downloaded and installed from the network through the communication part 509, and/or installed from the removable medium 511.
附图中的流程图和框图,图示了按照本发明各种实施方式的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,路程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions, and operations of the system, method, and computer program product according to various embodiments of the present invention. In this regard, each block in the route diagram or block diagram may represent a module, program segment, or part of the code, and the module, program segment, or part of the code contains one or more functions for realizing the specified logical function. Executable instructions. It should also be noted that, in some alternative implementations, the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown one after another can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
描述于本发明实施方式中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。The units or modules involved in the embodiments described in the present invention can be implemented in software or hardware. The described units or modules may also be provided in the processor, and the names of these units or modules do not constitute a limitation on the units or modules themselves under certain circumstances.
作为另一方面,本发明实施例还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施方式中所述装置中所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,所述程序被一个或者一个以上的处理器用来执行描述于本发明实施例的方法。As another aspect, the embodiments of the present invention also provide a computer-readable storage medium. The computer-readable storage medium may be the computer-readable storage medium included in the device described in the foregoing embodiment; or it may exist alone. , A computer-readable storage medium that is not installed in the device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the methods described in the embodiments of the present invention.
以上描述仅为本发明的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本发明实施例中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离所述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本发明实施例中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present invention and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present invention is not limited to the technical solution formed by the specific combination of the above technical features, and should also cover the above-mentioned technical solutions without departing from the inventive concept. Other technical solutions formed by any combination of technical features or their equivalent features. For example, the above-mentioned features and the technical features disclosed in the embodiments of the present invention (but not limited to) having similar functions are replaced with each other to form a technical solution.

Claims (16)

  1. 一种数据处理方法,适用于数据处理服务器,包括:A data processing method suitable for a data processing server, including:
    接收数据赋值请求,其中,所述数据赋值请求携带有赋值信息,所述赋值信息包括以下信息中的至少一种:赋值目标数据库标识信息、赋值目标子键值、赋值目标字段信息、与所述赋值目标字段信息对应的目标内容值以及与所述目标内容值对应的目标附加信息,所述目标附加信息包括目标超时信息;A data assignment request is received, wherein the data assignment request carries assignment information, and the assignment information includes at least one of the following information: assignment target database identification information, assignment target subkey value, assignment target field information, and the Assigning a target content value corresponding to the target field information and target additional information corresponding to the target content value, where the target additional information includes target timeout information;
    获取所述赋值信息;Obtaining the assignment information;
    根据所述赋值信息在所述赋值目标数据库标识信息对应的赋值目标数据库中执行数据赋值操作,其中,所述赋值目标数据库中存储的内容值对应设置有附加信息。A data assignment operation is performed in the assignment target database corresponding to the assignment target database identification information according to the assignment information, wherein the content value stored in the assignment target database is correspondingly set with additional information.
  2. 根据权利要求1所述的方法,其特征在于,所述目标附加信息还包括目标版本信息。The method according to claim 1, wherein the target additional information further includes target version information.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述赋值信息在所述赋值目标数据库标识信息对应的赋值目标数据库中执行数据赋值操作,被实施为:The method according to claim 2, wherein the performing a data assignment operation in the assignment target database corresponding to the assignment target database identification information according to the assignment information is implemented as:
    根据所述赋值目标数据库标识信息确定赋值目标数据库;Determining an assignment target database according to the identification information of the assignment target database;
    在所述赋值目标数据库中查找所述赋值目标子键值和赋值目标字段信息;Searching the assignment target subkey value and the assignment target field information in the assignment target database;
    当所述赋值目标数据库中不存在所述赋值目标子键值和赋值目标字段信息时,根据所述赋值目标子键值和赋值目标字段信息创建目标子键值和目标字段,并将所述目标内容值写入至所述目标字段中,当根据所述目标内容值确定需要为其设置附加信息时,为所述目标内容值设置初始附加信息;When the assignment target subkey value and assignment target field information do not exist in the assignment target database, a target subkey value and a target field are created according to the assignment target subkey value and assignment target field information, and the target The content value is written into the target field, and when it is determined that additional information needs to be set for the target content value, initial additional information is set for the target content value;
    当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标超时信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,将所述当前内容值替换为所述目标内容值;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information does not include target timeout information, obtain the current content value corresponding to the assignment target field information and the current The current timeout information corresponding to the content value, replacing the current content value with the target content value;
    当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标超时信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,将所述当前内容值替换为所述目标内容值,将所述当前超时信息替换为所述目标超时信息;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information includes target timeout information, obtain the current content value corresponding to the assignment target field information and the current content Current timeout information corresponding to the value, replacing the current content value with the target content value, and replacing the current timeout information with the target timeout information;
    当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标版本信息或者所述目标版本信息为预设版本信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information does not include target version information or the target version information is preset version information, the assignment target is acquired The current content value corresponding to the field information and the current version information corresponding to the current content value, replacing the current content value with the target content value, and progressively updating the current version information;
    当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标版本信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,比较所述目标版本信息与所述当前版本信息,当所述目标版本信息与所述当前版本信息相同时,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新,当所述目标版本信息与所述当前版本信息不相同时,返回赋值错误消息。When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information includes target version information, obtain the current content value corresponding to the assignment target field information and the current content Value corresponding to the current version information, compare the target version information with the current version information, when the target version information is the same as the current version information, replace the current content value with the target content value, and The current version information is progressively updated, and when the target version information is not the same as the current version information, an assignment error message is returned.
  4. 根据权利要求3所述的方法,其特征在于,所述将所述当前超时信息替换为所述目标超时信息,被实施为:The method according to claim 3, wherein the replacing the current timeout information with the target timeout information is implemented as:
    将所述目标超时信息转换为目标超时时间,并使用所述目标超时时间替换所述当前超时信息。The target timeout information is converted into a target timeout time, and the target timeout time is used to replace the current timeout information.
  5. 根据权利要求1-4任一所述的方法,其特征在于,还包括:The method according to any one of claims 1-4, further comprising:
    响应于接收到数据获取请求,获取所述数据获取请求携带的获取信息,并根据所述获取信息获取得到相应的目标数据或消息,返回所述目标数据或消息,其中,所述获取信息包括以下信息中的至少一种:获取目标数据库标识信息、获取目标子键值、获取目标字段信息。In response to receiving the data acquisition request, acquire the acquisition information carried in the data acquisition request, acquire corresponding target data or message according to the acquisition information, and return the target data or message, where the acquisition information includes the following At least one of the information: obtaining target database identification information, obtaining target subkey values, and obtaining target field information.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述获取信息获取得到相应的目标数据或消息,返回所述目标数据或消息,被实施为:The method according to claim 5, wherein the obtaining corresponding target data or message according to the obtained information, and returning the target data or message is implemented as:
    根据所述获取目标数据库标识信息确定获取目标数据库;Determining the acquisition target database according to the identification information of the acquisition target database;
    在所述获取目标数据库中根据所述获取信息获取得到相应的目标数据或消息,并返回所述目标数据或消息。The corresponding target data or message is acquired in the acquisition target database according to the acquisition information, and the target data or message is returned.
  7. 根据权利要求6所述的方法,其特征在于,所述在所述获取目标数据库中根据所述获取信息获取得到相应的目标数据或消息,并返回所述目标数据或消息,被实施为:The method according to claim 6, wherein the obtaining corresponding target data or message according to the obtaining information in the obtaining target database, and returning the target data or message is implemented as:
    在所述获取目标数据库中查找所述获取目标字段;Search the acquisition target field in the acquisition target database;
    当所述获取目标数据库中不存在所述获取目标字段时,返回数据不存在消息;When the acquisition target field does not exist in the acquisition target database, a message that data does not exist is returned;
    当所述获取目标数据库中存在所述获取目标字段时,获取与所述获取目标字段对应的获取目标内容值以及与所述获取目标内容值对应的当前超时信息;When the acquisition target field exists in the acquisition target database, acquiring the acquisition target content value corresponding to the acquisition target field and the current timeout information corresponding to the acquisition target content value;
    若所述当前超时信息为预设超时信息,返回所述获取目标内容值;If the current timeout information is preset timeout information, return the acquisition target content value;
    若所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段已过期,删除所述获取目标数据库中的获取目标字段,并返回数据已过期消息;If the current timeout information is not the preset timeout information, and it is determined that the acquisition target field has expired according to the comparison between the current timeout information and the current time, delete the acquisition target field in the acquisition target database, and return Data has expired message;
    若所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段未过期,返回与所述获取目标字段对应的获取目标内容值。If the current timeout information is not the preset timeout information, and it is determined that the acquisition target field has not expired according to the comparison between the current timeout information and the current time, the acquisition target content value corresponding to the acquisition target field is returned.
  8. 一种数据处理装置,适用于数据处理服务器,其特征在于,包括:A data processing device suitable for a data processing server, characterized in that it comprises:
    接收模块,接收数据赋值请求,其中,所述数据赋值请求携带有赋值信息,所述赋值信息包括以下信息中的至少一种:赋值目标数据库标识信息、赋值目标子键值、赋值目标字段信息、与所述赋值目标字段信息对应的目标内容值以及与所述目标内容值对应的目标附加信息,所述目标附加信息包括目标超时信息;The receiving module receives a data assignment request, wherein the data assignment request carries assignment information, and the assignment information includes at least one of the following information: assignment target database identification information, assignment target subkey value, assignment target field information, A target content value corresponding to the assignment target field information and target additional information corresponding to the target content value, where the target additional information includes target timeout information;
    获取模块,被配置为获取所述赋值信息;An obtaining module configured to obtain the assignment information;
    执行模块,被配置为根据所述赋值信息在所述赋值目标数据库标识信息对应的赋值目标数据库中执行数据赋值操作,其中,所述赋值目标数据库中存储的内容值对应设置有附加信息。The execution module is configured to perform a data assignment operation in the assignment target database corresponding to the assignment target database identification information according to the assignment information, wherein the content value stored in the assignment target database is correspondingly set with additional information.
  9. 根据权利要求8所述的装置,其特征在于,所述目标附加信息还包括目标版本信息。The apparatus according to claim 8, wherein the target additional information further includes target version information.
  10. 根据权利要求9所述的装置,其特征在于,所述执行模块被配置为:The device according to claim 9, wherein the execution module is configured to:
    根据所述赋值目标数据库标识信息确定赋值目标数据库;Determining an assignment target database according to the identification information of the assignment target database;
    在所述赋值目标数据库中查找所述赋值目标子键值和赋值目标字段信息;Searching the assignment target subkey value and the assignment target field information in the assignment target database;
    当所述赋值目标数据库中不存在所述赋值目标子键值和赋值目标字段信息时,根据所述赋值目标子键值和赋值目标字段信息创建目标子键值和目标字段,并将所述目标内容值写入至所述目标字段中,当根据所述目标内容值确定需要为其设置附加信息时,为所述目标内容值设置初始附加信息;When the assignment target subkey value and assignment target field information do not exist in the assignment target database, a target subkey value and a target field are created according to the assignment target subkey value and assignment target field information, and the target The content value is written into the target field, and when it is determined that additional information needs to be set for the target content value, initial additional information is set for the target content value;
    当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标超时信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,将所述当前内容值替换为所述目标内容值;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information does not include target timeout information, obtain the current content value corresponding to the assignment target field information and the current The current timeout information corresponding to the content value, replacing the current content value with the target content value;
    当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标超时信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前超时信息,将所述当前内容值替换为所述目标内容值,将所述当前超时信息替换为所述目标超时信息;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information includes target timeout information, obtain the current content value corresponding to the assignment target field information and the current content Current timeout information corresponding to the value, replacing the current content value with the target content value, and replacing the current timeout information with the target timeout information;
    当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中不包括目标版本信息或者所述目标版本信息为预设版本信息时,获取所述赋值 目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新;When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information does not include target version information or the target version information is preset version information, the assignment target is acquired The current content value corresponding to the field information and the current version information corresponding to the current content value, replacing the current content value with the target content value, and progressively updating the current version information;
    当所述赋值目标数据库中存在所述赋值目标子键值和赋值目标字段信息,且所述赋值信息中包括目标版本信息时,获取所述赋值目标字段信息对应的当前内容值以及所述当前内容值对应的当前版本信息,比较所述目标版本信息与所述当前版本信息,当所述目标版本信息与所述当前版本信息相同时,将所述当前内容值替换为所述目标内容值,并对所述当前版本信息进行递进更新,当所述目标版本信息与所述当前版本信息不相同时,返回赋值错误消息。When the assignment target subkey and assignment target field information exist in the assignment target database, and the assignment information includes target version information, obtain the current content value corresponding to the assignment target field information and the current content Value corresponding to the current version information, compare the target version information with the current version information, when the target version information is the same as the current version information, replace the current content value with the target content value, and The current version information is progressively updated, and when the target version information is not the same as the current version information, an assignment error message is returned.
  11. 根据权利要求10所述的装置,其特征在于,所述将所述当前超时信息替换为所述目标超时信息的部分,被配置为:The apparatus according to claim 10, wherein the part that replaces the current timeout information with the target timeout information is configured as:
    将所述目标超时信息转换为目标超时时间,并使用所述目标超时时间替换所述当前超时信息。The target timeout information is converted into a target timeout time, and the target timeout time is used to replace the current timeout information.
  12. 根据权利要求8-11任一所述的装置,其特征在于,还包括:The device according to any one of claims 8-11, further comprising:
    数据获取模块,被配置为响应于接收到数据获取请求,获取所述数据获取请求携带的获取信息,并根据所述获取信息获取得到相应的目标数据或消息,返回所述目标数据或消息,其中,所述获取信息包括以下信息中的至少一种:获取目标数据库标识信息、获取目标子键值、获取目标字段信息。The data acquisition module is configured to, in response to receiving a data acquisition request, acquire acquisition information carried in the data acquisition request, acquire corresponding target data or message according to the acquisition information, and return the target data or message, where The acquisition information includes at least one of the following information: acquiring target database identification information, acquiring target subkey values, and acquiring target field information.
  13. 根据权利要求12所述的装置,其特征在于,所述根据所述获取信息获取得到相应的目标数据或消息,返回所述目标数据或消息,被实施为:The apparatus according to claim 12, wherein said obtaining corresponding target data or message according to said obtaining information and returning said target data or message is implemented as:
    根据所述获取目标数据库标识信息确定获取目标数据库;Determining the acquisition target database according to the identification information of the acquisition target database;
    在所述获取目标数据库中根据所述获取信息获取得到相应的目标数据或消息,并返回所述目标数据或消息。The corresponding target data or message is acquired in the acquisition target database according to the acquisition information, and the target data or message is returned.
  14. 根据权利要求13所述的装置,其特征在于,所述在所述获取目标数据库中根据所述获取信息获取得到相应的目标数据或消息,并返回所述目标数据或消息的部分,被实施为:The device according to claim 13, wherein said obtaining corresponding target data or message according to said obtaining information in said obtaining target database, and returning the part of said target data or message is implemented as :
    在所述获取目标数据库中查找所述获取目标字段;Search the acquisition target field in the acquisition target database;
    当所述获取目标数据库中不存在所述获取目标字段时,返回数据不存在消息;When the acquisition target field does not exist in the acquisition target database, a message that data does not exist is returned;
    当所述获取目标数据库中存在所述获取目标字段时,获取与所述获取目标字段对应的获取目标内容值以及与所述获取目标内容值对应的当前超时信息;When the acquisition target field exists in the acquisition target database, acquiring the acquisition target content value corresponding to the acquisition target field and the current timeout information corresponding to the acquisition target content value;
    若所述当前超时信息为预设超时信息,返回所述获取目标内容值;If the current timeout information is preset timeout information, return the acquisition target content value;
    若所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段已过期,删除所述获取目标数据库中的获取目标字段,并返回数据已过期消息;If the current timeout information is not the preset timeout information, and it is determined that the acquisition target field has expired according to the comparison between the current timeout information and the current time, delete the acquisition target field in the acquisition target database, and return Data has expired message;
    若所述当前超时信息不为所述预设超时信息,且根据所述当前超时信息与当前时间的比较确定所述获取目标字段未过期,返回与所述获取目标字段对应的获取目标内容值。If the current timeout information is not the preset timeout information, and it is determined that the acquisition target field has not expired according to the comparison between the current timeout information and the current time, the acquisition target content value corresponding to the acquisition target field is returned.
  15. 一种电子设备,其特征在于,包括存储器和处理器;其中,An electronic device, characterized in that it comprises a memory and a processor; wherein,
    所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现权利要求1-7任一项所述的方法步骤。The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps of any one of claims 1-7.
  16. 一种计算机可读存储介质,其上存储有计算机指令,其特征在于,该计算机指令被处理器执行时实现权利要求1-7任一项所述的方法步骤。A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions implement the method steps of any one of claims 1-7 when the computer instructions are executed by a processor.
PCT/CN2021/072002 2020-01-23 2021-01-15 Data processing method and apparatus, electronic device and computer-readable storage medium WO2021147773A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010076772.9A CN111309707B (en) 2020-01-23 2020-01-23 Data processing method and device, electronic equipment and computer readable storage medium
CN202010076772.9 2020-01-23

Publications (1)

Publication Number Publication Date
WO2021147773A1 true WO2021147773A1 (en) 2021-07-29

Family

ID=71148807

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/072002 WO2021147773A1 (en) 2020-01-23 2021-01-15 Data processing method and apparatus, electronic device and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN111309707B (en)
WO (1) WO2021147773A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309707B (en) * 2020-01-23 2022-04-29 阿里巴巴集团控股有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN115827081A (en) * 2021-09-16 2023-03-21 中兴通讯股份有限公司 Data operation method, device, server and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9083770B1 (en) * 2013-11-26 2015-07-14 Snapchat, Inc. Method and system for integrating real time communication features in applications
CN107451190A (en) * 2017-06-26 2017-12-08 北京五八信息技术有限公司 Can persistence non-relational database data processing method and device
CN111309707A (en) * 2020-01-23 2020-06-19 阿里巴巴集团控股有限公司 Data processing method and device, electronic equipment and computer readable storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526958B (en) * 2009-04-09 2012-07-04 中兴通讯股份有限公司 Method and system for synchronizing data between IPTV system modules
CN105824880A (en) * 2016-03-09 2016-08-03 乐视网信息技术(北京)股份有限公司 Webpage grasping method and device
CN105721502B (en) * 2016-04-11 2019-02-01 上海上实龙创智慧能源科技股份有限公司 A kind of authorization access method for browser client and server
US20190213283A1 (en) * 2018-01-08 2019-07-11 Capital One Services, Llc Systems and methods for personalized browsing
CN109461312B (en) * 2018-12-27 2020-10-30 泰华智慧产业集团股份有限公司 Vehicle passing data duplication removing method based on redis
CN109919623B (en) * 2019-02-28 2021-08-13 泰康保险集团股份有限公司 Method, device and equipment for preventing account overdraft and readable storage medium
CN110134670A (en) * 2019-05-16 2019-08-16 拉扎斯网络科技(上海)有限公司 Date storage method, device, electronic equipment and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9083770B1 (en) * 2013-11-26 2015-07-14 Snapchat, Inc. Method and system for integrating real time communication features in applications
CN107451190A (en) * 2017-06-26 2017-12-08 北京五八信息技术有限公司 Can persistence non-relational database data processing method and device
CN111309707A (en) * 2020-01-23 2020-06-19 阿里巴巴集团控股有限公司 Data processing method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN111309707B (en) 2022-04-29
CN111309707A (en) 2020-06-19

Similar Documents

Publication Publication Date Title
CN109684307B (en) Data storage method, device, equipment and storage medium
CN109710190B (en) Data storage method, device, equipment and storage medium
CN111078147B (en) Processing method, device and equipment for cache data and storage medium
US8156137B2 (en) Data processing systems and methods
US9990391B1 (en) Transactional messages in journal-based storage systems
WO2021147773A1 (en) Data processing method and apparatus, electronic device and computer-readable storage medium
US10108658B1 (en) Deferred assignments in journal-based storage systems
US11921584B2 (en) System and method for instant access and management of data in file based backups in a backup storage system using temporary storage devices
CN111414389A (en) Data processing method and device, electronic equipment and storage medium
CN115668141A (en) Distributed processing of transactions in a network using timestamps
US10725799B2 (en) Big data pipeline management within spreadsheet applications
CN112306993A (en) Data reading method, device and equipment based on Redis and readable storage medium
US20240031422A1 (en) Method and system for enforcing governance across multiple content repositories using a content broker
CN109213691B (en) Method and apparatus for cache management
CN111143383A (en) Data updating method and device, electronic equipment and storage medium
US11513876B2 (en) Resolving data location for queries in a multi-system instance landscape
US11449241B2 (en) Customizable lock management for distributed resources
US10558502B2 (en) Software application runtime having dynamic evaluation functions and parameters
US20200364241A1 (en) Method for data synchronization between a source database system and target database system
CN110609731B (en) Method, apparatus and computer program product for managing virtual machines
CN116560629A (en) Serialization method, device, medium and equipment for data transmission object
US10685014B1 (en) Method of sharing read-only data pages among transactions in a database management system
US20190179932A1 (en) Tracking and reusing function results
US20230043307A1 (en) Replicating Changes Written by a Transactional Virtual Storage Access Method
CN108829522A (en) A kind of method, apparatus and computer storage medium of concurrent access process

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21744297

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21744297

Country of ref document: EP

Kind code of ref document: A1