CN106156050B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN106156050B
CN106156050B CN201510141386.2A CN201510141386A CN106156050B CN 106156050 B CN106156050 B CN 106156050B CN 201510141386 A CN201510141386 A CN 201510141386A CN 106156050 B CN106156050 B CN 106156050B
Authority
CN
China
Prior art keywords
unique key
configuration information
data processing
service
processing method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510141386.2A
Other languages
Chinese (zh)
Other versions
CN106156050A (en
Inventor
童寅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510141386.2A priority Critical patent/CN106156050B/en
Publication of CN106156050A publication Critical patent/CN106156050A/en
Application granted granted Critical
Publication of CN106156050B publication Critical patent/CN106156050B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the application discloses a data processing method and a data processing device, wherein the method comprises the following steps: receiving a service request comprising service data, and determining first unique key configuration information corresponding to the service request according to a preset corresponding relation between the type of the service data and the unique key configuration information; determining unique key constraint configuration information corresponding to the service request according to the first unique key configuration information and the service data; and determining a unique key check result based on the unique key constraint configuration information, and if the unique key check result indicates that a conflict exists, sending a message that the conflict exists. The data processing method and device provided by the embodiment of the application can improve the convenience of data processing operation.

Description

Data processing method and device
Technical Field
The present application relates to the field of computer information technologies, and in particular, to a data processing method and apparatus.
Background
A database is a system that organizes and stores data according to some data model, in which large amounts of data are stored and thus can be considered a repository of data. With the development of internet technology, the amount of data is increasing continuously, and a single database cannot meet the requirements of storage, query and update of mass data, so that a data distribution strategy is widely applied, that is, mass data is stored in a plurality of databases according to a certain rule distribution. In order to ensure the uniqueness of the data in the database, when data processing such as writing or updating service data and the like is performed, uniqueness check needs to be performed on the existing service data in the database, and if there is no uniqueness conflict, the service data can be written or updated.
Existing data processing methods generally include: the data uniqueness check is carried out by adopting a central service mode, and the method specifically comprises the following steps: determining unique key constraint configuration information corresponding to the business data according to the business data in the business request, and calling a unique consultation service through a remote procedure call protocol to check whether the unique key constraint configuration information has a unique conflict. And after receiving the unique key constraint configuration information, the unique consultation service stores the unique key constraint configuration information in a service cache, and searches whether the unique key constraint configuration information is stored in a memory. The memory may include a cache and a database. If the unique key constraint configuration information exists in the memory, the service data in the service request has a unique conflict. If the unique key constraint configuration information does not exist in the memory, it indicates that there is no unique conflict for the service data in the service request, and the service operation related to the service data, such as writing or updating of the service data, can be continued. When the data writing or updating operation fails, the unique consultation service is called again by using the remote procedure call protocol to delete the stored unique key constraint configuration information.
In the process of implementing the present application, the inventor finds that at least the following problems exist in the prior art: in order to ensure data uniqueness, the existing data processing method needs to call uniqueness consultation service by using a remote procedure call protocol to detect the data uniqueness, and the called procedure has strong dependence on a network, the storage of the uniqueness consultation service, the availability of the uniqueness consultation service and the like. And when the uniqueness consultation service is called to carry out uniqueness check each time, the uniqueness key constraint configuration information corresponding to the business data needs to be manually configured in advance, and then the uniqueness key constraint configuration information is sent to the uniqueness consultation service to check whether uniqueness conflict exists. Therefore, the existing data processing method is inconvenient to operate.
Disclosure of Invention
An object of the embodiments of the present application is to provide a data processing method and apparatus, so as to improve convenience of data processing operations.
To solve the foregoing technical problem, embodiments of the present application provide a data processing method and apparatus, which are implemented as follows:
a method of data processing, comprising: receiving a service request comprising service data, and determining first unique key configuration information corresponding to the service request according to a preset corresponding relation between the type of the service data and the unique key configuration information; determining unique key constraint configuration information corresponding to the service request according to the first unique key configuration information and the service data; and determining a unique key check result based on the unique key constraint configuration information, and if the unique key check result indicates that a conflict exists, sending a message that the conflict exists.
In a preferred embodiment, after determining the unique key constraint configuration information, the method further includes: and setting the state of the unique key constraint configuration information as a first state.
In a preferred embodiment, the data processing method further includes: setting the time stamp length; the time stamp length is used for representing the effective time length of the unique key constraint configuration information.
In a preferred embodiment, the data processing method further includes: when the state of the unique key constraint configuration information is a first state and the set time stamp length is reached, changing the state of the unique key constraint configuration information to a second state.
In a preferred embodiment, the data processing method further includes: and if the unique key check result shows that no conflict exists, executing a first operation on the service request, and if the first operation fails, deleting the unique key constraint configuration information.
In a preferred embodiment, the data processing method further includes: if the first operation is successful and the state of the unique key constraint information is the first state, changing the state of the unique key constraint information into a third state; the third state represents a state in which the unique key configuration information is confirmed to be valid.
A data processing apparatus comprising: the system comprises a first unique key configuration information determining module, a unique key constraint configuration information determining module and a unique key checking module; the first unique key configuration information determining module is used for receiving a service request comprising service data, and determining first unique key configuration information corresponding to the service request according to a preset corresponding relation between the type of the service data and the unique key configuration information; the unique key constraint configuration information determining module is used for determining unique key constraint configuration information corresponding to the service request according to the first unique key configuration information and the service data; the unique key checking module is used for determining a unique key checking result based on the unique key constraint configuration information, and if the unique key checking result indicates that a conflict exists, sending a message that the conflict exists.
In a preferred embodiment, the data processing apparatus further includes: a first operation module; the first operation module is configured to, when a unique key check result of the unique key check module is not a conflict, perform a first operation on the service request, and if the first operation fails, delete the unique key constraint configuration information; the first operation includes: and the operation corresponds to the service processing type in the service request.
In a preferred embodiment, the data processing apparatus further includes: a timestamp setting module; the state setting module is used for setting the length of the timestamp; the time stamp length is used for representing the effective time length of the unique key constraint configuration information.
In a preferred embodiment, the data processing apparatus further includes: a state setting module; the state setting module is used for setting or changing the state of the unique key constraint configuration information.
According to the technical scheme provided by the embodiment of the application, the data processing method and the data processing device provided by the embodiment of the application can determine the first unique key configuration information corresponding to the service request according to the corresponding relation between the type of the preset service data and the unique key configuration information, manual configuration is not needed, and the convenience in operation of the data processing method is improved. Furthermore, the data processing method and the device disclosed by the embodiment of the application do not need to be realized by using a remote procedure call protocol calling mode, and when the business operation fails, the unique key constraint configuration information can be directly deleted, so that the convenience of the operation of the data processing method is further improved. Further, the state or the timestamp length of the unique key constraint configuration information is set in the embodiment of the application, and whether the unique key constraint configuration information is valid or not can be determined, so that the accuracy of data uniqueness check can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a flow chart of one embodiment of a data processing method of the present application;
FIG. 2 is a block diagram of one embodiment of a data processing apparatus of the present application;
FIG. 3 is a block diagram of the unique key check module of the present application.
Detailed Description
The embodiment of the application provides a data processing method and device.
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
FIG. 1 is a flow chart of an embodiment of a data processing method of the present application. As shown in fig. 1, the data processing method may include:
s100: receiving a service request comprising service data, and determining first unique key configuration information corresponding to the service request according to a preset corresponding relation between the type of the service data and the unique key configuration information.
The data processing apparatus may receive a service request. The service request may include service data, a type of the service data, and a service processing type.
The service processing type may include: new, updated or deleted. When the service processing type is newly added, the service data can be newly added to the memory. When the service processing type is updating, the corresponding data in the memory can be updated to the service data in the service request. When the service processing type is deletion, the corresponding data in the memory can be deleted. The memory may include one or more databases and may also include a cache.
The unique key configuration information may be used to determine the data that needs to be queried. According to the corresponding relation between the type of the preset service data and the unique key configuration information, the first unique key configuration information corresponding to the service request can be determined.
The unique key configuration information may include: one or more configuration attributes. The configuration attribute may correspond to part or all of the content in the service data. For example, the content in the service data includes: user name, phone, mailbox, and address. The unique key configuration information may include both user name and phone configuration attributes.
The correspondence between the type of the service data and the unique key configuration information may be a one-to-one correspondence or a one-to-many correspondence. The determined first unique key configuration information corresponding to the service request may include one or more unique key configuration information.
For example, the received service request is: and adding new service data with a user type, wherein the service data is { id:1, name: test, email: test @ alipay.com, mobile:136xxxxxxxx, age:20 }. Then, in the service request, the service data is { id:1, name: test, email: test @ alipay.com, mobile:136 xxxxxxxxxx, age:20 }; the types of the service data are as follows: a user; the service processing types are as follows: and adding an age.
If it is assumed that the unique key configuration information corresponding to the data type user includes: email | mobile, which indicates that the first unique key configuration information includes two attributes of email and mobile.
Then, it may be determined that the first unique key configuration information corresponding to the service data in the received service request may include: email | mobile.
If it is assumed that the unique key configuration information corresponding to the data type user includes unique key configuration information 1 and unique key configuration information 2, specifically, unique key configuration information 1: name | email; unique key configuration information 2: name | mobile. The unique key configuration information 1 may represent unique key configuration information including two attributes of a name and an email, and the unique key configuration information 2 may represent unique key configuration information including two attributes of a name and a mobile.
Then, it may be determined that the first unique key configuration information corresponding to the service data in the received service request may include: unique key configuration information 1 and unique key configuration information 2.
S200: and determining unique key constraint configuration information corresponding to the service request according to the first unique key configuration information and the service data.
According to the first unique key configuration information and the service data, unique key constraint configuration information corresponding to the service request can be determined. The unique key constraint configuration information may correspond to the service data one to one.
For example, in the example mentioned in S100, the service data in the service request is { id:1, name: test, email: test @ alipay.com, mobile:136xxxxxxxx, age:20 }.
If it is assumed that the first unique key configuration information includes: email | mobile. Then, determining the unique key constraint configuration information corresponding to the service request may include: test @ alipay.com |136 xxxxxxxx.
If it is assumed that the first unique key configuration information includes: unique key configuration information 1: name | email; and unique key configuration information 2: name | mobile. Then, determining the unique key constraint configuration information corresponding to the service request may include: test | test @ alipay.com and test |136 xxxxxxxxxx.
The unique key constraint configuration information may be stored in a memory, in particular the unique key constraint configuration information may be stored in a unique key memory, which may be part of the memory.
In another embodiment, after determining the unique key constraint configuration information, the state of the unique key constraint configuration information may also be set. The state of the unique key constraint configuration information may be set to a first state. The first state may represent a state in which the unique key constraint configuration information is not confirmed to be valid.
In another embodiment, the timestamp length may also be set. The time stamp length may be used to represent a valid time length of the unique key constraint configuration information. The time stamp length may be preset. The time stamp length may be set according to practical experience, and may be generally less than 5 minutes, for example, may be set to 30 seconds. After the time stamp length is exceeded, the unique key constraint configuration information may be considered invalid.
In another embodiment, if the state of the unique key constraint configuration information is a first state and the set timestamp length is reached, the state of the unique key constraint configuration information may be changed to a second state. The second state may be used to state that the unique key constraint configuration information is invalid.
S300: and determining a unique key check result based on the unique key constraint configuration information, and if the unique key check result indicates that a conflict exists, sending a message that the conflict exists.
The determining of the unique key check result based on the unique key constraint configuration information may specifically include:
1) and when the service processing type is newly increased, searching whether the unique key storage stores the unique key constraint configuration information or not, and if so, checking the unique key to determine that a conflict exists.
Alternatively, the first and second electrodes may be,
2) and when the service processing type is updating, determining whether the updated content in the service request has the same content with the attribute of the unique key constraint configuration information, if so, searching whether the updated unique key constraint configuration information is stored in a unique key memory, and if so, checking that a conflict exists in the unique key check result.
The unique key store may be used to store the unique key constraint configuration information.
It should be noted that, when the unique key constraint configuration information corresponds to a plurality of unique key configuration information, it may be respectively found whether the content corresponding to each unique key configuration information is stored in the unique key memory. If the unique key memory stores the content corresponding to one of the unique key configuration information, the unique key check result may be that a conflict exists.
For example, in the examples of S100 and S200, the service data in the service request is { id:1, name: test, email: test @ alipay.com, mobile:136xxxxxxxx, age:20 }.
If it is assumed that the first unique key configuration information includes: unique key configuration information 1: name | email; and unique key configuration information 2: name | mobile. Then, determining the unique key constraint configuration information corresponding to the service request may include: test | test @ alipay.com and test |136 xxxxxxxxxx. If the unique key memory stores test | test @ alipay.com or test |136xxxxxxxx, the unique key check result may be that there is a conflict.
In another embodiment, the data processing method may further include: and when the service processing type is newly increased, searching whether the unique key storage stores the unique key constraint configuration information or not, and if not, judging that no conflict exists in the unique key check result.
In another embodiment, the data processing method may further include: and when the service processing type is updating, determining whether the updated content in the service request has the same content with the configuration attribute of the unique key constraint configuration information, and if not, determining that no conflict exists in the unique key detection result.
In another embodiment, the data processing method may further include: and when the service processing type is updating, determining whether the updated content in the service request has the same content with the configuration attribute of the unique key constraint configuration information, if so, searching whether the updated unique key constraint configuration information is stored in a unique key memory, and if not, checking that no conflict exists in the unique key check result.
When the unique key check result is that there is a conflict, a message that there is a conflict of unique keys may be transmitted. The message that there is a unique key collision may be sent to the sender of the service request.
In another embodiment, the data processing method may further include: and if the unique key check result is that no conflict exists, executing a first operation on the service request, and if the first operation fails, deleting the unique key constraint configuration information.
The first operation may include: and the operation corresponds to the service processing type in the service request. For example, if the service processing type in the service request is new, the service data in the service request may be newly added in the memory.
In another embodiment, the data processing method may further include: and if the first operation is successful and the state of the unique key constraint information is the first state, changing the state of the unique key constraint information into a third state. The third state represents a state in which the unique key configuration information is confirmed to be valid.
According to the data processing method disclosed by the embodiment, the first unique key configuration information corresponding to the service request can be determined according to the corresponding relation between the type of the preset service data and the unique key configuration information, manual configuration is not needed, and the convenience of operation of the data processing method is improved. Furthermore, the data processing method disclosed by the embodiment of the application is realized without using a remote procedure call protocol calling mode, and when the business operation fails, the unique key constraint configuration information can be directly deleted, so that the convenience of the operation of the data processing method is further improved. Furthermore, the state or the time stamp length of the unique key constraint configuration information is set, whether the unique key constraint configuration information is effective or not can be determined, and the accuracy of data uniqueness check can be improved.
FIG. 2 is a block diagram of one embodiment of a data processing apparatus according to the present application. As shown in fig. 2, the data processing apparatus may include: a first unique key configuration information determination module 100, a unique key constraint configuration information determination module 200, and a unique key check module 300. Wherein the content of the first and second substances,
the first unique key configuration information determining module 100 may be configured to receive a service request including service data, and determine first unique key configuration information corresponding to the service request according to a preset correspondence between a type of the service data and unique key configuration information.
The unique key constraint configuration information determining module 200 may be configured to determine unique key constraint configuration information corresponding to the service request according to the first unique key configuration information and the service data.
The unique key check module 300 may be configured to determine a unique key check result based on the unique key constraint configuration information, and send a message that there is a unique key collision if the unique key check result indicates that there is a collision.
FIG. 3 is a block diagram of the unique key check module of the present application. As shown in fig. 3, the unique key check module 300 may include: a new type check result determining module 301, an update type check result determining module 302 and a message sending module 303.
The newly added type check result determining module 301 may be configured to, when the service processing type is newly added, search whether the unique key storage stores the unique key constraint configuration information, and if so, determine that the unique key check result is that a conflict exists. Further, if not, the unique key check result may be that no conflict exists.
The update type checking result determining module 302 may be configured to determine, when the service processing type is update, whether the update content in the service request has the same content as the configuration attribute of the unique key constraint configuration information, if so, search for whether the updated unique key constraint configuration information is stored in the unique key memory, and if so, determine that the unique key checking result is a conflict. Further, whether the unique key constraint configuration information is stored in a unique key memory is searched, and if not, the unique key check result can be that no conflict exists. Further, the determination of whether the updated content in the service request has the same content as the configuration attribute of the unique key constraint configuration information is performed, if so, the determination of whether the updated content in the service request has the same content as the attribute of the unique key constraint configuration information is performed, and if not, the unique key check result is that no conflict exists.
The message sending module 303 may be configured to send a message that a unique key conflict exists when a result of the new addition type check result determining module 301 or the update type check result determining module 302 is that a conflict exists. The message sending module 303 may send the message that there is a unique key collision to the service request sender.
In another embodiment, the data processing apparatus may further include: a first operational block 400. The first operation module 400 may be configured to, when the unique key check result of the unique key check module 300 is not a conflict, perform a first operation on the service request, and if the first operation fails, delete the unique key constraint configuration information. The first operation may include: and the operation corresponds to the service processing type in the service request.
In another embodiment, the data processing apparatus may further include: a timestamp setting module 500. The status setting module 500 may be configured to set a timestamp length. The time stamp length may be used to represent a valid time length of the unique key constraint configuration information.
In another embodiment, the data processing apparatus may further include: a status setting module 600. The state setting module 600 may be configured to set or change the state of the unique key constraint configuration information.
The state of the unique key constraint configuration information may include: a first state, a second state, or a third state. The first state may represent a state in which the unique key constraint configuration information is not confirmed to be valid. The second state may be used to state that the unique key constraint configuration information is invalid. The third state represents a state in which the unique key configuration information is confirmed to be valid
After the unique key constraint configuration information determining module 200 determines the unique key constraint configuration information, the state setting module 600 may set the state of the configuration information on the unique key as a first state.
When the first operation in the first operation module 400 is successful, the state setting module 600 may change the state of the unique key constraint information to a third state.
When the state of the unique key constraint configuration information is a first state and the time stamp length set in the time stamp setting module 500 is reached, the state setting module 600 may change the state of the unique key constraint configuration information to a second state.
The data processing device disclosed in the above embodiments corresponds to the data processing method embodiments of the present application, and can achieve the technical effects of the data processing method embodiments of the present application.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate a dedicated integrated circuit chip 2. Furthermore, nowadays, instead of manually making an integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardsradware (Hardware Description Language), vhjhd (Hardware Description Language), and vhigh-Language, which are currently used in most popular applications. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory.
Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. With this understanding in mind, the present solution, or portions thereof that contribute to the prior art, may be embodied in the form of a software product, which in a typical configuration includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The computer software product may include instructions for causing a computing device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in the various embodiments or portions of embodiments of the present application. The computer software product may be stored in a memory, which may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transient media), such as modulated data signals and carrier waves.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
While the present application has been described with examples, those of ordinary skill in the art will appreciate that there are numerous variations and permutations of the present application without departing from the spirit of the application, and it is intended that the appended claims encompass such variations and permutations without departing from the spirit of the application.

Claims (21)

1. A data processing method, comprising:
receiving a service request comprising service data, and determining first unique key configuration information corresponding to the service request according to a preset corresponding relation between the type of the service data and the unique key configuration information;
determining unique key constraint configuration information corresponding to the service request according to the first unique key configuration information and the service data;
and determining a unique key check result based on the unique key constraint configuration information, and if the unique key check result indicates that a conflict exists, sending a message that the conflict exists.
2. The data processing method of claim 1, wherein the service request comprises: service data, a type of the service data, and a service processing type.
3. The data processing method according to claim 2, wherein the correspondence between the type of the service data and the unique key configuration information is a one-to-one correspondence or a one-to-many correspondence.
4. A data processing method according to claim 3, wherein said first unique key configuration information comprises one or more unique key configuration information.
5. A data processing method according to claim 2, wherein said traffic handling type comprises: new, updated or deleted.
6. The data processing method of claim 1, after determining the unique key constraint configuration information, further comprising: and setting the state of the unique key constraint configuration information as a first state.
7. A data processing method according to claim 6, further comprising: setting the time stamp length; the time stamp length is used for representing the effective time length of the unique key constraint configuration information.
8. A data processing method according to claim 7, characterized in that the method further comprises: when the state of the unique key constraint configuration information is a first state and the set time stamp length is reached, changing the state of the unique key constraint configuration information to a second state.
9. The data processing method according to claim 1 or 6, wherein the determining the unique key check result based on the unique key constraint configuration information specifically includes:
when the service processing type in the service request is newly increased, searching whether the unique key constraint configuration information is stored in a unique key memory, if so, determining that a unique key check result is that a conflict exists;
alternatively, the first and second electrodes may be,
and when the service processing type in the service request is updated, determining whether the updated content in the service request has the same content with the configuration attribute of the unique key constraint configuration information, if so, searching whether the updated unique key constraint configuration information is stored in a unique key memory, and if so, checking that the unique key has a conflict.
10. The data processing method of claim 9, wherein the searching for whether the updated unique key constraint configuration information is stored in the unique key storage, and if so, the unique key checking result indicates that there is a conflict, comprising:
when the unique key constraint configuration information corresponds to a plurality of unique key configuration information, respectively searching whether the content corresponding to each unique key configuration information is stored in the unique key memory; and if the unique key memory stores the content corresponding to one piece of unique key configuration information, the unique key check result indicates that a conflict exists.
11. A data processing method according to claim 9, wherein the data processing method further comprises: and when the service processing type is newly increased, searching whether the unique key storage stores the unique key constraint configuration information, and if not, judging that no conflict exists in the unique key check result.
12. A data processing method according to claim 9, wherein the data processing method further comprises: and when the service processing type is updating, searching whether the unique key storage stores updated unique key constraint configuration information, and if not, judging that no conflict exists in the unique key check result.
13. A data processing method according to claim 9, wherein the data processing method further comprises: and when the service processing type is updating, determining whether the updated content in the service request has the same content with the configuration attribute of the unique key constraint configuration information, and if not, determining that no conflict exists in the unique key check result.
14. A data processing method according to claim 9, wherein the data processing method further comprises: and if the unique key check result shows that no conflict exists, executing a first operation on the service request, and if the first operation fails, deleting the unique key constraint configuration information.
15. A data processing method according to claim 14, wherein said first operation comprises: and the operation corresponds to the service processing type in the service request.
16. A data processing method according to claim 14, wherein the data processing method further comprises: and if the first operation is successful and the state of the unique key constraint configuration information is the first state, changing the state of the unique key constraint configuration information into a third state.
17. A data processing apparatus, comprising: the system comprises a first unique key configuration information determining module, a unique key constraint configuration information determining module and a unique key checking module; wherein the content of the first and second substances,
the first unique key configuration information determining module is used for receiving a service request comprising service data and determining first unique key configuration information corresponding to the service request according to the corresponding relation between the type of the preset service data and the unique key configuration information;
the unique key constraint configuration information determining module is used for determining unique key constraint configuration information corresponding to the service request according to the first unique key configuration information and the service data;
the unique key checking module is used for determining a unique key checking result based on the unique key constraint configuration information, and if the unique key checking result indicates that a conflict exists, sending a message that the conflict exists.
18. A data processing apparatus as claimed in claim 17, wherein said unique key check module comprises: a newly added type check result determining module, an updated type check result determining module and a message sending module; wherein the content of the first and second substances,
the newly-added type check result determining module is used for searching whether the unique key constraint configuration information is stored in the unique key memory or not when the service processing type in the service request is newly added, and if so, the unique key check result indicates that a conflict exists;
the update type checking result determining module is used for determining whether the update content in the service request has the same content with the configuration attribute of the unique key constraint configuration information when the service processing type in the service request is update, if so, searching whether the updated unique key constraint configuration information is stored in the unique key memory, and if so, checking the unique key to determine that a conflict exists;
and the message sending module is used for sending a message with a unique key conflict when the result of the newly added type check result determining module or the updated type check result determining module is that the conflict exists.
19. A data processing apparatus as claimed in claim 17, characterized in that the data processing apparatus further comprises: a first operation module; the first operation module is configured to, when a unique key check result of the unique key check module is not a conflict, perform a first operation on the service request, and if the first operation fails, delete the unique key constraint configuration information; the first operation includes: and the operation corresponds to the service processing type in the service request.
20. A data processing apparatus as claimed in claim 17, characterized in that the data processing apparatus further comprises: a timestamp setting module; the timestamp setting module is used for setting the length of a timestamp; the time stamp length is used for representing the effective time length of the unique key constraint configuration information.
21. A data processing apparatus as claimed in claim 17, characterized in that the data processing apparatus further comprises: a state setting module; the state setting module is used for setting or changing the state of the unique key constraint configuration information.
CN201510141386.2A 2015-03-27 2015-03-27 Data processing method and device Active CN106156050B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510141386.2A CN106156050B (en) 2015-03-27 2015-03-27 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510141386.2A CN106156050B (en) 2015-03-27 2015-03-27 Data processing method and device

Publications (2)

Publication Number Publication Date
CN106156050A CN106156050A (en) 2016-11-23
CN106156050B true CN106156050B (en) 2020-01-10

Family

ID=57339808

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510141386.2A Active CN106156050B (en) 2015-03-27 2015-03-27 Data processing method and device

Country Status (1)

Country Link
CN (1) CN106156050B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108881120B (en) * 2017-05-12 2020-12-04 创新先进技术有限公司 Data processing method and device based on block chain
CN109800229B (en) * 2018-12-29 2021-10-08 深圳云天励飞技术有限公司 Data access method and related equipment
CN109933574B (en) * 2019-02-27 2021-03-19 常州猛犸电动科技有限公司 Unique key generation method and device and terminal equipment
CN113726845A (en) * 2021-07-14 2021-11-30 深圳市有为信息技术发展有限公司 Data transmission method and device of vehicle-mounted terminal, vehicle-mounted terminal and commercial vehicle

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102122289A (en) * 2010-01-07 2011-07-13 微软公司 Dispatching conflicting data changes
CN102323940A (en) * 2011-09-01 2012-01-18 中兴通讯股份有限公司 Configuration platform implementation method, configuration platform and system based on database
CN103390052A (en) * 2013-07-25 2013-11-13 上海软智信息科技有限公司 Data processing method and device
US8700569B1 (en) * 2012-05-09 2014-04-15 Bertec Corporation System and method for the merging of databases
CN104268272A (en) * 2014-10-14 2015-01-07 青岛海尔软件有限公司 Method and device for checking uniqueness of data
CN104427557A (en) * 2013-08-27 2015-03-18 中国电信股份有限公司 Method for controlling QoS (Quality of Service) policy conflict, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102122289A (en) * 2010-01-07 2011-07-13 微软公司 Dispatching conflicting data changes
CN102323940A (en) * 2011-09-01 2012-01-18 中兴通讯股份有限公司 Configuration platform implementation method, configuration platform and system based on database
US8700569B1 (en) * 2012-05-09 2014-04-15 Bertec Corporation System and method for the merging of databases
CN103390052A (en) * 2013-07-25 2013-11-13 上海软智信息科技有限公司 Data processing method and device
CN104427557A (en) * 2013-08-27 2015-03-18 中国电信股份有限公司 Method for controlling QoS (Quality of Service) policy conflict, device and system
CN104268272A (en) * 2014-10-14 2015-01-07 青岛海尔软件有限公司 Method and device for checking uniqueness of data

Also Published As

Publication number Publication date
CN106156050A (en) 2016-11-23

Similar Documents

Publication Publication Date Title
KR102258437B1 (en) Blockchain-based data storage and query method and device
CN107526777B (en) Method and equipment for processing file based on version number
CN107426169B (en) Service processing method and device based on permission
RU2611966C2 (en) Data enrichment recommending system
CN107038041B (en) Data processing method, error code dynamic compatibility method, device and system
US8108360B2 (en) Database object update order determination
US8732127B1 (en) Method and system for managing versioned structured documents in a database
CN107391101B (en) Information processing method and device
CN111400681B (en) Data authority processing method, device and equipment
CN106156050B (en) Data processing method and device
US11068536B2 (en) Method and apparatus for managing a document index
TW202030658A (en) Data structure reading method and apparatus, data structure updating method and apparatus, and electronic device
CN115617799A (en) Data storage method, device, equipment and storage medium
CN110941443B (en) Method and device for modifying file name in SDK (software development kit) and electronic equipment
CN113326288A (en) Data processing method and device and electronic equipment
CN108073401B (en) Method and device for executing business logic and electronic equipment
CN108153799B (en) Database access control method and device and database system
CN111694992A (en) Data processing method and device
CN115391426A (en) Data query method and device, storage medium and electronic equipment
CN111339117B (en) Data processing method, device and equipment
US10114864B1 (en) List element query support and processing
CN110968580B (en) Method and device for creating data storage structure
CN112699129A (en) Data processing system, method and device
US9002810B1 (en) Method and system for managing versioned structured documents in a database
CN113760860B (en) Data reading method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201012

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201012

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: Greater Cayman, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.