Data processing method and device, electronic equipment and storage medium

CN115480992BActive Publication Date: 2026-10-27BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211204272.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2026-10-27
Estimated Expiration
2042-09-29

AI Technical Summary

Technical Problem

[0004]为了解决上述在设备标识与用户数据在服务器频繁迭代的过程中,由于没有做特殊处理,每次仅仅是把新的设备标识与用户数据存储至服务器,导致服务器存在数据冗余、资源紧张以及设备标识混乱等问题的技术问题,本发明实施例提供了一种数据处理方法、装置、电子设备及存储介质

Benefits of technology

[0044]本发明实施例提供的技术方案,响应于设备标识迭代请求,获取当前设备标识以及当前用户数据,并确定存储当前设备标识以及当前用户数据的存储节点集,在存储节点集中创建第一存储节点,将当前设备标识以及当前用户数据存储至第一存储节点,确定存储节点集中的第二存储节点,从第二存储节点中获取历史用户数据,并与当前用户数据进行合并,将第一存储节点中的当前用户数据变更为合并结果,将第二存储节点中的历史用户数据变更为当前设备标识。通过创建第一存储节点,来存储当前设备标识以及当前用户数据,将第二存储节点中的历史用户数据与当前用户数据进行合并,将第一存储节点中的当前用户数据变更为合并结果,将第二存储节点中的历史用户数据变更为当前设备标识,如此真实的用户数据存储在第一存储节点,解决了服务器存在数据冗余、资源紧张的问题,并且以存储节点集维护设备标识迭代解决了设备标识混乱的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115480992B_ABST
    Figure CN115480992B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data processing method and device, electronic equipment and storage medium, the method comprises: in response to the device identifier iteration request, obtaining the current device identifier and the current user data, and determining the storage node set storing the current device identifier and the current user data; creating a first storage node in the storage node set, storing the current device identifier and the current user data to the first storage node; determining a second storage node in the storage node set, obtaining historical user data from the second storage node, and merging with the current user data; changing the current user data in the first storage node to the merging result, and changing the historical user data in the second storage node to the current device identifier. In this way, the user data is stored in the first storage node, solving the problem of data redundancy and resource shortage of the server, and the device identifier iteration is maintained by the storage node set, solving the problem of device identifier confusion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a data processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of hardware technology, the iteration cycle of hardware devices is getting shorter and shorter. As a result, users will frequently replace hardware devices, which leads to frequent iteration of device identifiers (such as device ID, device number, etc.). Consequently, device identifiers and user data will also be frequently iterated on the server.

[0003] In related technologies, during the frequent iteration of device identifiers and user data on the server, no special processing is done. Each time, only new device identifiers and user data are stored on the server, resulting in problems such as data redundancy, resource shortages, and chaotic device identifiers on the server. Summary of the Invention

[0004] To address the technical problems mentioned above, such as data redundancy, resource constraints, and device identification confusion on the server due to the lack of special processing during frequent iterations of device identifiers and user data on the server, where new device identifiers and user data are simply stored on the server each time, resulting in server-side data storage of new data, this invention provides a data processing method, apparatus, electronic device, and storage medium. The specific technical solution is as follows:

[0005] In a first aspect of the present invention, a data processing method is provided, the method comprising:

[0006] In response to a device identifier iteration request, the current device identifier and current user data are obtained, and the set of storage nodes storing the current device identifier and the current user data is determined;

[0007] A first storage node is created in the storage node set, and the current device identifier and the current user data are stored in the first storage node;

[0008] Determine the second storage node in the storage node set, obtain historical user data from the second storage node, and merge it with the current user data;

[0009] The current user data in the first storage node is changed to the merged result, and the historical user data in the second storage node is changed to the current device identifier.

[0010] In an optional implementation, obtaining the current device identifier and current user data includes:

[0011] Parse the current device identifier carried in the device identifier iteration request;

[0012] Determine the target user corresponding to the current device identifier;

[0013] Obtain the current user data of the target user.

[0014] In an optional implementation, determining the set of storage nodes storing the current device identifier and the current user data includes:

[0015] Determine the target storage node set corresponding to the target user;

[0016] The target storage node set is determined as the storage node set that stores the current device identifier and the current user data.

[0017] In an optional implementation, the step of creating a first storage node in the storage node set and storing the current device identifier and the current user data in the first storage node includes:

[0018] A first storage node is created at the end of the storage node set, and the current device identifier is stored as the key and the current user data is stored as the value in the first storage node.

[0019] In an optional implementation, determining the second storage node in the storage node set includes:

[0020] Find the preceding storage node adjacent to the first storage node from the set of storage nodes, and determine the preceding storage node as the second storage node;

[0021] or,

[0022] Traverse the storage nodes in the storage node set and check whether the storage node stores a preset field, wherein the preset field indicates that the storage node is a data node;

[0023] If the storage node stores the preset field, then the storage node is determined as the second storage node.

[0024] In an optional implementation, merging with the current user data includes:

[0025] Determine the business requirements of the business party for user data, and based on the business requirements, filter target user data from the current user data and the historical user data;

[0026] The step of changing the current user data in the first storage node to the merged result and changing the historical user data in the second storage node to the current device identifier includes:

[0027] Change the current user data corresponding to the value in the first storage node to the target user data;

[0028] Change the historical user data corresponding to the value in the second storage node to the current device identifier, and retain the historical device identifier corresponding to the key in the second storage node.

[0029] In an optional implementation, creating the first storage node in the storage node set includes:

[0030] Obtain historical device identifiers from the storage node set and determine the degree of matching between the historical device identifiers and the current device identifiers;

[0031] Based on the matching degree, the target historical device identifier is determined from the historical device identifiers, and the storage node corresponding to the target historical device identifier is determined.

[0032] Create the first storage node after the first storage node.

[0033] In a second aspect of the present invention, a data processing apparatus is also provided, the apparatus comprising:

[0034] The data acquisition module is used to respond to the device identifier iteration request and acquire the current device identifier and the current user data;

[0035] The node set determination module is used to determine the storage node set that stores the current device identifier and the current user data;

[0036] The data storage module is used to create a first storage node in the storage node set and store the current device identifier and the current user data in the first storage node;

[0037] The data merging module is used to determine the second storage node in the storage node set, obtain historical user data from the second storage node, and merge it with the current user data;

[0038] The data modification module is used to modify the current user data in the first storage node to the merged result, and to modify the historical user data in the second storage node to the current device identifier.

[0039] In a third aspect of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.

[0040] Memory, used to store computer programs;

[0041] A processor, when executing a program stored in memory, implements any of the data processing methods described in the first aspect above.

[0042] In a fourth aspect of the present invention, a storage medium is also provided, the storage medium storing instructions that, when run on a computer, cause the computer to perform any of the data processing methods described in the first aspect above.

[0043] In a fifth aspect of the present invention, a computer program product comprising instructions is also provided, which, when run on a computer, causes the computer to perform any of the data processing methods described above.

[0044] The technical solution provided by this invention, in response to a device identifier iteration request, obtains the current device identifier and current user data, determines a set of storage nodes for storing the current device identifier and current user data, creates a first storage node in the storage node set, stores the current device identifier and current user data in the first storage node, determines a second storage node in the storage node set, obtains historical user data from the second storage node, merges it with the current user data, changes the current user data in the first storage node to the merged result, and changes the historical user data in the second storage node to the current device identifier. By creating a first storage node to store the current device identifier and current user data, merging the historical user data in the second storage node with the current user data, changing the current user data in the first storage node to the merged result, and changing the historical user data in the second storage node to the current device identifier, the actual user data is stored in the first storage node, solving the problems of data redundancy and resource shortages on the server, and using a storage node set to maintain device identifier iteration solves the problem of device identifier confusion. Attached Figure Description

[0045] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0047] Figure 1 This is a schematic diagram illustrating the implementation flow of a data processing method in an embodiment of the present invention;

[0048] Figure 2This is a schematic diagram illustrating a storage node set storing a user's new device number and new user data, as shown in an embodiment of the present invention.

[0049] Figure 3 This is a schematic diagram illustrating a storage node set of a "linked list" structure in an embodiment of the present invention;

[0050] Figure 4 This is a schematic diagram illustrating the implementation flow of another data processing method shown in an embodiment of the present invention;

[0051] Figure 5 This is a schematic diagram illustrating the composition of a storage node set in an embodiment of the present invention;

[0052] Figure 6 This is a schematic diagram illustrating the changes to old and new user data in an embodiment of the present invention.

[0053] Figure 7 This is a schematic diagram of the structure of a data processing device shown in an embodiment of the present invention;

[0054] Figure 8 This is a schematic diagram of the structure of another electronic device shown in an embodiment of the present invention. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0056] In this embodiment of the invention, Couchbase is used to store user data and device identifiers. Taking a Couchbase storage node as an example, the technical solution provided by this embodiment of the invention will be described.

[0057] After the device identifier is iterated, a Couchbase first storage node is created to store the current device identifier and the current user data. The historical user data in the Couchbase second storage node is merged with the current user data. The current user data in the Couchbase first storage node is changed to the merged result, and the historical user data in the Couchbase second storage node is changed to the current device identifier. In this way, the real user data is stored in the Couchbase first storage node, which solves the problems of data redundancy and resource shortage on the server. Furthermore, the device identifier iteration is maintained by the storage node set, which solves the problem of device identifier confusion.

[0058] Specifically, such as Figure 1 The diagram illustrates the implementation flow of a data processing method according to an embodiment of the present invention. This method is applied to a server and may specifically include the following steps:

[0059] S101, in response to the device identifier iteration request, obtain the current device identifier and the current user data, and determine the storage node set for storing the current device identifier and the current user data.

[0060] In this embodiment of the invention, when a device identifier iteration occurs, a device identifier iteration request is triggered, thereby enabling the acquisition of the current device identifier and the current user data in response to the device identifier iteration request. The current device identifier can be immediately interpreted as the user's new device identifier, and the current user data can be understood as the user's new data; this embodiment of the invention does not impose such limitations.

[0061] In addition, it is necessary to determine the set of storage nodes that store the current device identifier and the current user data. This set of storage nodes consists of multiple storage nodes forming a linked list-like structure. At this point, the storage nodes centrally store historical device identifiers and historical user data—that is, the user's old device identifier and old user data. Subsequently, the old user data will be changed to the user's new device identifier to address data redundancy and resource constraints.

[0062] It should be noted that user data may include, for example, the user's account registration time, or other types of user data. This embodiment of the invention does not limit the types of user data.

[0063] In this embodiment of the invention, the device identifier iteration request typically carries information such as the device identifier. Therefore, the current device identifier carried in the device identifier iteration request can be parsed to obtain the current device identifier. Then, the target user corresponding to the current device identifier can be determined, thereby obtaining the target user's current user data.

[0064] In this embodiment of the invention, different users have different sets of storage nodes, meaning that the device identifier and user data of different users must be stored separately, as shown in Table 1 below. Therefore, the target storage node set corresponding to the target user can be determined, and this target storage node set is defined as the storage node set that stores the current device identifier and the current user data.

[0065] User A Storage node set 1 User B Storage node set 2 …… ……

[0066] Table 1

[0067] For example, let's use two device numbers, 0001 and 0002, to represent the iterative process of a user's device number. 0001 represents the old device number, and 0002 represents the new device number. When a user changes their hardware, causing the device number to iterate from 0001 to 0002, a device number iteration request is triggered. In response to this request, the system parses the new device number 0002 carried in the request, identifies the target user corresponding to the new device number 0002 (user A), and retrieves user A's current user data (new user data). Then, it determines the set of storage nodes for storing the new device number 0002 and the new user data, i.e., the target set of storage nodes for user A (storage node set 1), and designates this storage node set 1 as the storage node set for storing the new device number 0002 and the new user data.

[0068] S102, create the first storage node in the storage node set, and store the current device identifier and the current user data in the first storage node.

[0069] In this embodiment of the invention, after determining the storage node set for storing the current device identifier and the current user data, it is necessary to store the current device identifier and the current user data in the storage node set. Specifically, a first storage node is created in the storage node set, and the current device identifier and the current user data are stored in the first storage node.

[0070] Specifically, a first storage node can be created at the end of the storage node set (here, the end refers to the storage node after the most recently created storage node in the storage node set). The current device identifier is used as the key, and the current user data is used as the value to store the first storage node. This completes the storage of the current device identifier and the current user data.

[0071] For example, storage node set 1 currently includes storage node 0001. Storage node 0001 stores the user's old device ID 0001 and the user's old data, where the old device ID 0001 is the key and the old data is the value. A first storage node is created at the end of storage node set 1, that is, storage node 0002 is created after storage node 0001. The user's new device ID 0002 is used as the key, and the new data is used as the value, stored in storage node 0002. Figure 2 As shown.

[0072] S103, determine the second storage node in the storage node set, obtain historical user data from the second storage node, and merge it with the current user data.

[0073] In this embodiment of the invention, for a set of storage nodes, a second storage node is determined. The second storage node stores historical user data (i.e., old user data) in the form of value. Thus, historical user data can be obtained from the second storage node and merged with the current user data, that is, the old user data is merged with the new user data.

[0074] Specifically, the preceding storage node adjacent to the first storage node can be found from the storage node set. That is, the first storage node is taken as the starting position, and the first storage node found forward is the preceding storage node adjacent to the first storage node. The preceding storage node is determined as the second storage node, so that historical user data can be obtained from the second storage node and merged with the current user data.

[0075] Alternatively, iterate through the storage nodes in the storage node set and check whether the storage node stores a preset field. The preset field indicates that the storage node is a data node (here, the data node stores historical user data (i.e., old user data) in the form of value). If the storage node stores the preset field, then the storage node is determined as the second storage node. Thus, historical user data can be obtained from the second storage node and merged with the current user data.

[0076] For example, such as Figure 2 As shown, for the first storage node, i.e. storage node 0002, the previous storage node adjacent to storage node 0002, i.e. storage node 0001, is found from storage node set 1. Storage node 0001 is determined as the second storage node. At this time, historical user data, i.e. old user data, can be obtained from storage node 0001 and merged with the current user data, i.e., merging old user data with new user data.

[0077] For example, traversing storage node 0001 in storage node set 1, we check whether storage node 0001 stores a preset field. The preset field indicates that the storage node is a data node, where historical user data is stored. If storage node 0001 stores the preset field, it means that storage node 0001 stores old user data, and storage node 0001 is the last storage node in storage node set 1. At this time, we can retrieve historical user data, i.e., old user data, from storage node 0001 and merge it with the current user data, that is, merge the old user data with the new user data.

[0078] It should be noted that the merging of current user data with historical user data, i.e., the merging of old user data with new user data, follows certain business requirements from the business side. For example, if the user data consists of the registration time of a user account, and the business side needs to retain the registration time of the most recent user account, then the most recent user account registration time will be retained after the data merging.

[0079] Suppose user A registers an account using device 0001 on December 10th. Then, user A changes devices and registers an account using device 0002 on December 12th. In this case, we need to retain the latest user account registration time, that is, keep the account registration time of December 12th and discard the account registration time of December 10th.

[0080] Based on this, in this embodiment of the invention, the business requirements of the business party for user data are determined, and target user data is filtered from current user data and historical user data according to the business requirements. Here, target user data is either current user data or historical user data, which means that target user data is either current user data or historical user data. This embodiment of the invention does not limit this.

[0081] S104, change the current user data in the first storage node to the merged result, and change the historical user data in the second storage node to the current device identifier.

[0082] In this embodiment of the invention, the current user data in the first storage node is changed to the merged result, and the historical user data in the second storage node is changed to the current device identifier. Thus, the accurate user data is stored in the first storage node, solving the problems of data redundancy and resource constraints on the server. Furthermore, maintaining the device identifier iteratively using a storage node set solves the problem of device identifier confusion.

[0083] Specifically, the second storage node also includes a historical device identifier, thereby changing the current user data corresponding to the value in the first storage node to the target user data, changing the historical user data corresponding to the value in the second storage node to the current device identifier, and retaining the historical device identifier corresponding to the key in the second storage node.

[0084] For example, the first storage node is storage node 0002, and the second storage node is storage node 0001. The current user data corresponding to the value in storage node 0002 is changed to the target user data (i.e., the merged result of combining the new user data and the old user data). The historical user data corresponding to the value in storage node 0001 is changed to the current device identifier 0002, while the historical device identifier 0001 corresponding to the key in storage node 0001 is retained. After the above processing, storage nodes 0001 and 0002 form a structure similar to a "linked list," as shown below. Figure 3 As shown.

[0085] Based on the above description of the technical solution provided by the embodiments of the present invention, in response to the device identifier iteration request, the current device identifier and the current user data are obtained, and a set of storage nodes for storing the current device identifier and the current user data is determined. A first storage node is created in the set of storage nodes, and the current device identifier and the current user data are stored in the first storage node. A second storage node is determined in the set of storage nodes, historical user data is obtained from the second storage node and merged with the current user data. The current user data in the first storage node is changed to the merged result, and the historical user data in the second storage node is changed to the current device identifier.

[0086] By creating a first storage node to store the current device identifier and current user data, merging the historical user data in the second storage node with the current user data, changing the current user data in the first storage node to the merged result, and changing the historical user data in the second storage node to the current device identifier, the real user data is stored in the first storage node, which solves the problems of data redundancy and resource shortage on the server, and iteratively maintaining the device identifier with the storage node set solves the problem of device identifier confusion.

[0087] In addition, such as Figure 4 The diagram shown illustrates the implementation flow of another data processing method provided in this embodiment of the invention. This method is applied to a server and may specifically include the following steps:

[0088] S401, in response to the device identifier iteration request, obtain the current device identifier and the current user data, and determine the storage node set for storing the current device identifier and the current user data.

[0089] In this embodiment of the invention, this step is similar to step S101 above, and will not be described in detail here.

[0090] S402, retrieve historical device identifiers from the storage node set, and determine the degree of matching between historical device identifiers and current device identifiers.

[0091] In this embodiment of the invention, the storage node set consists of multiple storage nodes, and each storage node stores a historical device identifier, i.e., the user's old device identifier, in the form of a key. Thus, the historical device identifier can be obtained from each storage node in the storage node set, and the number of historical device identifiers can be multiple.

[0092] For historical device identifiers, the degree of matching between the historical device identifier and the current device identifier can be determined. It should be noted that the degree of matching can be regarded as the matching degree between two device identifiers. The method of calculating the matching degree can be, for example, subtraction or text similarity calculation. This embodiment of the invention does not limit the method.

[0093] For example, such as Figure 5 As shown, storage node set 1 consists of storage node 0001, storage node 0002, and storage node 0003. Each storage node stores the historical device identifier, i.e., the user's old device identifier, in the form of a key. Thus, the historical device identifier, i.e., 0001, 0002, and 0003, is obtained from each storage node in storage node set 1.

[0094] For the historical device identifiers obtained above, the difference between the historical device identifier and the current device identifier can be used as the degree of matching between the historical device identifier and the current device identifier. Here, the current device identifier is assumed to be 0004. The difference between 0001, 0002, 0003 and 0004 (the smaller the difference, the higher the degree of matching) is shown in Table 2 below.

[0095] 0001 0004 3 3 0002 0004 2 2 0003 0004 1 1

[0096] Table 2

[0097] S403, determine the target historical device identifier from the historical device identifiers based on the matching degree, and determine the centralized storage node corresponding to the target historical device identifier.

[0098] In this embodiment of the invention, based on the degree of matching between historical device identifiers and current device identifiers, a target historical device identifier can be determined from the historical device identifiers, and the storage node corresponding to the target historical device identifier can be determined as a centralized storage node.

[0099] Among these methods, the historical device identifiers can be sorted according to the degree of matching, for example, sorted from smallest to largest, so that the historical device identifier with the highest degree of matching can be selected as the target historical device identifier, and the storage node corresponding to the target historical device identifier can be determined as the centralized storage node.

[0100] For example, regarding the matching degree between historical device identifiers and current device identifiers, as shown in Table 2 above, historical device identifiers are sorted from smallest to largest according to the matching degree. Here, the matching degree between historical device identifier 0003 and current device identifier 0004 is the highest. Therefore, historical device identifier 0003 is determined as the target historical device identifier, and storage node 0003 in storage node set 1 corresponding to historical device identifier 0003 is determined.

[0101] S404: Create a first storage node after the storage node, and store the current device identifier and the current user data in the first storage node.

[0102] In this embodiment of the invention, after determining the storage node corresponding to the target historical device identifier and the centralized storage node, a first storage node is created after the storage node, and the current device identifier and the current user data are stored in the first storage node.

[0103] For example, after determining storage node 0003 in storage node set 1 corresponding to the historical device identifier 0003, a first storage node, namely storage node 0004, is created after storage node 0003. The current device identifier 0004 and the current user data (i.e., the new user data) are stored in storage node 0004. Subsequently, the old user data and the new user data in storage node 0003 are merged to obtain the target user data. The new user data in storage node 0004 is changed to the merged target user data, and the old user data in storage node 0003 is changed to the current device identifier 0004. The historical device identifier 0003 in storage node 0003 remains unchanged. Figure 6 As shown.

[0104] S405, determine the second storage node in the storage node set, obtain historical user data from the second storage node, and merge it with the current user data.

[0105] In this embodiment of the invention, this step is similar to step S103 above, and will not be described in detail here.

[0106] S406, change the current user data in the first storage node to the merged result, and change the historical user data in the second storage node to the current device identifier.

[0107] In this embodiment of the invention, this step is similar to step S104 above, and will not be described in detail here.

[0108] By creating a first storage node to store the current device identifier and current user data, merging the historical user data in the second storage node with the current user data, changing the current user data in the first storage node to the merged result, and changing the historical user data in the second storage node to the current device identifier, the real user data is stored in the first storage node, which solves the problems of data redundancy and resource shortage on the server, and iteratively maintaining the device identifier with the storage node set solves the problem of device identifier confusion.

[0109] Corresponding to the above method embodiments, this invention also provides a data processing apparatus, such as... Figure 7 As shown, the device may include: a data acquisition module 710, a node set determination module 720, a data storage module 730, a data merging module 740, and a data modification module 750.

[0110] The data acquisition module 710 is used to acquire the current device identifier and the current user data in response to the device identifier iteration request;

[0111] The node set determination module 720 is used to determine the storage node set that stores the current device identifier and the current user data.

[0112] Data storage module 730 is used to create a first storage node in the storage node set and store the current device identifier and the current user data in the first storage node;

[0113] The data merging module 740 is used to determine the second storage node in the storage node set, obtain historical user data from the second storage node, and merge it with the current user data;

[0114] The data modification module 750 is used to modify the current user data in the first storage node to the merged result, and to modify the historical user data in the second storage node to the current device identifier.

[0115] This invention also provides an electronic device, such as... Figure 8 As shown, it includes a processor 81, a communication interface 82, a memory 83, and a communication bus 84, wherein the processor 81, the communication interface 82, and the memory 83 communicate with each other through the communication bus 84.

[0116] Memory 83 is used to store computer programs;

[0117] When processor 81 executes the program stored in memory 83, it performs the following steps:

[0118] In response to a device identifier iteration request, the system obtains the current device identifier and current user data, and determines a set of storage nodes for storing the current device identifier and current user data; it creates a first storage node in the storage node set and stores the current device identifier and current user data in the first storage node; it determines a second storage node in the storage node set, obtains historical user data from the second storage node, and merges it with the current user data; it changes the current user data in the first storage node to the merged result, and changes the historical user data in the second storage node to the current device identifier.

[0119] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.

[0120] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0121] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0122] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0123] In another embodiment of the present invention, a storage medium is also provided, which stores instructions that, when run on a computer, cause the computer to execute any of the data processing methods described in the above embodiments.

[0124] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the data processing methods described in the above embodiments.

[0125] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a storage medium or transmitted from one storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0126] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0127] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0128] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A data processing method, characterized in that, The method includes: In response to a device identifier iteration request, the current device identifier and current user data are obtained, and the storage node set storing the current device identifier and the current user data is determined, wherein the current user data includes the user's account registration time; Creating a first storage node in the storage node set and storing the current device identifier and the current user data in the first storage node includes: creating a first storage node at the end of the storage node set and storing the current device identifier as the key and the current user data as the value in the first storage node; Determine the second storage node in the storage node set, obtain historical user data from the second storage node, and merge it with the current user data; The merging with the current user data includes: determining the business requirements of the business party for user data; and, based on the business requirements, filtering target user data from the current user data and the historical user data, wherein the target user data is either the current user data or the historical user data. Changing the current user data in the first storage node to the merged result and changing the historical user data in the second storage node to the current device identifier includes: changing the current user data corresponding to the value in the first storage node to the target user data; changing the historical user data corresponding to the value in the second storage node to the current device identifier, while retaining the historical device identifier corresponding to the key in the second storage node.

2. The method according to claim 1, characterized in that, The process of obtaining the current device identifier and current user data includes: Parse the current device identifier carried in the device identifier iteration request; Determine the target user corresponding to the current device identifier; Obtain the current user data of the target user.

3. The method according to claim 2, characterized in that, The step of determining the set of storage nodes storing the current device identifier and the current user data includes: Determine the target storage node set corresponding to the target user; The target storage node set is determined as the storage node set that stores the current device identifier and the current user data.

4. The method according to claim 1, characterized in that, Determining the second storage node in the storage node set includes: Find the preceding storage node adjacent to the first storage node from the set of storage nodes, and determine the preceding storage node as the second storage node; or, Traverse the storage nodes in the storage node set and check whether the storage node stores a preset field, wherein the preset field indicates that the storage node is a data node; If the storage node stores the preset field, then the storage node is determined as the second storage node.

5. The method according to claim 1, characterized in that, Creating the first storage node in the storage node set includes: Obtain historical device identifiers from the storage node set and determine the degree of matching between the historical device identifiers and the current device identifiers; Based on the matching degree, the target historical device identifier is determined from the historical device identifiers, and the storage node corresponding to the target historical device identifier is determined. Create the first storage node after the first storage node.

6. A data processing apparatus, characterized in that, The device includes: The data acquisition module is used to respond to the device identifier iteration request and acquire the current device identifier and the current user data; A node set determination module is used to determine the storage node set that stores the current device identifier and the current user data, wherein the current user data includes the user's account registration time. A data storage module is configured to create a first storage node in the storage node set and store the current device identifier and the current user data in the first storage node, including: creating a first storage node at the end of the storage node set and storing the current device identifier as a key and the current user data as a value in the first storage node; The data merging module is used to determine the second storage node in the storage node set, obtain historical user data from the second storage node, and merge it with the current user data; The merging with the current user data includes: determining the business requirements of the business party for user data; and, based on the business requirements, filtering target user data from the current user data and the historical user data, wherein the target user data is either the current user data or the historical user data. The data modification module is used to modify the current user data in the first storage node to the merged result and modify the historical user data in the second storage node to the current device identifier, including: modifying the current user data corresponding to the value in the first storage node to the target user data; modifying the historical user data corresponding to the value in the second storage node to the current device identifier, and retaining the historical device identifier corresponding to the key in the second storage node.

7. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-5.

8. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Equipment replacement method, device, gateway, system and medium

    CN114285688A

  • CDN configuration method and device, electronic equipment and storage medium

    CN114389942A