[go: up one dir, main page]

CN110489253A - Data processing method, device, equipment and computer readable storage medium - Google Patents

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

Info

Publication number
CN110489253A
CN110489253A CN201910608901.1A CN201910608901A CN110489253A CN 110489253 A CN110489253 A CN 110489253A CN 201910608901 A CN201910608901 A CN 201910608901A CN 110489253 A CN110489253 A CN 110489253A
Authority
CN
China
Prior art keywords
data
operation data
user
server
serial number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910608901.1A
Other languages
Chinese (zh)
Inventor
潘翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN201910608901.1A priority Critical patent/CN110489253A/en
Publication of CN110489253A publication Critical patent/CN110489253A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0709Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明公开一种数据处理方法、装置、设备及计算机可读存储介质,所述方法包括:当侦测到用户操作指令时,根据预设属性标识和所述用户操作指令的类型标识生成流水号;将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端,以供所述服务端基于所述流水号对所述操作数据进行处理;接收所述服务端针对所述操作数据反馈的处理结果标识,并在所述处理结果标识为异常标识时,对所述操作数据进行恢复。本方案基于大数据处理技术针对操作数据设定恢复机制,在服务端处理操作数据失败时返回异常标识的处理结果标识,依据该异常标识将操作数据恢复为原状态,确保了各通信方之间操作数据的正确性。

The present invention discloses a data processing method, device, equipment and computer-readable storage medium. The method includes: when a user operation instruction is detected, generating a serial number according to a preset attribute identifier and a type identifier of the user operation instruction ; Send the serial number and the operation data corresponding to the user operation instruction to the server, so that the server can process the operation data based on the serial number; The processing result of the data feedback is identified, and when the processing result is identified as abnormal, the operation data is restored. Based on the big data processing technology, this solution sets a recovery mechanism for the operation data. When the server fails to process the operation data, it returns the processing result identification of the abnormal identification, and restores the operation data to the original state according to the abnormal identification, ensuring that the communication The correctness of the operation data.

Description

数据处理方法、装置、设备及计算机可读存储介质Data processing method, device, device, and computer-readable storage medium

技术领域technical field

本发明主要涉及数据处理技术领域,具体地说,涉及一种数据处理方法、装置、设备及计算机可读存储介质。The present invention mainly relates to the technical field of data processing, in particular, to a data processing method, device, equipment and computer-readable storage medium.

背景技术Background technique

随着网络技术的发展,系统所支持的功能越来越多,而功能增加导致了系统的复杂化,各项功能之间的耦合性程度高,不利于系统的维护和发展。为了降低功能之间的耦合性,兴起了微服务架构,微服务架构是一种轻量级架构,由不同的微服务针对同一数据实现不同的功能,各微服务之间通过同步或异步的通信方式进行通信,实现数据的整体功能。With the development of network technology, the system supports more and more functions, and the increase of functions leads to the complexity of the system, and the high degree of coupling between various functions is not conducive to the maintenance and development of the system. In order to reduce the coupling between functions, the microservice architecture has emerged. The microservice architecture is a lightweight architecture. Different microservices implement different functions for the same data, and the microservices communicate through synchronous or asynchronous communication. Communication in a way to realize the overall function of the data.

各微服务在基于通信对数据进行处理实现不同功能时,通信各方之间具有不同的网络环境,可能存在一方处理成功,另一方处理失败的情形;此时因不能确保通信各方间数据处理的成功,导致了由一方处理失败的数据而引起其他方数据异常的问题。When each microservice processes data based on communication to achieve different functions, the communication parties have different network environments, and there may be situations where one party processes successfully and the other party fails; at this time, data processing between communication parties cannot be ensured. The success of the process leads to the problem that the failed data processing by one party causes the data exception of the other party.

发明内容Contents of the invention

本发明的主要目的是提供一种数据处理方法、装置、设备及计算机可读存储介质,旨在解决现有技术数据处理过程中因通信一方数据处理失败引起另一方数据异常的问题。The main purpose of the present invention is to provide a data processing method, device, equipment and computer-readable storage medium, aiming to solve the problem of abnormal data of the other party caused by data processing failure of one party in the prior art data processing process.

为实现上述目的,本发明提供一种数据处理方法,所述数据处理方法包括以下步骤:To achieve the above object, the present invention provides a data processing method, the data processing method comprising the following steps:

当侦测到用户操作指令时,根据预设属性标识和所述用户操作指令的类型标识生成流水号;When a user operation instruction is detected, a serial number is generated according to the preset attribute identifier and the type identifier of the user operation instruction;

将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端,以供所述服务端基于所述流水号对所述操作数据进行处理;sending the serial number and the operation data corresponding to the user operation instruction to the server, so that the server can process the operation data based on the serial number;

接收所述服务端针对所述操作数据反馈的处理结果标识,并在所述处理结果标识为异常标识时,对所述操作数据进行恢复。Receiving a processing result identifier fed back by the server for the operation data, and recovering the operation data when the processing result identifier is an abnormality identifier.

优选地,所述根据所述客户端的属性标识和所述用户操作指令的类型标识生成流水号的步骤之后包括:Preferably, after the step of generating the serial number according to the attribute identifier of the client and the type identifier of the user operation instruction includes:

对预设流水表进行调用,并查找所述预设流水表中的空白数据列,判断排列在所述空白数据列上一顺序位置的上一数据列中是否存在数据;Calling the preset flow table, and searching for the blank data column in the preset flow table, and judging whether there is data in the previous data column arranged in the previous sequential position of the blank data column;

若所述上一数据列中存在数据,则将所述流水号插入到所述空白数据列中,并将所述流水号的初始状态设定为待处理。If there is data in the previous data column, insert the serial number into the blank data column, and set the initial state of the serial number as pending.

优选地,所述接收所述服务端针对所述操作数据反馈的处理结果标识,并在所述处理结果标识为异常标识时,对所述操作数据进行恢复的步骤包括:Preferably, the step of receiving the processing result identification fed back by the server for the operation data, and recovering the operation data when the processing result identification is an abnormal identification includes:

当接收到所述服务端针对所述操作数据反馈的处理结果标识时,根据所述处理结果标识,对所述初始状态进行修改;When receiving the processing result identifier fed back by the server for the operation data, modify the initial state according to the processing result identifier;

当所述初始状态修改为处理成功的正常标识时,根据所述类型标识和与所述处理结果标识对应的处理结果,对所述操作数据进行处理;When the initial state is modified to a normal flag indicating successful processing, process the operation data according to the type flag and the processing result corresponding to the processing result flag;

当所述初始状态修改为处理失败的异常标识时,根据与所述处理结果标识对应的处理结果,对所述操作数据进行恢复。When the initial state is modified to an exception flag of processing failure, the operation data is recovered according to a processing result corresponding to the processing result flag.

优选地,所述当侦测到用户操作指令时,根据所述客户端的属性标识和所述用户操作指令的类型标识生成流水号的步骤之前包括:Preferably, when a user operation instruction is detected, before the step of generating a serial number according to the attribute identifier of the client and the type identifier of the user operation instruction includes:

接收与所述用户操作指令对应用户账户的登录请求,并采集与所述登录请求对应的登录操作数据,将所述登录操作数据和预设登录画像数据匹配;receiving a login request of a user account corresponding to the user operation instruction, collecting login operation data corresponding to the login request, and matching the login operation data with preset login portrait data;

当所述登录操作数据和预设登录画像数据匹配成功时,完成所述用户账户的登录,以基于所述用户账户发送所述用户操作指令。When the login operation data and the preset login portrait data are successfully matched, the login of the user account is completed, so as to send the user operation instruction based on the user account.

优选地,所述接收与所述用户操作指令对应用户账户的登录请求的步骤之前包括:Preferably, before receiving the login request of the user account corresponding to the user operation instruction, the step includes:

收集基于所述用户账户生成的历史操作数据,并将各所述历史操作数据划分为力度操作数据、速度操作数据和方向操作数据;collecting historical operation data generated based on the user account, and dividing each of the historical operation data into strength operation data, speed operation data and direction operation data;

根据各所述历史操作数据的生成时间,将各所述力度操作数据划分为第一力度操作数据、第二力度操作数据和第三力度操作数据,并将各所述速度操作数据划分为第一速度操作数据、第二速度操作数据和第三速度操作数据;According to the generation time of each of the historical operation data, each of the strength operation data is divided into the first strength operation data, the second strength operation data and the third strength operation data, and each of the speed operation data is divided into the first speed operation data, second speed operation data and third speed operation data;

根据各所述历史操作数据的生成时间,将各所述方向操作数据划分为第一方向操作数据、第二方向操作数据和第三方向操作数据;According to the generation time of each of the historical operation data, each of the directional operation data is divided into the first directional operation data, the second directional operation data and the third directional operation data;

将所述第一力度操作数据、第二力度操作数据、第三力度操作数据、第一速度操作数据、第二速度操作数据、第三速度操作数据、第一方向操作数据、第二方向操作数据和第三方向操作数据设为用户账户的登录标签,与所述用户账户形成关联关系,生成所述用户账户的预设登录画像数据。The first force operation data, the second force operation data, the third force operation data, the first speed operation data, the second speed operation data, the third speed operation data, the first direction operation data, and the second direction operation data and the third-direction operation data are set as login tags of the user account, form an association relationship with the user account, and generate preset login portrait data of the user account.

优选地,所述根据预设属性标识和所述用户操作指令的类型标识生成流水号的步骤之前包括:Preferably, before the step of generating the serial number according to the preset attribute identifier and the type identifier of the user operation instruction includes:

读取与所述用户操作指令对应用户账户的权限标识,并调用预设的指令与权限之间的映射关系;Read the authority identifier of the user account corresponding to the user operation instruction, and call the preset mapping relationship between the instruction and the authority;

根据所述映射关系,判断所述用户账户是否具有触发所述用户操作指令的操作权限;According to the mapping relationship, determine whether the user account has the operation authority to trigger the user operation instruction;

若具有触发所述用户操作指令的操作权限,则执行根据预设属性标识和所述用户操作指令的类型标识生成流水号的步骤。If the user has the operation authority to trigger the user operation instruction, execute the step of generating a serial number according to the preset attribute identifier and the type identifier of the user operation instruction.

优选地,所述将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端的步骤之前包括:Preferably, the step of sending the serial number and the operation data corresponding to the user operation instruction to the server includes:

读取所述预设属性标识的第一首字符、所述用户操作指令的类型标识的第二首字符、以及所述操作数据的第三首字符;Read the first initial character of the preset attribute identifier, the second initial character of the type identifier of the user operation instruction, and the third initial character of the operation data;

将所述第一首字符、第二首字符和第三首字符拼接形成字符串,并调用预设加密机制对所述字符串加密,生成密文字符串;Splicing the first character, the second character and the third character to form a character string, and calling a preset encryption mechanism to encrypt the character string to generate a ciphertext character string;

将所述密文字符串发送到服务端,并接收所述服务端反馈的解密结果;Send the ciphertext string to the server, and receive the decryption result fed back by the server;

判断所述解密结果是否为正确结果,若为正确结果,则执行将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端的步骤。It is judged whether the decryption result is a correct result, and if it is a correct result, the step of sending the serial number and the operation data corresponding to the user operation instruction to the server is executed.

此外,为实现上述目的,本发明还提出一种数据处理装置,所述数据处理装置包括:In addition, in order to achieve the above purpose, the present invention also proposes a data processing device, the data processing device includes:

生成模块,用于当侦测到用户操作指令时,根据预设属性标识和所述用户操作指令的类型标识生成流水号;A generating module, configured to generate a serial number according to a preset attribute identifier and a type identifier of the user operation instruction when a user operation instruction is detected;

发送模块,用于将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端,以供所述服务端基于所述流水号对所述操作数据进行处理;A sending module, configured to send the serial number and the operation data corresponding to the user operation instruction to the server, so that the server can process the operation data based on the serial number;

接收模块,用于接收所述服务端针对所述操作数据反馈的处理结果标识,并在所述处理结果标识为异常标识时,对所述操作数据进行恢复。The receiving module is configured to receive a processing result identifier fed back by the server for the operation data, and restore the operation data when the processing result identifier is an abnormal identifier.

此外,为实现上述目的,本发明还提出一种数据处理设备,所述数据处理设备包括:存储器、处理器、通信总线以及存储在所述存储器上的数据处理程序;In addition, in order to achieve the above object, the present invention also proposes a data processing device, which includes: a memory, a processor, a communication bus, and a data processing program stored in the memory;

所述通信总线用于实现处理器和存储器之间的连接通信;The communication bus is used to realize connection and communication between the processor and the memory;

所述处理器用于执行所述数据处理程序,以实现以下步骤:The processor is used to execute the data processing program to achieve the following steps:

当侦测到用户操作指令时,根据预设属性标识和所述用户操作指令的类型标识生成流水号;When a user operation instruction is detected, a serial number is generated according to the preset attribute identifier and the type identifier of the user operation instruction;

将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端,以供所述服务端基于所述流水号对所述操作数据进行处理;sending the serial number and the operation data corresponding to the user operation instruction to the server, so that the server can process the operation data based on the serial number;

接收所述服务端针对所述操作数据反馈的处理结果标识,并在所述处理结果标识为异常标识时,对所述操作数据进行恢复。Receiving a processing result identifier fed back by the server for the operation data, and recovering the operation data when the processing result identifier is an abnormality identifier.

此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行以用于:In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors Execute for:

当侦测到用户操作指令时,根据预设属性标识和所述用户操作指令的类型标识生成流水号;When a user operation instruction is detected, a serial number is generated according to the preset attribute identifier and the type identifier of the user operation instruction;

将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端,以供所述服务端基于所述流水号对所述操作数据进行处理;sending the serial number and the operation data corresponding to the user operation instruction to the server, so that the server can process the operation data based on the serial number;

接收所述服务端针对所述操作数据反馈的处理结果标识,并在所述处理结果标识为异常标识时,对所述操作数据进行恢复。Receiving a processing result identifier fed back by the server for the operation data, and recovering the operation data when the processing result identifier is an abnormality identifier.

本实施例的数据处理方法,当侦测到用户操作指令时,先根据预设属性标识和用户操作指令的类型标识生成流水号;再将流水号以及与用户操作指令对应的操作数据发送到服务端,以通过服务端基于流水号对操作数据进行处理;此后接收服务端针对该操作数据处理所反馈的处理结果标识,并在处理结果标识为异常标识时,对操作数据进行恢复。本方案中针对操作数据设定恢复机制,在服务端处理操作数据失败时返回异常标识的处理结果标识,依据该异常标识将操作数据恢复为原状态,避免了因服务端对操作数据的处理失败而引起与服务端通信的其他通信方对操作数据处理的异常;因应用于微服务架构中的服务端具有相对性,在一些场合为服务端,在另一些场合则可能为客户端;从而本方案中服务端对操作数据的处理异常,代表了各通信方对操作数据的处理异常,在通信过程中只要出现通信方对操作数据的处理异常,均可进行恢复,确保了各通信方之间操作数据的正确性。In the data processing method of this embodiment, when a user operation instruction is detected, a serial number is first generated according to the preset attribute identifier and the type identifier of the user operation instruction; then the serial number and the operation data corresponding to the user operation instruction are sent to the server end, so as to process the operation data based on the serial number through the server; after that, receive the processing result identification fed back by the server for processing the operation data, and restore the operation data when the processing result identification is an abnormal identification. In this solution, a recovery mechanism is set for the operation data. When the server fails to process the operation data, it returns the processing result identification of the abnormal identification. According to the abnormal identification, the operation data is restored to the original state, avoiding the failure of the server to process the operation data. And cause other communication parties communicating with the server to process abnormal data; because the server used in the microservice architecture is relative, it may be the server in some occasions, and may be the client in other occasions; thus this In the scheme, the server’s abnormal processing of operation data represents the abnormal processing of operation data by each communication party. During the communication process, as long as the communication party’s processing of operation data is abnormal, it can be recovered, ensuring that communication between communication parties The correctness of the operation data.

附图说明Description of drawings

图1是本发明的数据处理方法第一实施例的流程示意图;Fig. 1 is a schematic flow chart of the first embodiment of the data processing method of the present invention;

图2是本发明的数据处理装置第一实施例的功能模块示意图;2 is a schematic diagram of functional modules of the first embodiment of the data processing device of the present invention;

图3是本发明实施例方法涉及的硬件运行环境的设备结构示意图。FIG. 3 is a schematic diagram of a device structure of a hardware operating environment involved in a method according to an embodiment of the present invention.

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.

具体实施方式Detailed ways

应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

本发明提供一种数据处理方法。The invention provides a data processing method.

请参照图1,图1为本发明数据处理方法第一实施例的流程示意图。在本实施例中,所述数据处理方法包括:Please refer to FIG. 1 , which is a schematic flowchart of a first embodiment of a data processing method according to the present invention. In this embodiment, the data processing method includes:

步骤S10,当侦测到用户操作指令时,根据预设属性标识和所述用户操作指令的类型标识生成流水号;Step S10, when a user operation instruction is detected, a serial number is generated according to the preset attribute identifier and the type identifier of the user operation instruction;

本发明的数据处理方法应用于客户端,适用于通过客户端对客户端和服务端之间基于微服务架构通信时所出现处理异常的数据进行恢复;其中客户端和服务端均为手机、电脑等智能终端,两者之间通信处理的数据包括但不限于客户端请求对服务端的数据进行计算、对服务端的资源进行获取,服务端将计算后的数据结果或者查询得到的数据下发到客户端等。客户端连接有显示装置,用户在显示装置进行操作,触发用户操作指令,客户端侦测到该用户操作指令时,读取客户端本身的预设属性标识,该预设属性标识为存储在客户端中存储单元表征客户端唯一性的标识,如手机或电脑的mac地址。同时针对不同类型的操作预先设定有不同的类型标识,如转账操作对应的类型标识为f1,付款操作对应的类型标识为f2;客户端读取用户操作指令对应的类型标识,并将其和预设属性标识生成为流水号。流水号为对用户操作指令进行排序的编码,将预设属性标识、类型标识和流水数排列后即生成流水号,流水数为用户对某类型操作的操作次数,如首次转账操作的流水数为1,而再次转账操作的流水数为2。对于上述转账操作的类型标识,若当前的流水数为5,客户端的mac地址为x,则所生成的流水号为x-f1-5,表征与该流水号对应的操作类型为在客户端所进行的转账操作,以及所进行转账操作的次数。The data processing method of the present invention is applied to the client, and is suitable for recovering the abnormal data that occurs when the client and the server communicate based on the micro-service architecture through the client; wherein the client and the server are both mobile phones and computers Such as smart terminals, the data processed by communication between the two includes but not limited to the client requests to calculate the data of the server, obtain the resources of the server, and the server sends the calculated data results or query data to the client End and so on. The client is connected to a display device, and the user operates on the display device to trigger a user operation instruction. When the client detects the user operation instruction, it reads the default attribute identifier of the client itself. The preset attribute identifier is stored in the client The storage unit in the terminal represents the unique identifier of the client, such as the mac address of a mobile phone or a computer. At the same time, different type identifiers are preset for different types of operations. For example, the type identifier corresponding to the transfer operation is f1, and the type identifier corresponding to the payment operation is f2; the client reads the type identifier corresponding to the user operation instruction and compares it with the The default attribute identifier is generated as a serial number. The serial number is the code for sorting the user's operation instructions. After arranging the preset attribute identifier, type identifier and serial number, the serial number is generated. The serial number is the number of operations performed by the user on a certain type of operation. For example, the serial number of the first transfer operation is 1, and the transaction number of the re-transfer operation is 2. For the type identification of the above-mentioned transfer operation, if the current transaction number is 5 and the mac address of the client is x, the generated serial number is x-f1-5, indicating that the operation type corresponding to the serial number is The transfer operation performed, and the number of transfer operations performed.

进一步地,为了确保数据的安全,对不同的操作类型设定有不同的操作权限,在侦测到用户操作指令之后,生成流水号之前,需要验证发送用户操作指令的用户账户的安全性。具体地,根据预设属性标识和所述用户操作指令的类型标识生成流水号的步骤之前包括:Further, in order to ensure data security, different operation permissions are set for different operation types. After detecting the user operation instruction and before generating the serial number, it is necessary to verify the security of the user account sending the user operation instruction. Specifically, before the step of generating the serial number according to the preset attribute identifier and the type identifier of the user operation instruction includes:

步骤S11,读取与所述用户操作指令对应用户账户的权限标识,并调用预设的指令与权限之间的映射关系;Step S11, reading the authority identifier of the user account corresponding to the user operation instruction, and calling the preset mapping relationship between the instruction and the authority;

进一步地,预先针对不同的用户账户分配有不同的权限,且用不同的权限标识区分;同时预先在不同的指令与权限之间设定映射关系,在接收到用户基于其用户账户所发送的用户操作指令时,先读取用户操作指令所来源用户账户携带的权限标识,再对预设的指令与权限之间的映射关系进行调用,以通过映射关系确定该用户账户对应具有的操作权限。Further, different permissions are assigned to different user accounts in advance, and different permission identifiers are used to distinguish them; at the same time, the mapping relationship between different instructions and permissions is set in advance, and when the user receives the user account sent by the user based on his user account When operating an instruction, first read the authority identifier carried by the user account from which the user operation instruction originated, and then call the preset mapping relationship between the instruction and the authority, so as to determine the corresponding operation authority of the user account through the mapping relationship.

步骤S12,根据所述映射关系,判断所述用户账户是否具有触发所述用户操作指令的操作权限;Step S12, according to the mapping relationship, determine whether the user account has the operation authority to trigger the user operation instruction;

更进一步地,将权限标识和映射关系对比,确定映射关系中与该权限标识对应的目标权限,该目标权限在映射关系中所对应的指令范围,即为用户账户所具有的能进行操作的权限范围。进而将用户操作指令和该指令范围对比,判断用户操作指令是否在该指令范围内,若存在则说明用户账户具有触发该用户操作指令的操作权限;否则说明用户账户不具有触发该用户操作指令的操作权限,此时输出提示信息,以提示用户不具有该项操作权限。Furthermore, compare the permission identifier with the mapping relationship to determine the target permission corresponding to the permission identifier in the mapping relationship, and the instruction scope corresponding to the target permission in the mapping relationship is the permission that the user account has to perform operations scope. Then compare the user operation instruction with the instruction range to determine whether the user operation instruction is within the instruction range. If it exists, it means that the user account has the operation authority to trigger the user operation instruction; otherwise, it means that the user account does not have the authorization to trigger the user operation instruction. Operation authority, at this time, a prompt message is output to remind the user that the user does not have the operation authority.

步骤S13,若具有触发所述用户操作指令的操作权限,则执行根据预设属性标识和所述用户操作指令的类型标识生成流水号的步骤。Step S13, if the user has the operation authority to trigger the user operation instruction, execute the step of generating a serial number according to the preset attribute identifier and the type identifier of the user operation instruction.

进一步地,在确定用户账户具有触发用户操作指令的操作权限之后,则读取预设属性标识和用户操作指令的类型标识,并依据记录的类型标识所对应操作类型的操作次数,为该次用户操作指令分配流水数;进而将预设属性标识、类型标识和流水数生成为流水号。Further, after it is determined that the user account has the operation authority to trigger the user operation instruction, the preset attribute identifier and the type identifier of the user operation instruction are read, and according to the number of operations of the operation type corresponding to the recorded type identifier, the The operation instruction allocates the serial number; and then generates the preset attribute identifier, the type identifier and the serial number as the serial number.

更进一步地,为了对各次操作进行管理,预先设置有预设流水表,通过将生成的流水数存储到预设流水表中实现对各次操作的统一记录。具体地,根据客户端的属性标识和用户操作指令的类型标识生成流水号的步骤之后包括:Furthermore, in order to manage each operation, a preset flow meter is preset, and the unified recording of each operation is realized by storing the generated flow numbers in the preset flow table. Specifically, after the step of generating the serial number according to the attribute identifier of the client and the type identifier of the user operation instruction includes:

步骤a1,对预设流水表进行调用,并查找所述预设流水表中的空白数据列,判断排列在所述空白数据列上一顺序位置的上一数据列中是否存在数据;Step a1, calling the preset flow table, searching for the blank data column in the preset flow table, and judging whether there is data in the previous data column arranged in the previous sequential position of the blank data column;

在生成流水号之后,对预设流水表进行调用,并将流水号插入到预设流水表中;预设流水表按照从上到下的顺序包含有多个数据列,插入操作其实质为将新生成的流水号排列在预设流水表中尚未记录流水号的空白数据列,且排列在该空白数据列上一顺序的数据列中记录有流水号。从而查找预设流水表中数值为空值的空白数据列,并判断排列在该数值为空值的空白数据列的上一顺序位置的上一数据列中是否存在数据,即判断该上一数据列中的数值是否为空值;若存在数据,则说明上一数据列不为空值,否则说明上一数据列为空值,则将上一数据列作为空白数据列,继续判断排列在空白数据列上一顺序位置的上一数据列中是否存在数据,直到检测到上一数据列中具有数据,不为空值。After the serial number is generated, call the preset serial number and insert the serial number into the preset serial number; the preset serial number contains multiple data columns in order from top to bottom, and the essence of the insertion operation is to The newly generated serial number is arranged in a blank data column where no serial number has been recorded in the default serial table, and the serial number is recorded in a data column arranged in a sequence above the blank data column. Thereby searching for the blank data column whose value is null in the default flow table, and judging whether there is data in the previous data column arranged in the previous sequence position of the blank data column whose value is null, that is, judging the previous data Whether the value in the column is a null value; if there is data, it means that the previous data column is not a null value; Whether there is data in the previous data column at the previous sequential position of the data column, until it is detected that there is data in the previous data column, it is not a null value.

步骤a2,若所述上一数据列中存在数据,则将所述流水号插入到所述空白数据列中,并将所述流水号的初始状态设定为待处理。Step a2, if there is data in the last data column, insert the serial number into the blank data column, and set the initial state of the serial number as pending.

进一步地,在判断出上一数据列中存在数据,不为空值后,将流水号添加到该数值为空值的空白数据列中,以对该流水号进行记录。此后将该流水号的初始状态设定为待处理,表征由该用户操作指令生成的操作数据处于等待服务端进行处理的状态。Further, after judging that there is data in the last data column and it is not a null value, the serial number is added to the blank data column whose value is a null value, so as to record the serial number. Afterwards, the initial state of the serial number is set as pending, which means that the operation data generated by the user operation instruction is in a state of waiting for the server to process.

步骤S20,将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端,以供所述服务端基于所述流水号对所述操作数据进行处理;Step S20, sending the serial number and the operation data corresponding to the user operation instruction to the server, so that the server can process the operation data based on the serial number;

更进一步地,将生成的流水号和用户操作指令所生成的操作数据通过MQ(messagequeue,消息队列)的方式发送到服务端,由服务端依据流水号对操作数据进行处理。服务端在接收到该流水号和操作数据之后,先依据流水号中的属性标识判断客户端是否为与服务端具有通信关系的终端,若是与服务端具有通信关系的终端,再依据流水号中类型标识所表征的操作类型启动与该操作类型对应的服务逻辑流程,通过服务逻辑流程对操作数据进行处理,生成处理结果。其中服务逻辑流程依据用户操作指令所触发操作类型的不同而不同,如用户操作指令触发的操作类型为转账操作,则服务逻辑流程为进行转账操作处理,生成的处理结果为转账操作的结果。Furthermore, the generated serial number and the operation data generated by the user operation instruction are sent to the server through MQ (message queue, message queue), and the server processes the operation data according to the serial number. After receiving the serial number and operation data, the server first judges whether the client is a terminal that has a communication relationship with the server according to the attribute identification in the serial number, and if it is a terminal that has a communication relationship with the server, then according to the The operation type represented by the type identifier starts the service logic flow corresponding to the operation type, processes the operation data through the service logic flow, and generates a processing result. The service logic flow is different according to the type of operation triggered by the user operation instruction. For example, if the operation type triggered by the user operation instruction is a transfer operation, the service logic flow is to perform transfer operation processing, and the generated processing result is the result of the transfer operation.

其中,在启动服务逻辑流程时,先读取流水号中的类型标识,并将其和服务端中各项服务逻辑流程的流程标识对比,确定和类型标识一致的流程标识,具有该流程标识的服务逻辑流程即为对操作数据进行处理的服务逻辑流程,进而对该服务逻辑流程进行启动。在经服务逻辑流程进行处理生成处理结果后,对该处理结果的正确性进行判断,如对于转账的处理结果,判断转账账户以及转账金额是否正确等。对于处理结果生成处理结果标识,其中处理为正确的结果所生成的处理结果标识为正常标识,处理为错误的结果所生成的处理结果标识为异常标识;通过处理结果标识所表征的正常或异常状态来判断操作数据的处理是否成功。Among them, when starting the service logic process, first read the type identification in the serial number, and compare it with the process identification of each service logic process in the server to determine the process identification that is consistent with the type identification. The service logic flow is the service logic flow for processing the operation data, and then the service logic flow is started. After the processing result is generated through the service logic process, the correctness of the processing result is judged, for example, for the transfer processing result, it is judged whether the transfer account and the transfer amount are correct, etc. Generate a processing result identification for the processing result, wherein the processing result identification generated by processing the correct result is a normal identification, and the processing result identification generated by processing the wrong result is an abnormal identification; the normal or abnormal state represented by the processing result identification To judge whether the processing of the operation data is successful.

步骤S30,接收所述服务端针对所述操作数据反馈的处理结果标识,并在所述处理结果标识为异常标识时,对所述操作数据进行恢复。Step S30, receiving the processing result identifier fed back by the server for the operation data, and recovering the operation data when the processing result identifier is abnormal.

进一步地,服务端将生成的处理结果标识返回到客户端,客户端在接收到该处理结果标识后,通过处理结果标识所表征的正常或异常状态,即可确定服务端对操作数据的处理成功与否。在处理结果标识为异常标识,说明服务端对操作数据的处理失败时,客户端对操作数据恢复到用户发起用户操作指令前的状态,以避免客户端中操作数据的异常。在处理结果标识为正常标识,说明服务端对操作数据的处理成功时,客户端依据操作类型对操作数据继续进行处理;即当操作类型表征需要对操作数据进行继续处理时,则由客户端在处理结果的基础上对操作数据继续处理;当操作类型表征不需要对操作数据进行继续处理时,则结束对操作数据的处理。Further, the server returns the generated processing result identifier to the client. After receiving the processing result identifier, the client can determine that the server has successfully processed the operation data through the normal or abnormal state represented by the processing result identifier. or not. When the processing result is marked as abnormal, it means that when the server fails to process the operation data, the client restores the operation data to the state before the user initiates the user operation command, so as to avoid the exception of the operation data in the client. When the processing result is marked as normal, indicating that the server has successfully processed the operation data, the client will continue to process the operation data according to the operation type; that is, when the operation type indicates that the operation data needs to be processed further, the client will Continue to process the operation data based on the processing results; when the operation type indicates that the operation data does not need to be processed further, the operation data processing ends.

具体地,接收服务端针对操作数据反馈的处理结果标识,并在处理结果标识为异常标识时,对操作数据进行恢复的步骤包括:Specifically, receiving the processing result identification fed back by the server for the operation data, and when the processing result is identified as an abnormal identification, the steps of recovering the operation data include:

步骤S31,当接收到所述服务端针对所述操作数据反馈的处理结果标识时,根据所述处理结果标识,对所述初始状态进行修改;Step S31, when receiving the processing result identifier fed back by the server for the operation data, modify the initial state according to the processing result identifier;

进一步地,当服务端对操作数据进行处理时,将客户端流水表中流水号的初始状态由待处理修改为处理中,且在处理完成后将初始状态由处理中修改为处理完成。同时,依据服务端所反馈处理结果标识的差异性,处理完成包括处理成功和处理失败两种类型;当处理结果标识表征正常状态,则将初始状态修改为表征处理成功的正常标识,而当处理结果标识表征异常状态,则将初始状态修改为表征处理失败的异常标识;通过初始状态的变换,来表征服务端对操作数据的处理进度。Further, when the server processes the operation data, the initial state of the serial number in the client's flow table is changed from pending to processing, and after the processing is completed, the initial state is changed from processing to processing completed. At the same time, according to the difference of the processing result identification fed back by the server, the processing completion includes two types: processing success and processing failure; The result flag represents an abnormal state, and the initial state is changed to an abnormal flag representing a processing failure; through the transformation of the initial state, it represents the processing progress of the server on the operation data.

步骤S32,当所述初始状态修改为处理成功的正常标识时,根据所述类型标识和与所述处理结果标识对应的处理结果,对所述操作数据进行处理;Step S32, when the initial state is changed to a normal flag indicating successful processing, process the operation data according to the type flag and the processing result corresponding to the processing result flag;

更进一步地,在初始状态修改为表征处理成功的正常标识,服务端对操作数据处理成功后,依据表征操作类型的类型标识和生成的处理结果,对操作数据进行处理。其中类型标识中有表征是否需要由客户端继续处理的子标识,判断类型标识中是否包括该子标识,若包括则在处理结果的基础上对操作数据继续处理;若不包括则结束对操作数据的处理。如对于转账操作,若其类型标识中包含显示的子标识,则将转账成功的结果显示在客户单的显示装置上;若其类型标识中不包括任何子标识,则记录该转账成功的结果即可,而不进行其他处理。Furthermore, the initial state is changed to a normal flag representing successful processing, and after the server successfully processes the operation data, it processes the operation data according to the type flag representing the type of operation and the generated processing result. Among them, there is a sub-identification in the type identification that indicates whether the client needs to continue processing, judge whether the sub-identification is included in the type identification, if it is included, continue processing the operation data on the basis of the processing result; if it is not included, stop processing the operation data processing. For example, for the transfer operation, if the type identifier contains the displayed sub-identification, the successful result of the transfer will be displayed on the display device of the customer order; if the type identification does not include any sub-identification, then the successful result of the transfer is recorded. Yes, without further processing.

步骤S33,当所述初始状态修改为处理失败的异常标识时,根据与所述处理结果标识对应的处理结果,对所述操作数据进行恢复。Step S33 , when the initial state is modified to an exception flag of processing failure, restore the operation data according to the processing result corresponding to the processing result flag.

进一步地,若初始状态修改为表征处理失败的异常标识,说明服务端对操作数据处理失败时,则根据处理结果对操作数据进行恢复。预先设定有用于恢复的回滚流程,当需要进行恢复时,启动回滚流程,对与处理结果对应的操作数据进行回滚,即将生成处理结果的操作数据恢复到原来状态。如用户账户的转账操作,转账额度为500,但处理结果为600;服务端在处理时,将该用户账户中的金额减去该处理结果,使得用户账户中的金额减少;在回滚时则将用户账户中的金额恢复到减去转账额度之前的状态,以确保数据的一致性。Further, if the initial state is modified to an exception flag representing processing failure, indicating that the server fails to process the operation data, the operation data will be restored according to the processing result. A rollback process for recovery is preset. When recovery is required, the rollback process is started, and the operation data corresponding to the processing result is rolled back, that is, the operation data that generates the processing result is restored to its original state. For example, in the transfer operation of the user account, the transfer amount is 500, but the processing result is 600; when the server is processing, the amount in the user account is subtracted from the processing result, so that the amount in the user account is reduced; Restore the amount in the user account to the state before subtracting the transfer amount to ensure data consistency.

此外,为了确保经回滚后的数据和发送用户操作指令前的数据一致,在接收到用户操作指令时,读取用户操作指令所针对的操作数据作为备份数据进行备份;在进行回滚操作完成后,读取该备份数据,并将其和经回滚操作的回滚数据进行对比,判断两者之间的一致性。若两者一致,则说明回滚操作将操作数据恢复到原来状态,回滚成功;若不一致,则说明回滚操作没有将操作数据恢复到原来状态,回滚失败,此时输出提示信息,以提示以人为干预的方式进行操作数据恢复。In addition, in order to ensure that the data after the rollback is consistent with the data before sending the user operation instruction, when the user operation instruction is received, the operation data targeted by the user operation instruction is read as the backup data for backup; Afterwards, read the backup data and compare it with the rolled back data after the rollback operation to judge the consistency between the two. If the two are consistent, it means that the rollback operation restores the operation data to the original state, and the rollback is successful; if they are inconsistent, it means that the rollback operation did not restore the operation data to the original state, and the rollback fails. Prompt to restore operational data by means of human intervention.

需要说明的是,本实施例对于备份数据设定有清除机制,预先设定预设存储时长,在到达预设存储时长后,对备份数据进行删除,以确保操作数据准确回滚的同时释放存储空间。同时,为了确保服务端对操作数据的及时处理,预先设定时间阈值,当流水表中某一流水号处于待处理状态的时长大于该时间阈值时,则说明该流水号所表征的操作数据处于等待执行的时间过长;此时,服务端可能出现遗漏,从而向服务端发出提示消息,以提示服务端对该流水号所对应的操作数据及时处理。It should be noted that this embodiment has a clearing mechanism for the backup data setting, and the preset storage duration is preset. After the preset storage duration is reached, the backup data is deleted to ensure that the operation data is accurately rolled back and the storage is released. space. At the same time, in order to ensure the timely processing of the operation data by the server, the time threshold is preset. When a certain serial number in the water table is in the pending state for longer than the time threshold, it means that the operation data represented by the serial number is in the The waiting time for execution is too long; at this time, the server may miss something, so a prompt message is sent to the server to prompt the server to process the operation data corresponding to the serial number in a timely manner.

本实施例的数据处理方法,当侦测到用户操作指令时,先根据预设属性标识和用户操作指令的类型标识生成流水号;再将流水号以及与用户操作指令对应的操作数据发送到服务端,以通过服务端基于流水号对操作数据进行处理;此后接收服务端针对该操作数据处理所反馈的处理结果标识,并在处理结果标识为异常标识时,对操作数据进行恢复。本方案中针对操作数据设定恢复机制,在服务端处理操作数据失败时返回异常标识的处理结果标识,依据该异常标识将操作数据恢复为原状态,避免了因服务端对操作数据的处理失败而引起与服务端通信的其他通信方对操作数据处理的异常;因应用于微服务架构中的服务端具有相对性,在一些场合为服务端,在另一些场合则可能为客户端;从而本方案中服务端对操作数据的处理异常,代表了各通信方对操作数据的处理异常,在通信过程中只要出现通信方对操作数据的处理异常,均可进行恢复,确保了各通信方之间操作数据的正确性。In the data processing method of this embodiment, when a user operation instruction is detected, a serial number is first generated according to the preset attribute identifier and the type identifier of the user operation instruction; then the serial number and the operation data corresponding to the user operation instruction are sent to the server end, so as to process the operation data based on the serial number through the server; after that, receive the processing result identification fed back by the server for processing the operation data, and restore the operation data when the processing result identification is an abnormal identification. In this solution, a recovery mechanism is set for the operation data. When the server fails to process the operation data, it returns the processing result identification of the abnormal identification. According to the abnormal identification, the operation data is restored to the original state, avoiding the failure of the server to process the operation data. And cause other communication parties communicating with the server to process abnormal data; because the server used in the microservice architecture is relative, it may be the server in some occasions, and may be the client in other occasions; thus this In the scheme, the server’s abnormal processing of operation data represents the abnormal processing of operation data by each communication party. During the communication process, as long as the communication party’s processing of operation data is abnormal, it can be recovered, ensuring that communication between communication parties The correctness of the operation data.

进一步地,在本发明数据处理方法另一实施例中,所述当侦测到用户操作指令时,根据所述客户端的属性标识和所述用户操作指令的类型标识生成流水号的步骤之前包括:Further, in another embodiment of the data processing method of the present invention, when a user operation instruction is detected, before the step of generating a serial number according to the attribute identifier of the client and the type identifier of the user operation instruction includes:

步骤b1,接收与所述用户操作指令对应用户账户的登录请求,并采集与所述登录请求对应的登录操作数据,将所述登录操作数据和预设登录画像数据匹配;Step b1, receiving a login request of a user account corresponding to the user operation instruction, collecting login operation data corresponding to the login request, and matching the login operation data with preset login portrait data;

可理解地,用户操作指令依据用户账户发出,在发出用户操作指令前,需要对用户账户进行登录操作,本实施例设置有对用户账户登录的登录身份验证机制。具体地,预先依据用户以往各次登录操作的操作数据,生成表征用户身份的预设登录画像数据;当接收到用户账户的登录请求时,采集依据该登录请求所生成的登录操作数据,该登录操作数据其实质为用户进行登录操作时生成的数据,包括登录操作的操作力度数据、操作方向数据和操作速度数据等。进而将登录操作数据和预设登录画像数据匹配,判断登录操作数据是否在预设登录画像数据所包含的数据中。若包含在预设登录画像数据中,则说明登录操作数据和预设登录画像数据匹配成功,否则匹配失败。Understandably, the user operation instruction is issued according to the user account, and the user account needs to be logged in before the user operation instruction is issued. This embodiment is provided with a login authentication mechanism for user account login. Specifically, based on the operation data of the user's previous login operations in advance, the preset login portrait data representing the user's identity is generated; when a login request of the user account is received, the login operation data generated according to the login request is collected, and the login The essence of operation data is the data generated when the user performs the login operation, including the operation force data, operation direction data and operation speed data of the login operation. Further, the login operation data is matched with the preset login image data, and it is determined whether the login operation data is included in the preset login image data. If it is included in the preset login image data, it means that the login operation data and the preset login image data are successfully matched; otherwise, the matching fails.

进一步地,为了将登录操作数据和预设登录画像数据匹配,需要在两者匹配前生成预设登录画像数据;具体地,接收与用户操作指令对应用户账户的登录请求的步骤之前包括:Further, in order to match the login operation data with the preset login portrait data, it is necessary to generate the preset login portrait data before the two are matched; specifically, before receiving the login request of the user account corresponding to the user operation instruction, the step includes:

步骤b3,收集基于所述用户账户生成的历史操作数据,并将各所述历史操作数据划分为力度操作数据、速度操作数据和方向操作数据;Step b3, collecting historical operation data generated based on the user account, and dividing each of the historical operation data into strength operation data, speed operation data and direction operation data;

进一步地,收集用户以往针对用户账户所进行登录操作的历史操作数据,该历史操作数据包括用户操作的力度、速度和操作方向;各类数据由不同的检测装置检测,从而可依据各历史操作数据所来源的检测装置划分为力度操作数据、速度操作数据和方向操作数据。此后对划分的力度操作数据和速度操作数据和方向操作数据进行去噪统计处理,筛除各力度操作数据和各速度操作数据中明显不符合用户操作习惯的数据;如1000次操作中,990次操作力度在一个范围内,而10次操作明显超出该范围,则将该10次操作删除,并将990次统计形成用户所习惯的力度操作范围;同样地,以和各力度操作数据相同的方式将各项速度操作数据形成用户所习惯的速度操作范围;进而将经去噪统计处理得到的力度操作范围和速度操作范围作为新的力度操作数据和速度操作数据,以对初始划分的力度操作数据和速度操作数据更新。Further, collect the historical operation data of the user's previous login operations on the user account, the historical operation data includes the strength, speed and direction of the user's operation; various types of data are detected by different detection devices, so that the historical operation data can be used to The source detection device is divided into strength operation data, speed operation data and direction operation data. Afterwards, denoising statistical processing is performed on the divided strength operation data, speed operation data and direction operation data, and the data that obviously does not conform to the user's operating habits in each strength operation data and speed operation data are screened out; for example, in 1000 operations, 990 times The operation strength is within a range, but 10 operations are obviously beyond the range, delete the 10 operations, and make 990 statistics to form the strength operation range that the user is used to; similarly, use the same method as the operation data of each strength The speed operation data is formed into the speed operation range that the user is accustomed to; and then the force operation range and speed operation range obtained through the denoising statistical processing are used as the new force operation data and speed operation data, so as to compare the initial division of the force operation data. and speed operation data update.

步骤b4,根据各所述历史操作数据的生成时间,将各所述力度操作数据划分为第一力度操作数据、第二力度操作数据和第三力度操作数据,并将各所述速度操作数据划分为第一速度操作数据、第二速度操作数据和第三速度操作数据;Step b4, according to the generation time of each of the historical operation data, divide each of the force operation data into the first force operation data, the second force operation data and the third force operation data, and divide each of the speed operation data into operating data for a first speed, operating data for a second speed, and operating data for a third speed;

更进一步地,结合各次登录的登录操作时间,即各历史操作数据的生成时间,将各力度操作数据和速度操作数据细分为各项子操作数据;具体地,登录操作时间分为工作日和节假日,工作日又分为上班时间和非上班时间,结合该时间的细分将各力度操作数据细分为在节假日生成的第一力度操作数据,在上班时间生成的第二力度操作数据以及在非上班时间生成的第三力度操作数据。相应的对于速度操作速度也依据力度操作数据的方式进行处理,划分为第一速度操作数据、第二速度操作数据和第三速度操作数据。Furthermore, in combination with the login operation time of each login, that is, the generation time of each historical operation data, each force operation data and speed operation data are subdivided into various sub-operation data; specifically, the login operation time is divided into working days and holidays, working days are further divided into working hours and non-working hours. Combined with the subdivision of this time, the operation data of each strength is subdivided into the first strength operation data generated during holidays, the second strength operation data generated during working hours and Third-force operational data generated during off-hours. Correspondingly, the speed of the speed operation is also processed according to the way of the force operation data, which is divided into the first speed operation data, the second speed operation data and the third speed operation data.

步骤b5,根据各所述历史操作数据的生成时间,将各所述方向操作数据划分为第一方向操作数据、第二方向操作数据和第三方向操作数据;Step b5, according to the generation time of each of the historical operation data, divide each of the directional operation data into the first directional operation data, the second directional operation data and the third directional operation data;

进一步地,方向操作数据为表征用户习惯左手操作、右手操作以及双手操作的数据,同样地将各方向操作数据依据生成时间的不同细分为第一方向操作数据、第二方向操作数据和第三方向操作数据,通过划分的各项数据来体现用户在不同时间所习惯的操作形式。当然三者之间可以相同,如用户在上班时间和非上班时间均习惯于左手操作,则第二子方向和第三子方向相同,均为左手。Furthermore, the direction operation data is the data that characterizes the user’s habits of left-hand operation, right-hand operation and two-hand operation. Similarly, each direction operation data is subdivided into the first direction operation data, the second direction operation data and the third direction operation data according to the generation time. The direction operation data reflects the user's habitual operation form at different times through the division of various data. Of course, the three can be the same. If the user is accustomed to left-handed operation during working hours and non-working hours, the second sub-direction and the third sub-direction are the same, both being left-handed.

步骤b6,将所述第一力度操作数据、第二力度操作数据、第三力度操作数据、第一速度操作数据、第二速度操作数据、第三速度操作数据、第一方向操作数据、第二方向操作数据和第三方向操作数据设为用户账户的登录标签,与所述用户账户形成关联关系,生成所述用户账户的预设登录画像数据。Step b6, the first strength operation data, the second strength operation data, the third strength operation data, the first speed operation data, the second speed operation data, the third speed operation data, the first direction operation data, the second The direction operation data and the third direction operation data are set as login tags of the user account, form an association relationship with the user account, and generate preset login portrait data of the user account.

在对各力度操作数据、各速度操作数据细和各方向操作数据划分完成后,将划分所得到的第一力度操作数据、第二力度操作数据、第三力度操作数据、第一速度操作数据、第二速度操作数据、第三速度操作数据、第一方向操作数据、第二方向操作数据和第三方向操作数据作为用户登录操作的登录标签,与用户账户形成关联关系,生成为用户账户的预设登录画像数据。After dividing the operating data of each force, operating data of each speed and operating data of each direction, divide the obtained first force operating data, second force operating data, third force operating data, first speed operating data, The second speed operation data, the third speed operation data, the first direction operation data, the second direction operation data and the third direction operation data are used as the login tags of the user login operation, which form an association relationship with the user account, and are generated as the user account's preset Set the registration image data.

步骤b2,当所述登录操作数据和预设登录画像数据匹配成功时,完成所述用户账户的登录,以基于所述用户账户发送所述用户操作指令。In step b2, when the login operation data and the preset login portrait data are successfully matched, the login of the user account is completed, so as to send the user operation instruction based on the user account.

可理解地,因登录操作数据包括操作力度数据、操作速度数据和操作方向数据,而预设登录画像数据中则包括依据不同时间划分的第一力度操作数据、第二力度操作数据、第三力度操作数据、第一速度操作数据、第二速度操作数据、第三速度操作数据、第一方向操作数据、第二方向操作数据和第三方向操作数据;从而在将登录操作数据和预设登录画像数据匹配时,先依据登录操作数据的生成时间,确定与该生成时间一致的力度操作数据、速度操作数据和方向数据。当生成时间在为节假日,则所确定的力度操作数据、速度操作数据和方向操作数据分别为第一力度操作数据、第一速度操作数据和第一方向操作数据。将登录操作数据中的操作力度数据和第一力度操作数据,操作速度数据和第一速度操作数据、操作方向数据和第一方向操作数据分别对比,若三者均在各自的数据范围内,则说明登录操作数据和预设登录画像数据匹配成功,判定登录身份验证成功;当其中任意一项不在其自身对应的数据范围内,则说明登录操作数据和预设登录画像数据不匹配,可能存在登录风险,判定登录身份验证失败。Understandably, since the registered operation data includes the operation force data, the operation speed data and the operation direction data, the preset login portrait data includes the first force operation data, the second force operation data, the third force operation data divided according to different time Operation data, first speed operation data, second speed operation data, third speed operation data, first direction operation data, second direction operation data and third direction operation data; When data is matched, first, according to the generation time of the registered operation data, determine the force operation data, speed operation data and direction data that are consistent with the generation time. When the generation time is a holiday, the determined force operation data, speed operation data and direction operation data are respectively the first force operation data, the first speed operation data and the first direction operation data. Compare the operation force data in the registered operation data with the first force operation data, the operation speed data and the first speed operation data, the operation direction data and the first direction operation data respectively, if all three are within their respective data ranges, then It means that the login operation data and the default login image data match successfully, and it is determined that the login identity verification is successful; if any of them is not within its corresponding data range, it means that the login operation data does not match the default login image data, and there may be a login risk, it is determined that the login authentication has failed.

需要说明的是,考虑到对用户账户的登录操作除了通过账户密码登录之外,还可以通过指纹登录、声纹登录、虹膜登录和人脸登录等。对于该类登录方式,先采集表征用户特征的各类生物信息,形成用户特征库;后续在检测到登录时,采集用户的实时特征,判断实时特征是否存在于用户特征库中;若存在则判定登录身份验证成功,若不存在则判定登录身份验证失败。无论何种登录方式,用户账户均在登录身份验证成功后,具有向客户端发送操作指令的权限,确保了对客户端操作的安全性。It should be noted that, considering that the login operation of the user account can be performed not only through account password login, but also through fingerprint login, voiceprint login, iris login and face login, etc. For this type of login method, firstly collect all kinds of biological information that characterizes the user’s characteristics to form a user’s characteristic database; when the login is detected, collect the user’s real-time characteristics to determine whether the real-time characteristics exist in the user’s characteristic database; if so, determine The login authentication is successful. If it does not exist, it is determined that the login authentication fails. Regardless of the login method, the user account has the authority to send operation instructions to the client after successful login authentication, ensuring the security of client operations.

进一步地,在本发明数据处理方法另一实施例中,所述将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端的步骤之前包括:Further, in another embodiment of the data processing method of the present invention, before the step of sending the serial number and the operation data corresponding to the user operation instruction to the server includes:

步骤c1,读取所述预设属性标识的第一首字符、所述用户操作指令的类型标识的第二首字符、以及所述操作数据的第三首字符;Step c1, reading the first initial character of the preset attribute identifier, the second initial character of the type identifier of the user operation instruction, and the third initial character of the operation data;

本实施例客户端在将流水号和操作数据发送到服务端进行处理之前,设定有密文验证机制,以确保客户端和服务端之间的通信安全。具体地,客户端将其预设属性标识的首字符读取为第一首字符,将用户操作指令的类型标识的首字符读取为第二首字符,将操作数据的首字符读取为第三首字符;以依据该第一首字符、第二首字符和第三首字符形成用于验证的密文字符串。In this embodiment, before the client sends the serial number and operation data to the server for processing, a cipher text verification mechanism is set to ensure the communication security between the client and the server. Specifically, the client reads the first character identified by its preset attribute as the first character, reads the first character identified by the type of the user operation instruction as the second character, and reads the first character of the operation data as the first character. Three initial characters; to form a ciphertext string for verification based on the first, second, and third initial characters.

步骤c2,将所述第一首字符、第二首字符和第三首字符拼接形成字符串,并调用预设加密机制对所述字符串加密,生成密文字符串;Step c2, splicing the first character, the second character and the third character to form a character string, and calling a preset encryption mechanism to encrypt the character string to generate a ciphertext character string;

进一步地,将读取的第一首字符、第二首字符和第三首字符进行拼接形成字符串,其中拼接可依据英文字母表中各字母的排列顺序,对第一首字符、第二首字符和第三首字符进行排列,形成字符串。如预设属性标识为ads、类型标识为cdw、操作数据为blk,则读取各自的首字符进行排列,得到的字符串为a-b-c。同时,客户端和服务端之间预先约定有加密机制,且加密机制可以是对称加密也可以是非对称加密,对此不做限定。客户端对预设加密机制进行调用,并通过该预设加密机制对字符串进行加密,得到密文字符串。Further, the read first character, the second character and the third character are spliced to form a character string, wherein splicing can be based on the order of the letters in the English alphabet, the first character, the second character characters and the third first character are arranged to form a string. If the default attribute identifier is ads, the type identifier is cdw, and the operation data is blk, read the first characters of each and arrange them, and the obtained string is a-b-c. At the same time, there is an encryption mechanism pre-agreed between the client and the server, and the encryption mechanism can be symmetric encryption or asymmetric encryption, which is not limited. The client calls the preset encryption mechanism, and encrypts the character string through the preset encryption mechanism to obtain the ciphertext string.

步骤c3,将所述密文字符串发送到服务端,并接收所述服务端反馈的解密结果;Step c3, sending the ciphertext string to the server, and receiving a decryption result fed back by the server;

更进一步地,客户端将所生成的密文字符串发送到客户端,发送时可将生成的密文字符串添加到http请求的header中,http的header通常包括general header、requestheader、response header、entity header四个部分,将密文字符串添加到其中和http一并发送到服务端,以进行通信验证。Furthermore, the client sends the generated ciphertext string to the client. When sending, the generated ciphertext string can be added to the header of the http request. The header of http usually includes general header, requestheader, response header, The entity header has four parts, and the ciphertext string is added to it and sent to the server together with http for communication verification.

服务端在接收到http请求后,对其中的header进行读取,header中的各部分之间具有明确的分隔符,可通过分隔符确定其中的general header、request header、responseheader和entity header,而对于除此四部分之外的内容即为密文字符串。通过分隔符从header中分离出密文字符串,再用预先约定的加密机制对密文字符串进行解密处理,得到解密结果。服务端将解密结果返回到客户端,由客户端对解密结果进行接收,并在判定出其正确无误后向服务端发送流水号和操作数据。After the server receives the HTTP request, it reads the header. There are clear separators between the parts in the header. The general header, request header, response header and entity header can be determined through the separator. For The content other than these four parts is the ciphertext string. The ciphertext string is separated from the header by the delimiter, and then the ciphertext string is decrypted using the pre-agreed encryption mechanism to obtain the decryption result. The server returns the decryption result to the client, and the client receives the decryption result, and sends the serial number and operation data to the server after determining that it is correct.

步骤c4,判断所述解密结果是否为正确结果,若为正确结果,则执行将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端的步骤。Step c4, judging whether the decryption result is a correct result, and if it is a correct result, perform the step of sending the serial number and the operation data corresponding to the user operation instruction to the server.

进一步地,客户端在接收到解密数据后,对其正确性进行判断;该判断过程可通过判断解密结果是否为乱码,且该解密结果与客户端所生成的字符串是否一致进行。若解密结果不为乱码且和字符串一致,则说明解密成功,解密结果为正确结果;否则解密失败,解密结果不是正确结果。在判断出解密成功,解密结果为正确结果后,客户端将流水号和由操作指令所生成的操作数据发送到服务端,以供服务端进行处理;本实施例通过设定密文验证机制,在将流水号和操作数据发送到服务端进行处理之前,进行通信验证,确保了客户端与服务端之间以及数据传输的安全性。Further, after receiving the decrypted data, the client judges its correctness; the judging process can be carried out by judging whether the decrypted result is garbled, and whether the decrypted result is consistent with the string generated by the client. If the decryption result is not garbled and consistent with the character string, then the decryption is successful and the decryption result is correct; otherwise, the decryption fails and the decryption result is not correct. After judging that the decryption is successful and the decryption result is correct, the client sends the serial number and the operation data generated by the operation command to the server for processing by the server; in this embodiment, by setting the ciphertext verification mechanism, Before the serial number and operation data are sent to the server for processing, communication verification is performed to ensure the security of the client and the server and the data transmission.

此外,请参照图2,本发明提供一种数据处理装置,在本发明数据处理装置第一实施例中,所述数据处理装置包括:In addition, referring to FIG. 2, the present invention provides a data processing device. In the first embodiment of the data processing device of the present invention, the data processing device includes:

生成模块10,用于当侦测到用户操作指令时,根据预设属性标识和所述用户操作指令的类型标识生成流水号;A generating module 10, configured to generate a serial number according to a preset attribute identifier and a type identifier of the user operation instruction when a user operation instruction is detected;

发送模块20,用于将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端,以供所述服务端基于所述流水号对所述操作数据进行处理;A sending module 20, configured to send the serial number and the operation data corresponding to the user operation instruction to the server, so that the server can process the operation data based on the serial number;

接收模块30,用于接收所述服务端针对所述操作数据反馈的处理结果标识,并在所述处理结果标识为异常标识时,对所述操作数据进行恢复。The receiving module 30 is configured to receive a processing result identifier fed back by the server for the operation data, and restore the operation data when the processing result identifier is an abnormal identifier.

本实施例的数据处理装置,当侦测到用户操作指令时,生成模块10先根据预设属性标识和用户操作指令的类型标识生成流水号;发送模块20再将流水号以及与用户操作指令对应的操作数据发送到服务端,以通过服务端基于流水号对操作数据进行处理;此后接收模块30接收服务端针对该操作数据处理所反馈的处理结果标识,并在处理结果标识为异常标识时,对操作数据进行恢复。本方案中针对操作数据设定恢复机制,在服务端处理操作数据失败时返回异常标识的处理结果标识,依据该异常标识将操作数据恢复为原状态,避免了因服务端对操作数据的处理失败而引起与服务端通信的其他通信方对操作数据处理的异常;因应用于微服务架构中的服务端具有相对性,在一些场合为服务端,在另一些场合则可能为客户端;从而本方案中服务端对操作数据的处理异常,代表了各通信方对操作数据的处理异常,在通信过程中只要出现通信方对操作数据的处理异常,均可进行恢复,确保了各通信方之间操作数据的正确性。In the data processing device of this embodiment, when a user operation instruction is detected, the generation module 10 first generates a serial number according to the preset attribute identifier and the type identifier of the user operation instruction; the sending module 20 then corresponds the serial number and the user operation instruction The operation data of the operation data is sent to the server, so that the operation data is processed by the server based on the serial number; after that, the receiving module 30 receives the processing result identification fed back by the server for the operation data processing, and when the processing result is identified as an abnormal identification, Restore the operational data. In this solution, a recovery mechanism is set for the operation data. When the server fails to process the operation data, it returns the processing result identification of the abnormal identification. According to the abnormal identification, the operation data is restored to the original state, avoiding the failure of the server to process the operation data. And cause other communication parties communicating with the server to process abnormal data; because the server used in the microservice architecture is relative, it may be the server in some occasions, and may be the client in other occasions; thus this In the scheme, the server’s abnormal processing of operation data represents the abnormal processing of operation data by each communication party. During the communication process, as long as the communication party’s processing of operation data is abnormal, it can be recovered, ensuring that communication between communication parties The correctness of the operation data.

进一步地,在本发明数据处理装置另一实施例中,所述数据处理装置还包括:Further, in another embodiment of the data processing device of the present invention, the data processing device further includes:

查找模块,用于对预设流水表进行调用,并查找所述预设流水表中的空白数据列,判断排列在所述空白数据列上一顺序位置的上一数据列中是否存在数据;The search module is used to call the preset flow table, and search for the blank data column in the preset flow table, and judge whether there is data in the previous data column arranged in the previous sequential position of the blank data column;

插入模块,用于若所述上一数据列中存在数据,则将所述流水号插入到所述空白数据列中,并将所述流水号的初始状态设定为待处理。An insertion module, configured to insert the serial number into the blank data column if there is data in the last data column, and set the initial state of the serial number as pending.

进一步地,在本发明数据处理装置另一实施例中,所述接收模块还包括:Further, in another embodiment of the data processing device of the present invention, the receiving module further includes:

修改单元,用于当接收到所述服务端针对所述操作数据反馈的处理结果标识时,根据所述处理结果标识,对所述初始状态进行修改;A modifying unit, configured to modify the initial state according to the processing result identifier when receiving the processing result identifier fed back by the server for the operation data;

处理单元,用于当所述初始状态修改为处理成功的正常标识时,根据所述类型标识和与所述处理结果标识对应的处理结果,对所述操作数据进行处理;A processing unit, configured to process the operation data according to the type identifier and the processing result corresponding to the processing result identifier when the initial state is modified to a normal identifier of successful processing;

恢复单元,用于当所述初始状态修改为处理失败的异常标识时,根据与所述处理结果标识对应的处理结果,对所述操作数据进行恢复。A restoration unit, configured to restore the operation data according to the processing result corresponding to the processing result flag when the initial state is modified to an exception flag of processing failure.

进一步地,在本发明数据处理装置另一实施例中,所述数据处理装置还包括:Further, in another embodiment of the data processing device of the present invention, the data processing device further includes:

采集模块,用于接收与所述用户操作指令对应用户账户的登录请求,并采集与所述登录请求对应的登录操作数据,将所述登录操作数据和预设登录画像数据匹配;A collection module, configured to receive a login request for a user account corresponding to the user operation instruction, and collect login operation data corresponding to the login request, and match the login operation data with preset login portrait data;

完成模块,用于当所述登录操作数据和预设登录画像数据匹配成功时,完成所述用户账户的登录,以基于所述用户账户发送所述用户操作指令。A completion module, configured to complete the login of the user account when the login operation data and the preset login portrait data are successfully matched, so as to send the user operation instruction based on the user account.

进一步地,在本发明数据处理装置另一实施例中,所述数据处理装置还包括:Further, in another embodiment of the data processing device of the present invention, the data processing device further includes:

收集模块,用于收集基于所述用户账户生成的历史操作数据,并将各所述历史操作数据划分为力度操作数据、速度操作数据和方向操作数据;A collection module, configured to collect historical operation data generated based on the user account, and divide each of the historical operation data into strength operation data, speed operation data and direction operation data;

第一划分模块,用于根据各所述历史操作数据的生成时间,将各所述力度操作数据划分为第一力度操作数据、第二力度操作数据和第三力度操作数据,并将各所述速度操作数据划分为第一速度操作数据、第二速度操作数据和第三速度操作数据;The first dividing module is used to divide each of the strength operation data into first strength operation data, second strength operation data and third strength operation data according to the generation time of each of the historical operation data, and divide each of the strength operation data The speed operation data is divided into first speed operation data, second speed operation data and third speed operation data;

第二划分模块,用于根据各所述历史操作数据的生成时间,将各所述方向操作数据划分为第一方向操作数据、第二方向操作数据和第三方向操作数据;The second dividing module is used to divide each of the directional operation data into first directional operation data, second directional operation data and third directional operation data according to the generation time of each of the historical operation data;

形成模块,用于将所述第一力度操作数据、第二力度操作数据、第三力度操作数据、第一速度操作数据、第二速度操作数据、第三速度操作数据、第一方向操作数据、第二方向操作数据和第三方向操作数据设为用户账户的登录标签,与所述用户账户形成关联关系,生成所述用户账户的预设登录画像数据。Forming a module for combining the first force operation data, the second force operation data, the third force operation data, the first speed operation data, the second speed operation data, the third speed operation data, the first direction operation data, The second direction operation data and the third direction operation data are set as login tags of the user account, form an association relationship with the user account, and generate preset login portrait data of the user account.

进一步地,在本发明数据处理装置另一实施例中,所述数据处理装置还包括:Further, in another embodiment of the data processing device of the present invention, the data processing device further includes:

第一读取模块,用于读取与所述用户操作指令对应用户账户的权限标识,并调用预设的指令与权限之间的映射关系;The first reading module is used to read the authority identifier of the user account corresponding to the user operation instruction, and call the preset mapping relationship between the instruction and the authority;

第一判断模块,用于根据所述映射关系,判断所述用户账户是否具有触发所述用户操作指令的操作权限;A first judging module, configured to judge whether the user account has the operation authority to trigger the user operation instruction according to the mapping relationship;

执行模块,用于若具有触发所述用户操作指令的操作权限,则执行根据预设属性标识和所述用户操作指令的类型标识生成流水号的步骤。The execution module is configured to execute the step of generating a serial number according to the preset attribute identifier and the type identifier of the user operation instruction if it has the operation authority to trigger the user operation instruction.

进一步地,在本发明数据处理装置另一实施例中,所述数据处理装置还包括:Further, in another embodiment of the data processing device of the present invention, the data processing device further includes:

第二读取模块,用于读取所述预设属性标识的第一首字符、所述用户操作指令的类型标识的第二首字符、以及所述操作数据的第三首字符;A second reading module, configured to read the first initial character of the preset attribute identifier, the second initial character of the type identifier of the user operation instruction, and the third initial character of the operation data;

调用模块,用于将所述第一首字符、第二首字符和第三首字符拼接形成字符串,并调用预设加密机制对所述字符串加密,生成密文字符串;Calling a module for splicing the first character, the second character and the third character to form a character string, and calling a preset encryption mechanism to encrypt the character string to generate a ciphertext character string;

传输模块,用于将所述密文字符串发送到服务端,并接收所述服务端反馈的解密结果;A transmission module, configured to send the ciphertext string to the server, and receive a decryption result fed back by the server;

第二判断模块,用于判断所述解密结果是否为正确结果,若为正确结果,则执行将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端的步骤。The second judging module is used to judge whether the decryption result is a correct result, and if it is a correct result, execute the step of sending the serial number and the operation data corresponding to the user operation instruction to the server.

其中,上述数据处理装置的各虚拟功能模块存储于图3所示数据处理设备的存储器1005中,处理器1001执行数据处理程序时,实现图2所示实施例中各个模块的功能。Wherein, each virtual function module of the above-mentioned data processing apparatus is stored in the memory 1005 of the data processing device shown in FIG. 3 . When the processor 1001 executes the data processing program, the functions of each module in the embodiment shown in FIG. 2 are realized.

参照图3,图3是本发明实施例方法涉及的硬件运行环境的设备结构示意图。Referring to FIG. 3 , FIG. 3 is a schematic diagram of a device structure of a hardware operating environment involved in a method according to an embodiment of the present invention.

本发明实施例数据处理设备可以是PC(personal computer,个人计算机),也可以是智能手机、平板电脑、电子书阅读器、便携计算机等终端设备。The data processing device in this embodiment of the present invention may be a PC (personal computer, personal computer), or may be a terminal device such as a smart phone, a tablet computer, an e-book reader, or a portable computer.

如图3所示,该数据处理设备可以包括:处理器1001,例如CPU(CentralProcessing Unit,中央处理器),存储器1005,通信总线1002。其中,通信总线1002用于实现处理器1001和存储器1005之间的连接通信。存储器1005可以是高速RAM(random accessmemory,随机存取存储器),也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 3 , the data processing device may include: a processor 1001 , such as a CPU (Central Processing Unit, central processing unit), a memory 1005 , and a communication bus 1002 . Wherein, the communication bus 1002 is used to realize connection and communication between the processor 1001 and the memory 1005 . The memory 1005 may be a high-speed RAM (random access memory, random access memory), or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001 .

可选地,该数据处理设备还可以包括用户接口、网络接口、摄像头、RF(RadioFrequency,射频)电路,传感器、音频电路、WiFi(Wireless Fidelity,无线宽带)模块等等。用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口还可以包括标准的有线接口、无线接口。网络接口可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。Optionally, the data processing device may further include a user interface, a network interface, a camera, an RF (Radio Frequency, radio frequency) circuit, a sensor, an audio circuit, a WiFi (Wireless Fidelity, wireless broadband) module, and the like. The user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), and an optional user interface may also include a standard wired interface and a wireless interface. Optionally, the network interface may include a standard wired interface and a wireless interface (such as a WI-FI interface).

本领域技术人员可以理解,图3中示出的数据处理设备结构并不构成对数据处理设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the data processing equipment shown in Figure 3 does not constitute a limitation on the data processing equipment, and may include more or less components than those shown in the illustration, or combine certain components, or different components layout.

如图3所示,作为一种计算机可读存储介质的存储器1005中可以包括操作系统、网络通信模块以及数据处理程序。操作系统是管理和控制数据处理设备硬件和软件资源的程序,支持数据处理程序以及其它软件和/或程序的运行。网络通信模块用于实现存储器1005内部各组件之间的通信,以及与数据处理设备中其它硬件和软件之间通信。As shown in FIG. 3 , the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, and a data processing program. An operating system is a program that manages and controls hardware and software resources of a data processing device, and supports the operation of data processing programs and other software and/or programs. The network communication module is used to realize the communication between various components inside the memory 1005, and communicate with other hardware and software in the data processing device.

在图3所示的数据处理设备中,处理器1001用于执行存储器1005中存储的数据处理程序,实现上述数据处理方法各实施例中的步骤。In the data processing device shown in FIG. 3 , the processor 1001 is configured to execute the data processing program stored in the memory 1005 to implement the steps in the above embodiments of the data processing method.

本发明提供了一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序还可被一个或者一个以上的处理器执行以用于实现上述数据处理方法各实施例中的步骤。The present invention provides a computer-readable storage medium, the computer-readable storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to realize the above-mentioned Steps in each embodiment of the data processing method.

还需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should also be noted that, herein, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements , but also includes other elements not expressly listed, or also includes elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个计算机可读存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a computer-readable storage medium as described above (such as ROM/RAM, magnetic disk, optical disk), including several instructions to enable a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.

以上所述仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是在本发明的构思下,利用本发明说明书及附图内容所作的等效结构变换,或直接/间接运用在其他相关的技术领域均包括在本发明的专利保护范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Under the conception of the present invention, the equivalent structural transformation made by using the description of the present invention and the contents of the accompanying drawings, or directly/indirectly used in Other relevant technical fields are included in the patent protection scope of the present invention.

Claims (10)

1.一种数据处理方法,其特征在于,所述数据传输方法包括以下步骤:1. A data processing method, characterized in that, the data transmission method comprises the following steps: 当侦测到用户操作指令时,根据预设属性标识和所述用户操作指令的类型标识生成流水号;When a user operation instruction is detected, a serial number is generated according to the preset attribute identifier and the type identifier of the user operation instruction; 将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端,以供所述服务端基于所述流水号对所述操作数据进行处理;sending the serial number and the operation data corresponding to the user operation instruction to the server, so that the server can process the operation data based on the serial number; 接收所述服务端针对所述操作数据反馈的处理结果标识,并在所述处理结果标识为异常标识时,对所述操作数据进行恢复。Receiving a processing result identifier fed back by the server for the operation data, and recovering the operation data when the processing result identifier is an abnormality identifier. 2.如权利要求1所述的数据处理方法,其特征在于,所述根据所述客户端的属性标识和所述用户操作指令的类型标识生成流水号的步骤之后包括:2. The data processing method according to claim 1, characterized in that, after the step of generating the serial number according to the attribute identifier of the client and the type identifier of the user operation instruction comprises: 对预设流水表进行调用,并查找所述预设流水表中的空白数据列,判断排列在所述空白数据列上一顺序位置的上一数据列中是否存在数据;Calling the preset flow table, and searching for the blank data column in the preset flow table, and judging whether there is data in the previous data column arranged in the previous sequential position of the blank data column; 若所述上一数据列中存在数据,则将所述流水号插入到所述空白数据列中,并将所述流水号的初始状态设定为待处理。If there is data in the previous data column, insert the serial number into the blank data column, and set the initial state of the serial number as pending. 3.如权利要求2所述的数据处理方法,其特征在于,所述接收所述服务端针对所述操作数据反馈的处理结果标识,并在所述处理结果标识为异常标识时,对所述操作数据进行恢复的步骤包括:3. The data processing method according to claim 2, characterized in that, receiving the processing result identification fed back by the server for the operation data, and when the processing result identification is an abnormal identification, the The steps to manipulate data for recovery include: 当接收到所述服务端针对所述操作数据反馈的处理结果标识时,根据所述处理结果标识,对所述初始状态进行修改;When receiving the processing result identifier fed back by the server for the operation data, modify the initial state according to the processing result identifier; 当所述初始状态修改为处理成功的正常标识时,根据所述类型标识和与所述处理结果标识对应的处理结果,对所述操作数据进行处理;When the initial state is modified to a normal flag indicating successful processing, process the operation data according to the type flag and the processing result corresponding to the processing result flag; 当所述初始状态修改为处理失败的异常标识时,根据与所述处理结果标识对应的处理结果,对所述操作数据进行恢复。When the initial state is modified to an exception flag of processing failure, the operation data is recovered according to a processing result corresponding to the processing result flag. 4.如权利要求1所述的数据处理方法,其特征在于,所述当侦测到用户操作指令时,根据所述客户端的属性标识和所述用户操作指令的类型标识生成流水号的步骤之前包括:4. The data processing method according to claim 1, wherein when a user operation instruction is detected, before the step of generating a serial number according to the attribute identifier of the client and the type identifier of the user operation instruction include: 接收与所述用户操作指令对应用户账户的登录请求,并采集与所述登录请求对应的登录操作数据,将所述登录操作数据和预设登录画像数据匹配;receiving a login request of a user account corresponding to the user operation instruction, collecting login operation data corresponding to the login request, and matching the login operation data with preset login portrait data; 当所述登录操作数据和预设登录画像数据匹配成功时,完成所述用户账户的登录,以基于所述用户账户发送所述用户操作指令。When the login operation data and the preset login portrait data are successfully matched, the login of the user account is completed, so as to send the user operation instruction based on the user account. 5.如权利要求4所述的数据处理方法,其特征在于,所述接收与所述用户操作指令对应用户账户的登录请求的步骤之前包括:5. The data processing method according to claim 4, characterized in that before the step of receiving the login request of the user account corresponding to the user operation instruction comprises: 收集基于所述用户账户生成的历史操作数据,并将各所述历史操作数据划分为力度操作数据、速度操作数据和方向操作数据;collecting historical operation data generated based on the user account, and dividing each of the historical operation data into strength operation data, speed operation data and direction operation data; 根据各所述历史操作数据的生成时间,将各所述力度操作数据划分为第一力度操作数据、第二力度操作数据和第三力度操作数据,并将各所述速度操作数据划分为第一速度操作数据、第二速度操作数据和第三速度操作数据;According to the generation time of each of the historical operation data, each of the strength operation data is divided into the first strength operation data, the second strength operation data and the third strength operation data, and each of the speed operation data is divided into the first speed operation data, second speed operation data and third speed operation data; 根据各所述历史操作数据的生成时间,将各所述方向操作数据划分为第一方向操作数据、第二方向操作数据和第三方向操作数据;According to the generation time of each of the historical operation data, each of the directional operation data is divided into the first directional operation data, the second directional operation data and the third directional operation data; 将所述第一力度操作数据、第二力度操作数据、第三力度操作数据、第一速度操作数据、第二速度操作数据、第三速度操作数据、第一方向操作数据、第二方向操作数据和第三方向操作数据设为用户账户的登录标签,与所述用户账户形成关联关系,生成所述用户账户的预设登录画像数据。The first force operation data, the second force operation data, the third force operation data, the first speed operation data, the second speed operation data, the third speed operation data, the first direction operation data, and the second direction operation data and the third-direction operation data are set as login tags of the user account, form an association relationship with the user account, and generate preset login portrait data of the user account. 6.如权利要求1所述的数据处理方法,其特征在于,所述根据预设属性标识和所述用户操作指令的类型标识生成流水号的步骤之前包括:6. The data processing method according to claim 1, wherein the step of generating the serial number according to the preset attribute identifier and the type identifier of the user operation instruction comprises before: 读取与所述用户操作指令对应用户账户的权限标识,并调用预设的指令与权限之间的映射关系;Read the authority identifier of the user account corresponding to the user operation instruction, and call the preset mapping relationship between the instruction and the authority; 根据所述映射关系,判断所述用户账户是否具有触发所述用户操作指令的操作权限;According to the mapping relationship, determine whether the user account has the operation authority to trigger the user operation instruction; 若具有触发所述用户操作指令的操作权限,则执行根据预设属性标识和所述用户操作指令的类型标识生成流水号的步骤。If the user has the operation authority to trigger the user operation instruction, execute the step of generating a serial number according to the preset attribute identifier and the type identifier of the user operation instruction. 7.如权利要求1-5任一项所述的数据处理方法,其特征在于,所述将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端的步骤之前包括:7. The data processing method according to any one of claims 1-5, wherein the step of sending the serial number and the operation data corresponding to the user operation instruction to the server includes: 读取所述预设属性标识的第一首字符、所述用户操作指令的类型标识的第二首字符、以及所述操作数据的第三首字符;Read the first initial character of the preset attribute identifier, the second initial character of the type identifier of the user operation instruction, and the third initial character of the operation data; 将所述第一首字符、第二首字符和第三首字符拼接形成字符串,并调用预设加密机制对所述字符串加密,生成密文字符串;Splicing the first character, the second character and the third character to form a character string, and calling a preset encryption mechanism to encrypt the character string to generate a ciphertext character string; 将所述密文字符串发送到服务端,并接收所述服务端反馈的解密结果;Send the ciphertext string to the server, and receive the decryption result fed back by the server; 判断所述解密结果是否为正确结果,若为正确结果,则执行将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端的步骤。It is judged whether the decryption result is a correct result, and if it is a correct result, the step of sending the serial number and the operation data corresponding to the user operation instruction to the server is executed. 8.一种数据处理装置,其特征在于,所述数据处理装置包括:8. A data processing device, characterized in that the data processing device comprises: 生成模块,用于当侦测到用户操作指令时,根据预设属性标识和所述用户操作指令的类型标识生成流水号;A generating module, configured to generate a serial number according to a preset attribute identifier and a type identifier of the user operation instruction when a user operation instruction is detected; 发送模块,用于将所述流水号以及与所述用户操作指令对应的操作数据发送到服务端,以供所述服务端基于所述流水号对所述操作数据进行处理;A sending module, configured to send the serial number and the operation data corresponding to the user operation instruction to the server, so that the server can process the operation data based on the serial number; 接收模块,用于接收所述服务端针对所述操作数据反馈的处理结果标识,并在所述处理结果标识为异常标识时,对所述操作数据进行恢复。The receiving module is configured to receive a processing result identifier fed back by the server for the operation data, and restore the operation data when the processing result identifier is an abnormal identifier. 9.一种数据处理设备,其特征在于,所述数据处理设备包括:存储器、处理器、通信总线以及存储在所述存储器上的数据处理程序;9. A data processing device, characterized in that the data processing device comprises: a memory, a processor, a communication bus, and a data processing program stored in the memory; 所述通信总线用于实现处理器和存储器之间的连接通信;The communication bus is used to realize connection and communication between the processor and the memory; 所述处理器用于执行所述数据处理程序,以实现如权利要求1-7中任一项所述的数据处理方法的步骤。The processor is configured to execute the data processing program, so as to realize the steps of the data processing method according to any one of claims 1-7. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有数据处理程序,所述数据处理程序被处理器执行时实现如权利要求1-7中任一项所述的数据处理方法的步骤。10. A computer-readable storage medium, characterized in that a data processing program is stored on the computer-readable storage medium, and when the data processing program is executed by a processor, it realizes any one of claims 1-7. The steps of the data processing method described above.
CN201910608901.1A 2019-07-05 2019-07-05 Data processing method, device, equipment and computer readable storage medium Pending CN110489253A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910608901.1A CN110489253A (en) 2019-07-05 2019-07-05 Data processing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910608901.1A CN110489253A (en) 2019-07-05 2019-07-05 Data processing method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110489253A true CN110489253A (en) 2019-11-22

Family

ID=68545940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910608901.1A Pending CN110489253A (en) 2019-07-05 2019-07-05 Data processing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110489253A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112911013A (en) * 2021-02-20 2021-06-04 百度在线网络技术(北京)有限公司 Cloud application processing method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996855A (en) * 2006-12-22 2007-07-11 中国建设银行股份有限公司 A method and system for keeping data consistency
CN102325062A (en) * 2011-09-20 2012-01-18 北京神州绿盟信息安全科技股份有限公司 Abnormal login detecting method and device
JP2017167842A (en) * 2016-03-16 2017-09-21 株式会社日立製作所 Transaction control system and transaction control method
CN107657156A (en) * 2017-09-30 2018-02-02 北京梆梆安全科技有限公司 User ID authentication method and device based on user operation habits and contact pressure area
CN109376155A (en) * 2018-11-06 2019-02-22 泰康保险集团股份有限公司 ID generation method and device, storage medium and electronic equipment
CN109460644A (en) * 2018-10-22 2019-03-12 平安科技(深圳)有限公司 A kind of determination method and apparatus of user right

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996855A (en) * 2006-12-22 2007-07-11 中国建设银行股份有限公司 A method and system for keeping data consistency
CN102325062A (en) * 2011-09-20 2012-01-18 北京神州绿盟信息安全科技股份有限公司 Abnormal login detecting method and device
JP2017167842A (en) * 2016-03-16 2017-09-21 株式会社日立製作所 Transaction control system and transaction control method
CN107657156A (en) * 2017-09-30 2018-02-02 北京梆梆安全科技有限公司 User ID authentication method and device based on user operation habits and contact pressure area
CN109460644A (en) * 2018-10-22 2019-03-12 平安科技(深圳)有限公司 A kind of determination method and apparatus of user right
CN109376155A (en) * 2018-11-06 2019-02-22 泰康保险集团股份有限公司 ID generation method and device, storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112911013A (en) * 2021-02-20 2021-06-04 百度在线网络技术(北京)有限公司 Cloud application processing method and device, computer equipment and storage medium
CN112911013B (en) * 2021-02-20 2023-05-16 百度在线网络技术(北京)有限公司 Cloud application processing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US11270306B2 (en) Asset management method and apparatus, and electronic device
KR102396739B1 (en) Asset management method and apparatus, and electronic device
US10387856B2 (en) Online payment method, system, and apparatus
EP2826202B1 (en) Mobile human challenge-response test
US20160321745A1 (en) Account binding processing method, apparatus and system
US20240163279A1 (en) Systems and methods for securing login access
WO2020181809A1 (en) Data processing method and system based on interface checking, and computer device
CN112559993A (en) Identity authentication method, device and system and electronic equipment
KR102144509B1 (en) Proximity communication method and apparatus
CN112468409A (en) Access control method, device, computer equipment and storage medium
CN113609147B (en) Data sharing method and device and electronic equipment
CN114238883A (en) An authentication method, device, device and storage medium
CN105072608A (en) A method and device for managing authentication tokens
CN114625756A (en) Data query method and device and server
WO2016138743A1 (en) Secure payment method, mobile terminal, and payment authentication server
CN108574658B (en) Application login method and device
CN114222288A (en) Equipment identifier generation method, equipment identifier verification method and device
CN110489253A (en) Data processing method, device, equipment and computer readable storage medium
CN110943982B (en) Document data encryption method and device, electronic equipment and storage medium
CN118316718A (en) Data processing method, device, storage medium and computer equipment
CN106161365B (en) Data processing method and device and terminal
CN109872148B (en) Trusted data processing method and device based on TUI and mobile terminal
US12021862B2 (en) Information processing device, control method for information processing device, and recording medium
JP2015153227A (en) Payment or transfer processing method, payment or transfer processing program, and payment or transfer processing apparatus
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191122

RJ01 Rejection of invention patent application after publication