Blockchain-based data processing method, device and computer equipment
Patent Information
- Application Number
- CN202210462020.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-28
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2042-04-28
AI Technical Summary
[0003]由于建筑行业具有环节多、层级多、人员多等特点,这些特点往往会带来员工信息统计混乱、用工薪资支付繁琐等问题,这些问题往往会造成相关技术无法准确有效地将资源分发至执行建筑项目中各任务的员工对应的账户中,从而不利于提高服务器对资源的处理效率
[0024]上述基于区块链的数据处理方法、装置、计算机设备、存储介质和计算机程序产品,若检测到目标对象进入目标区域以执行目标任务,通过获取目标对象在执行目标任务时产生的实际行为数据,并在区块链上调用在目标对象执行目标任务前预生成的智能合约;该智能合约声明了目标任务对应的至少一个异常行为认定条件,以及满足各异常行为认定条件的异常行为数据对应的虚拟资源扣减量;判断实际行为数据是否满足各异常行为认定条件,确定实际行为数据中的至少一个异常行为数据;并根据至少一个异常行为数据对应的虚拟资源扣减量,生成虚拟资源扣减消息;虚拟资源扣减消息用于被广播至区块链所处的区块链网络;区块链网络中的至少一个节点用于根据虚拟资源扣减消息确定实际转移至目标对象的虚拟资源数量,提高服务器的资源处理效率。如此,可以实现根据区块链中不可篡改的智能合约,准确地识别出目标对象执行目标任务时的异常行为数据,并基于该异常行为数据去确定实际转移至目标对象的虚拟资源数量,有效地对任务执行信息和对目标对象的虚拟资源扣减量进行统计,实现了链路全程封闭、信息实时共享、数据不可篡改、薪资自动流转等功能。可以有效解决了由于目标任务环节多、层级多而造成的任务执行信息如,用工信息统计混乱,有效地提高了任务执行信息的统计效率与准确性,进而有效且准确地确定出实际转移至目标对象的虚拟资源数量,提高服务器对虚拟资源的处理效率。
Smart Images

Figure CN115688155B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to a blockchain-based data processing method, apparatus, computer equipment, storage medium, and computer program product. Background Technology
[0002] A blockchain is essentially a chain of blocks. Each block contains specific information, and these blocks are linked together in chronological order of their creation. This chain is stored on various servers, and as long as at least one server in the system is operational, the entire blockchain is secure. These servers are called nodes in the blockchain system, and they provide storage space and computing power for the entire system.
[0003] Because the construction industry has many stages, levels, and personnel, these characteristics often lead to problems such as chaotic employee information statistics and cumbersome wage payments. These problems often prevent related technologies from accurately and effectively distributing resources to the accounts of employees performing various tasks in the construction project, thus hindering the improvement of server efficiency in processing resources. Summary of the Invention
[0004] Therefore, it is necessary to provide a blockchain-based data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the resource processing efficiency of servers, addressing the aforementioned technical problems.
[0005] Firstly, this application provides a blockchain-based data processing method, the method comprising:
[0006] If a target object is detected entering the target area to perform a target task, the actual behavior data generated by the target object while performing the target task is obtained;
[0007] A smart contract pre-generated on the blockchain is invoked before the target object executes the target task; the smart contract declares at least one abnormal behavior identification condition corresponding to the target task, and the virtual resource deduction amount corresponding to the abnormal behavior data that satisfies each of the abnormal behavior identification conditions;
[0008] Determine whether the actual behavior data meets each of the abnormal behavior identification conditions, and identify at least one abnormal behavior data among the actual behavior data;
[0009] A virtual resource deduction message is generated based on the virtual resource deduction amount corresponding to the at least one abnormal behavior data; the virtual resource deduction message is used to be broadcast to the blockchain network where the blockchain is located; at least one node in the blockchain network is used to determine the actual amount of virtual resources transferred to the target object based on the virtual resource deduction message.
[0010] In one embodiment, a data acquisition device is provided on the target object, and the step of acquiring the actual behavior data generated by the target object when performing the target task includes: receiving target object data collected by the data acquisition device for the target object; the target object data includes at least one of location data, action data and heart rate data; and inputting the target object data into a pre-trained behavior recognition neural network to obtain the actual behavior data corresponding to the target object.
[0011] In one embodiment, before the step of obtaining the actual behavioral data generated by the target object when performing the target task, the method further includes: in response to the target object's request to enter the target area, authenticating the target object to obtain the target object's identity information; if a smart contract corresponding to the target object's identity information exists, generating a first prompt message allowing the target object to enter the target area; if no smart contract corresponding to the target object's identity information exists, generating a second prompt message prohibiting the target object from entering the target area.
[0012] In one embodiment, after obtaining the identity information of the target object, the method further includes: sending a smart contract query request carrying the identity information to any network node in the blockchain network corresponding to the blockchain; the smart contract query request is used to instruct the any network node to obtain the employment information ledger corresponding to the target task; and querying the employment information ledger to find a smart contract corresponding to the identity information, thereby obtaining a smart contract query result; receiving a message carrying the smart contract query result, and determining that a smart contract corresponding to the identity information of the target object exists.
[0013] In one embodiment, if a smart contract corresponding to the identity information of the target object exists, the method further includes: if the target object is detected to enter the target area for the first time, the smart contract that is inactive is set to an active state.
[0014] In one embodiment, the step of authenticating the target object in response to the target object's request to enter the target area includes: acquiring a facial image of the target object through a target image acquisition device in response to the target object's request to enter the target area; the target image acquisition device being installed at a gate device at the entrance of the target area; and performing identity authentication processing on the facial image to determine the identity information of the target object.
[0015] In one embodiment, the smart contract further declares the abnormal execution duration determination conditions corresponding to the target task, and the target virtual resource deduction amount corresponding to satisfying the abnormal execution duration determination conditions. The step of generating a virtual resource deduction message based on the virtual resource deduction amount corresponding to the at least one abnormal behavior data includes: upon detecting that the target object leaves the target area, obtaining the duration of the target object in the target area to obtain the area stay duration; if the area stay duration does not satisfy the abnormal execution duration determination conditions, then generating the virtual resource deduction message based on the target virtual resource deduction amount and the virtual resource deduction amount corresponding to the at least one abnormal behavior data.
[0016] Secondly, this application provides a blockchain-based data processing device, the device comprising:
[0017] The acquisition module is used to acquire actual behavior data generated by the target object when it is executing the target task if it is detected that the target object enters the target area to execute the target task.
[0018] The calling module is used to call a smart contract pre-generated on the blockchain before the target object executes the target task; the smart contract declares at least one abnormal behavior identification condition corresponding to the target task, and the virtual resource deduction amount corresponding to the abnormal behavior data that satisfies each of the abnormal behavior identification conditions;
[0019] The determination module is used to determine whether the actual behavior data meets each of the abnormal behavior identification conditions, and to determine at least one abnormal behavior data in the actual behavior data.
[0020] A generation module is used to generate a virtual resource deduction message based on the virtual resource deduction amount corresponding to the at least one abnormal behavior data; the virtual resource deduction message is used to be broadcast to the blockchain network where the blockchain is located; at least one node in the blockchain network is used to determine the actual amount of virtual resources transferred to the target object based on the virtual resource deduction message.
[0021] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, implements the steps of the method described above.
[0022] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.
[0023] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the above-described method.
[0024] The aforementioned blockchain-based data processing method, apparatus, computer equipment, storage medium, and computer program product, upon detecting that a target object has entered a target area to execute a target task, acquires actual behavioral data generated by the target object during the execution of the target task and invokes a smart contract pre-generated before the target object executes the target task on the blockchain. This smart contract declares at least one abnormal behavior identification condition corresponding to the target task, and the virtual resource deduction amount corresponding to the abnormal behavior data that satisfies each abnormal behavior identification condition. It determines whether the actual behavioral data satisfies each abnormal behavior identification condition, identifies at least one abnormal behavior data in the actual behavioral data, and generates a virtual resource deduction message based on the virtual resource deduction amount corresponding to at least one abnormal behavior data. The virtual resource deduction message is broadcast to the blockchain network where the blockchain resides. At least one node in the blockchain network determines the actual amount of virtual resources transferred to the target object based on the virtual resource deduction message, thereby improving the server's resource processing efficiency. In this way, based on the immutable smart contracts in the blockchain, abnormal behavior data of the target object during the execution of the target task can be accurately identified. Based on this abnormal behavior data, the actual amount of virtual resources transferred to the target object can be determined. This effectively statistically analyzes task execution information and the amount of virtual resources deducted from the target object, achieving functions such as a fully closed chain, real-time information sharing, immutable data, and automatic salary transfer. It effectively solves the problem of chaotic task execution information, such as employment information statistics, caused by multiple stages and levels of the target task, effectively improving the statistical efficiency and accuracy of task execution information. This, in turn, allows for the effective and accurate determination of the actual amount of virtual resources transferred to the target object, improving the server's processing efficiency for virtual resources. Attached Figure Description
[0025] Figure 1 This is an application environment diagram of a blockchain-based data processing method in one embodiment.
[0026] Figure 2This is a flowchart illustrating a blockchain-based data processing method in one embodiment;
[0027] Figure 3 Here is a system flowchart of a blockchain-based data processing method in one embodiment;
[0028] Figure 4 This is a flowchart illustrating a blockchain-based data processing method in another embodiment;
[0029] Figure 5 This is a structural block diagram of a blockchain-based data processing device in one embodiment;
[0030] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0032] It should be noted that the data processing method, apparatus, computer equipment, storage medium and computer program product based on blockchain disclosed in this application can be applied to the field of fintech, and can also be used in any field other than fintech.
[0033] This application provides a blockchain-based data processing method that can be applied to, for example... Figure 1In the application environment shown, electronic device 102 communicates with server 104 via a network. A data storage system can store data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. If a target object is detected entering a target area to perform a target task, electronic device 102 acquires the actual behavior data generated by the target object while performing the target task; electronic device 102 invokes a smart contract pre-generated on the blockchain before the target object performs the target task; the smart contract declares at least one abnormal behavior identification condition corresponding to the target task, and the virtual resource deduction amount corresponding to the abnormal behavior data that satisfies each of the abnormal behavior identification conditions; electronic device 102 determines whether the actual behavior data satisfies each of the abnormal behavior identification conditions, and identifies at least one abnormal behavior data in the actual behavior data; electronic device 102 generates a virtual resource deduction message based on the virtual resource deduction amount corresponding to the at least one abnormal behavior data; the virtual resource deduction message is broadcast to the blockchain network where the blockchain is located; at least one node in the blockchain network determines the amount of virtual resources actually transferred to the target object based on the virtual resource deduction message. The electronic device 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0034] In one embodiment, such as Figure 2 As shown, a blockchain-based data processing method is provided, which can be applied to... Figure 1 Taking an electronic device as an example, the explanation includes the following steps:
[0035] Step S210: If the target object is detected to enter the target area to perform the target task, obtain the actual behavior data generated by the target object when performing the target task.
[0036] The target object can refer to the object that needs to perform the target task. For example, the target object can refer to the object that performs the construction task.
[0037] The target area can refer to the area used to perform the target task. Taking a construction task as an example, the target area can refer to a construction site.
[0038] In practice, when an electronic device detects that a target object has entered a target area to perform a target task, the electronic device acquires the actual behavioral data generated by the target object while performing the target task. Specifically, the target object can send an entry request for the target area to the electronic device through a turnstile device installed at the entrance of the target area.
[0039] In response to the entry request, the electronic device authenticates the target object. Once authentication is successful, the electronic device controls the gate to allow the target object to enter the target area to perform the target task. During the execution of the target task, the electronic device can collect real-time behavioral data generated by the target object through a data acquisition device carried by the target object.
[0040] Step S220: Invoke the smart contract pre-generated on the blockchain before the target object performs the target task.
[0041] The smart contract declares at least one abnormal behavior identification condition corresponding to the target task, as well as the virtual resource deduction amount corresponding to the abnormal behavior data that meets each abnormal behavior identification condition.
[0042] In practical implementation, electronic devices can invoke smart contracts pre-generated before the target object executes the target task on the blockchain. Specifically, the electronic device can determine the employment information ledger in the blockchain constructed using distributed ledger technology. Then, it queries the employment information ledger to see if there is a smart contract (employment salary contract, etc.) corresponding to the identification information of the target object. This employment salary contract declares at least one abnormal behavior identification condition corresponding to the target task (e.g., abnormal task execution behavior identification condition, etc.), and the virtual resource deduction amount (e.g., wage deduction amount corresponding to various abnormal behaviors) corresponding to the abnormal behavior data that meets each abnormal behavior identification condition.
[0043] To facilitate understanding by those skilled in the art, the establishment and access of the employment information ledger and the establishment and effectiveness of employment salary contracts will be further explained below.
[0044] (I) Establishment and Access to Employment Information Ledgers
[0045] Taking a construction project as an example, this section mainly utilizes distributed ledger technology in blockchain. Within the scope of banks, government, construction units, general contractors, subcontractors (several), and labor service companies (several), for a specific construction project, banks, government, and construction units take the lead in establishing an employment information ledger based on a public blockchain model, and complete the access verification for other roles. Banks, government, construction units, general contractors, subcontractors (several), and labor service companies (several) all act as nodes in this public blockchain of the employment information ledger, and distributed ledger is implemented among the nodes.
[0046] 1. Establishment of employment information ledger:
[0047] For a specific construction project, an employment information ledger is formally established only if the following conditions are met: the bank and the construction unit have signed an employment information statistics and salary payment agreement and filed it with the government; and the construction unit's project has been approved by the government to commence. The bank, government, and construction unit, as the managers of the information ledger, have the authority to set the access conditions for other roles.
[0048] 2. Access based on employment information ledger;
[0049] (1) The bank sets the following initial access conditions for other roles:
[0050] The role of the labor service company: All migrant workers dispatched by the labor service company for this construction project should have a dedicated bank account for salary settlement. This condition is met when the ledger shows that all migrant workers dispatched by the labor service company for this construction project have a settlement account.
[0051] The role of the general contractor: It should establish a special account for migrant workers' wages in a bank. This condition is met if the general contractor has already established a special account for migrant workers' wages in the ledger.
[0052] (2) The government sets the following initialization conditions for other roles:
[0053] The role of the general contractor; the wage guarantee or letter of guarantee reaches a certain amount, and the bank confirms in the ledger that the general contractor's wage guarantee or letter of guarantee has reached a certain amount, then this condition is met;
[0054] The role of the labor service company: All migrant workers dispatched by the labor service company for this construction project should be registered with the government. This condition is met when all migrant workers dispatched by the labor service company for this construction project have been registered in the ledger.
[0055] (3) The construction unit sets the following initial access conditions for other roles:
[0056] The role of the general contractor: to clearly define the list of subcontractors and to have signed contracts with each (several) subcontractor. This condition is met when the construction unit receives the list and all contracts.
[0057] The role of the labor service company: All migrant workers dispatched for this construction project should have their identity verification data collected. This condition is met when the labor service company has completed the identity verification data collection for all migrant workers dispatched for this construction project in the ledger.
[0058] The role of the subcontractor: to complete the signing of the contract with the general contractor and inform the construction unit. This condition is met when the construction unit receives the contract signed by the subcontractor provided by the general contractor and confirms it through the list.
[0059] A role can only be granted access if it meets all the access criteria set by the administrators of all employment information ledgers.
[0060] (II) Establishment and Effectiveness of Employment and Salary Contracts
[0061] This section primarily utilizes smart contracts in blockchain technology. Based on the employment contracts signed between migrant workers and labor service companies, and after confirmation by several parties including banks, governments, construction units, general contractors, subcontractors (several), and labor service companies (several), a smart contract is generated for all migrant worker wage contracts in the ledger. Once the smart contract takes effect, it will be automatically executed after the employment conditions are met. Except for specific reasons, no role can interfere with its execution, and the execution information is open to specific roles for querying.
[0062] 3. Establishment of Employment and Salary Contracts
[0063] Each migrant worker has an independent employment and wage contract, which stipulates the amount of wages to be paid. For those on a monthly, weekly, daily, or hourly wage system, wages are paid on a monthly, weekly, daily, or hourly basis. For those on a piece-rate wage system, the wage payment cycle is agreed upon by both parties. Once the agreement is clear, the smart contract for wage payment is formally established.
[0064] 4. Effectiveness of the Employment and Salary Contract
[0065] After the bank, government, construction unit, general contractor, subcontractors (several), and labor service company (several) confirm the contents of the smart contract, the smart contract for payment of wages and salaries officially takes effect.
[0066] Step S230: Determine whether the actual behavior data meets the criteria for identifying each abnormal behavior, and identify at least one abnormal behavior data in the actual behavior data.
[0067] After acquiring actual behavioral data, the electronic device can statistically analyze and write this data into a blockchain-based employment information ledger, ensuring the immutability of the data. The electronic device can also determine in real time whether the actual behavioral data meets at least one abnormal behavior identification condition corresponding to the target task declared in the smart contract, and classify the actual behavioral data that meets each abnormal behavior identification condition as abnormal behavior data. This achieves intelligent tracking of whether the execution status of each target object is normal, reasonable, and meets requirements, by combining the target object's identification information with the construction job type and job responsibilities in the smart contract and using artificial intelligence-assisted judgment.
[0068] Step S240: Generate a virtual resource deduction message based on the virtual resource deduction amount corresponding to at least one abnormal behavior data.
[0069] The virtual resource deduction message is broadcast to the blockchain network where the blockchain is located; at least one node in the blockchain network is used to determine the actual amount of virtual resources transferred to the target object based on the virtual resource deduction message.
[0070] In practice, after determining at least one abnormal behavior data in the actual behavior data, the electronic device can generate a virtual resource deduction message based on the virtual resource deduction amount corresponding to the at least one abnormal behavior data.
[0071] For example, in the employment information ledger, the node of the labor service company to which the target is located (i.e., the electronic device) records the target's daily work information in real time. If the electronic device detects at least one abnormal behavior data in the actual behavior data, it determines it as abnormal behavior and triggers a wage reduction report. After confirmation, the wage is reduced, and the information is forwarded to the organization to which the target belongs (broadcasting the virtual resource deduction message to the blockchain network where the blockchain is located). This allows the organization to adjust the target's wage amount, that is, to determine the actual amount of virtual resources transferred to the target based on the virtual resource deduction message. For the understanding of those skilled in the art, Figure 3 A system flowchart for a blockchain-based data processing method is provided.
[0072] In the aforementioned blockchain-based data processing method, if a target object is detected entering a target area to execute a target task, the actual behavioral data generated by the target object during the execution of the target task is obtained, and a smart contract pre-generated before the target object executes the target task is invoked on the blockchain. This smart contract declares at least one abnormal behavior identification condition corresponding to the target task, and the virtual resource deduction amount corresponding to the abnormal behavior data that satisfies each abnormal behavior identification condition. It determines whether the actual behavioral data satisfies each abnormal behavior identification condition, identifies at least one abnormal behavior data in the actual behavioral data, and generates a virtual resource deduction message based on the virtual resource deduction amount corresponding to at least one abnormal behavior data. The virtual resource deduction message is broadcast to the blockchain network where the blockchain resides. At least one node in the blockchain network determines the actual amount of virtual resources transferred to the target object based on the virtual resource deduction message, thereby improving the server's resource processing efficiency. In this way, based on the immutable smart contracts in the blockchain, abnormal behavior data of the target object during the execution of the target task can be accurately identified. Based on this abnormal behavior data, the actual amount of virtual resources transferred to the target object can be determined. This effectively statistically analyzes task execution information and the amount of virtual resources deducted from the target object, achieving functions such as a fully closed chain, real-time information sharing, immutable data, and automatic salary transfer. It effectively solves the problem of chaotic task execution information, such as employment information statistics, caused by multiple stages and levels of the target task, effectively improving the statistical efficiency and accuracy of task execution information. This, in turn, allows for the effective and accurate determination of the actual amount of virtual resources transferred to the target object, improving the server's processing efficiency for virtual resources.
[0073] In another embodiment, generating a virtual resource deduction message based on the virtual resource deduction amount corresponding to at least one abnormal behavior data includes: upon detecting that a target object has left the target area, obtaining the duration of the target object in the target area to obtain the area stay duration; if the area stay duration does not meet the abnormal execution duration determination condition, then generating a virtual resource deduction message based on the target virtual resource deduction amount and the virtual resource deduction amount corresponding to at least one abnormal behavior data.
[0074] The smart contract also declares the conditions for determining abnormal execution duration of the target task, as well as the corresponding deduction of target virtual resources when the abnormal execution duration conditions are met. In practical applications, the conditions for determining abnormal execution duration can be that the time spent in the area is less than a preset time threshold.
[0075] In practice, when the electronic device detects that a target object has left the target area, it obtains the duration the target object has been in the target area, thus obtaining the area stay duration. Then, the electronic device determines whether the area stay duration meets the abnormal execution duration identification conditions declared in the smart contract. If the area stay duration is less than a preset duration threshold, the electronic device determines that the area stay duration meets the abnormal execution duration identification conditions, and then generates a virtual resource deduction message based on the target virtual resource deduction amount and the virtual resource deduction amount corresponding to at least one abnormal behavior data.
[0076] For example, when the target person leaves the target area for the last time, the electronic device verifies the target person's identity information again through facial recognition. The electronic device records the target person's work stop information in real time in the employment information ledger (the work stop information must meet the conditions regarding work hours in the smart contract; otherwise, it is judged as abnormal behavior, triggering a wage reduction report. After the report is confirmed, the target person's wage is reduced, and the information is forwarded to the organization to which the target person belongs for registration.
[0077] In another embodiment, a data acquisition device is provided on the target object to acquire actual behavior data generated by the target object when performing the target task, including: receiving target object data collected by the data acquisition device for the target object; and inputting the target object data into a pre-trained behavior recognition neural network to obtain the actual behavior data corresponding to the target object.
[0078] The target object data includes at least one of location data, motion data, and heart rate data.
[0079] The target object is equipped with a data acquisition device. During the target object's execution of a target task within the target area, the data acquisition device can collect at least one of the target object's location data, motion data, and heart rate data. In practical applications, the data acquisition device can be, but is not limited to, a smartwatch, smart bracelet, or smart work card.
[0080] In practice, as the target object performs its target task within the target area, the data acquisition device collects real-time data on the target object, including its location, movement, heart rate, and image data. Then, the data acquisition device uses artificial intelligence to determine the actual behavioral data corresponding to the target object. For example, an electronic device can input the target object data into a pre-trained behavior recognition neural network to obtain the actual behavioral data corresponding to the target object.
[0081] The technical solution of this embodiment is to set up a data acquisition device on the target object and use a pre-trained behavior recognition neural network to process the target object data collected in real time by the data acquisition device, thereby accurately obtaining the actual behavior data generated by the target object when performing the target task.
[0082] In another embodiment, before obtaining the actual behavioral data generated by the target object when performing the target task, the method further includes: in response to the target object's request to enter the target area, authenticating the target object to obtain the target object's identity information. Specifically, in response to the target object's request to enter the target area, a facial image of the target object is captured; the facial image is then subjected to identity authentication processing to determine the target object's identity information.
[0083] If a smart contract exists that corresponds to the target object's identity information, a first prompt message is generated allowing the target object to enter the target area; if no smart contract exists that corresponds to the target object's identity information, a second prompt message is generated prohibiting the target object from entering the target area.
[0084] In practical implementation, before acquiring the actual behavioral data generated by the target object while performing the target task, the electronic device can receive an entry request from the target object for the target area. Then, in response to the entry request, the electronic device authenticates the target object to obtain its identity information. Specifically, the electronic device can capture the target object's facial image through the image acquisition device in the gate at the entrance of the target area; then, the electronic device performs identity authentication processing on the facial image to determine the target object's identity information. Alternatively, the electronic device can use the identity information acquisition device in the gate at the entrance of the target area, along with an identification device carried by the target object (such as a work card, NFC tag, etc.), to authenticate the target object and obtain its identity information.
[0085] Once an electronic device obtains the identity information of a target object, it can use that identity information to query the employment information ledger to see if there is a smart contract (e.g., an employment salary contract) that corresponds to the target object's identity information.
[0086] In another embodiment, after obtaining the identity information of the target object, the method further includes: sending a smart contract query request carrying the identity information to any network node in the blockchain network corresponding to the blockchain; the smart contract query request is used to instruct any network node to obtain the employment information ledger corresponding to the target task; and querying the employment information ledger to find a smart contract corresponding to the identity information, thereby obtaining a smart contract query result; receiving a message carrying the smart contract query result, and determining that a smart contract corresponding to the identity information of the target object exists.
[0087] In practice, after obtaining the identity information of the target object, the electronic device can generate a smart contract query request carrying that identity information. Then, the electronic device sends this smart contract query request to any network node in the blockchain network corresponding to the blockchain. Upon receiving the smart contract query request, any network node checks the blockchain to see if a smart contract corresponding to the identity information exists, obtaining the smart contract query result. Then, any network node sends a message carrying the smart contract query result to the electronic device. The electronic device receives this message and, based on the smart contract query result, determines whether a smart contract corresponding to the target object's identity information exists.
[0088] The technical solution of this embodiment sends a smart contract query request carrying identity information to any network node in the blockchain network corresponding to the blockchain, thereby enabling the query to see if there is a smart contract corresponding to the identity information in the blockchain, thus ensuring that the correspondence between identity information and smart contracts is not tampered with.
[0089] If a smart contract exists that corresponds to the identity information of the target object, the electronic device generates a first prompt message allowing the target object to enter the target area, and then controls the gate device set at the entrance of the target area to allow the target object to enter the target area.
[0090] If no smart contract corresponding to the target's identity information can be found in the employment information ledger, the electronic device will generate a second prompt message prohibiting the target from entering the target area, and present the second prompt message through the gate device set at the entrance of the target area.
[0091] The technical solution of this embodiment, by generating a second prompt message prohibiting the target object from entering the target area when no smart contract corresponding to the identity information of the target object is found, can effectively identify the target object, prevent other objects from entering the target area, and ensure the security of the target area.
[0092] In another embodiment, if a smart contract corresponding to the identity information of the target object exists, the method further includes: if the target object is detected to enter the target area for the first time, then setting the smart contract that is inactive to an active state.
[0093] In practice, if the electronic device detects that the target object has entered the target area for the first time, the electronic device will set the smart contract that is inactive to an active state.
[0094] Specifically, if the electronic device finds a smart contract for wages and salaries corresponding to the target object in the employment information ledger, the electronic device will activate the inactive employment and salary contract in the corresponding employment information ledger when it detects that the target object enters the construction site for the first time to perform the target task.
[0095] In this embodiment, when a smart contract corresponding to the identity information of the target object exists, the inactive smart contract is set to an active state when the target object enters the target area for the first time. This enables the timely activation of the smart contract corresponding to the target object and the timely determination of the actual amount of virtual resources transferred to the target object using the smart contract declaration content.
[0096] In another embodiment, such as Figure 4 As shown, a blockchain-based data processing method is provided, which can be applied to... Figure 1 Taking an electronic device as an example, the explanation includes the following steps:
[0097] Step S410: If a target object is detected to enter the target area to perform a target task, receive the target object data collected by the data acquisition device for the target object; the target object data includes at least one of location data, motion data and heart rate data.
[0098] Step S420: Input the target object data into the pre-trained behavior recognition neural network to obtain the actual behavior data corresponding to the target object.
[0099] Step S430: Invoke the smart contract pre-generated on the blockchain before the target object executes the target task; the smart contract declares at least one abnormal behavior identification condition corresponding to the target task, and the virtual resource deduction amount corresponding to the abnormal behavior data that satisfies each abnormal behavior identification condition.
[0100] Step S440: Determine whether the actual behavior data meets the criteria for identifying each abnormal behavior, and identify at least one abnormal behavior data in the actual behavior data.
[0101] Step S450: Generate a virtual resource deduction message based on the virtual resource deduction amount corresponding to at least one abnormal behavior data; the virtual resource deduction message is used to be broadcast to the blockchain network where the blockchain is located; at least one node in the blockchain network is used to determine the actual amount of virtual resources transferred to the target object based on the virtual resource deduction message.
[0102] It should be noted that the specific limitations of the above steps can be found in the specific limitations of a blockchain-based data processing method described above.
[0103] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0104] Based on the same inventive concept, this application also provides a blockchain-based data processing apparatus for implementing the blockchain-based data processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more embodiments of the blockchain-based data processing apparatus provided below can be found in the limitations of the blockchain-based data processing method described above, and will not be repeated here.
[0105] In one embodiment, such as Figure 5 As shown, a blockchain-based data processing device is provided, comprising:
[0106] The acquisition module 510 is used to acquire actual behavior data generated by the target object when it is executing the target task if it is detected that the target object enters the target area to execute the target task.
[0107] The calling module 520 is used to call a smart contract pre-generated on the blockchain before the target object executes the target task; the smart contract declares at least one abnormal behavior identification condition corresponding to the target task, and the virtual resource deduction amount corresponding to the abnormal behavior data that satisfies each of the abnormal behavior identification conditions;
[0108] The determination module 530 is used to determine whether the actual behavior data meets each of the abnormal behavior identification conditions, and to determine at least one abnormal behavior data in the actual behavior data.
[0109] The generation module 540 is used to generate a virtual resource deduction message based on the virtual resource deduction amount corresponding to the at least one abnormal behavior data; the virtual resource deduction message is used to be broadcast to the blockchain network where the blockchain is located; at least one node in the blockchain network is used to determine the actual amount of virtual resources transferred to the target object based on the virtual resource deduction message.
[0110] In one embodiment, a data acquisition device is provided on the target object, and the acquisition module 510 is specifically used to receive target object data collected by the data acquisition device for the target object; the target object data includes at least one of location data, action data and heart rate data; the target object data is input into a pre-trained behavior recognition neural network to obtain the actual behavior data corresponding to the target object.
[0111] In one embodiment, the device is further configured to, in response to the target object's request to enter the target area, authenticate the target object and obtain the target object's identity information; if a smart contract corresponding to the target object's identity information exists, generate a first prompt message allowing the target object to enter the target area; if no smart contract corresponding to the target object's identity information exists, generate a second prompt message prohibiting the target object from entering the target area.
[0112] In one embodiment, the device is further configured to send a smart contract query request carrying the identity information to any network node in the blockchain network corresponding to the blockchain; the smart contract query request is used to instruct the any network node to obtain the employment information ledger corresponding to the target task; and to query the employment information ledger to find a smart contract corresponding to the identity information, thereby obtaining a smart contract query result; and to receive a message carrying the smart contract query result, thereby determining that a smart contract corresponding to the identity information of the target object exists.
[0113] In one embodiment, if a smart contract corresponding to the identity information of the target object exists, the device is further configured to set the smart contract, which is inactive, to an active state if the target object is detected to enter the target area for the first time.
[0114] In one embodiment, the device is further configured to, in response to the target object's request to enter the target area, acquire a facial image of the target object using a target image acquisition device; the target image acquisition device is disposed at a gate device at the entrance of the target area; and perform identity authentication processing on the facial image to determine the identity information of the target object.
[0115] In one embodiment, the smart contract also declares the abnormal execution duration determination conditions corresponding to the target task, and the target virtual resource deduction amount corresponding to satisfying the abnormal execution duration determination conditions. The generation module 540 is specifically used to obtain the duration of the target object in the target area when the target object is detected to leave the target area, and obtain the area stay duration; if the area stay duration does not satisfy the abnormal execution duration determination conditions, then generate the virtual resource deduction message according to the target virtual resource deduction amount and the virtual resource deduction amount corresponding to the at least one abnormal behavior data.
[0116] The modules in the aforementioned blockchain-based data processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke and execute the operations corresponding to each module.
[0117] In one embodiment, a computer device, which may be a server, is provided, and its internal structure can be as shown in Figure Y. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores XX data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a blockchain-based data processing method.
[0118] Those skilled in the art will understand that the structure shown in Figure Y is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or may combine certain components, or may have different component arrangements.
[0119] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the blockchain-based data processing method described above. The steps of the blockchain-based data processing method described here may be steps from one of the blockchain-based data processing methods in the various embodiments described above.
[0120] In one embodiment, a computer-readable storage medium is provided, storing a computer program that, when executed by a processor, causes the processor to perform the steps of the blockchain-based data processing method described above. The steps of the blockchain-based data processing method described here may be steps from one of the blockchain-based data processing methods in the various embodiments described above.
[0121] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, causes the processor to perform the steps of the blockchain-based data processing method described above. The steps of the blockchain-based data processing method described here may be steps from one of the blockchain-based data processing methods in the various embodiments described above.
[0122] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0123] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0124] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0125] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A data processing method based on blockchain, characterized in that, The method includes: If a target object is detected entering the target area to perform a target task, data on the target object collected by a data acquisition device installed on the target object is received; the target object data includes at least one of location data, motion data, and heart rate data; the target object data is input into a pre-trained behavior recognition neural network to obtain the actual behavior data corresponding to the target object. A smart contract pre-generated on the blockchain is invoked before the target object executes the target task; the smart contract declares at least one abnormal behavior identification condition corresponding to the target task, and the virtual resource deduction amount corresponding to the abnormal behavior data that satisfies each of the abnormal behavior identification conditions; the smart contract also declares the abnormal execution duration identification condition corresponding to the target task, and the target virtual resource deduction amount corresponding to satisfying the abnormal execution duration identification condition. Determine whether the actual behavior data meets at least one abnormal behavior identification condition corresponding to the target task declared in the smart contract, and determine the actual behavior data that meets each abnormal behavior identification condition as abnormal behavior data. Upon detecting that the target object has left the target area, the duration of the target object's stay in the target area is obtained to determine the area stay duration. If the area stay duration does not meet the abnormal execution duration determination condition, a virtual resource deduction message is generated based on the target virtual resource deduction amount and the virtual resource deduction amount corresponding to the at least one abnormal behavior data. The virtual resource deduction message is broadcast to the blockchain network where the blockchain is located. At least one node in the blockchain network is used to determine the actual amount of virtual resources transferred to the target object based on the virtual resource deduction message.
2. The method according to claim 1, characterized in that, Before the step of obtaining the actual behavioral data generated by the target object when performing the target task, the method further includes: In response to the target object's request to enter the target area, the target object is authenticated to obtain its identity information; If a smart contract exists that corresponds to the identity information of the target object, then a first prompt message is generated allowing the target object to enter the target area; If no smart contract exists corresponding to the identity information of the target object, a second prompt message is generated prohibiting the target object from entering the target area.
3. The method according to claim 2, characterized in that, After the step of obtaining the identity information of the target object, the method further includes: Send a smart contract query request carrying the identity information to any network node in the blockchain network corresponding to the blockchain; the smart contract query request is used to instruct the network node to obtain the employment information ledger corresponding to the target task; and query the employment information ledger to find a smart contract corresponding to the identity information, and obtain the smart contract query result; Receive a message carrying the query result of the smart contract and determine that there is a smart contract corresponding to the identity information of the target object.
4. The method according to claim 2, characterized in that, If a smart contract exists that corresponds to the identity information of the target object, the method further includes: If the target object is detected to enter the target area for the first time, the smart contract that is inactive will be set to an active state.
5. The method according to claim 2, characterized in that, The step of authenticating the target object in response to the target object's entry request for the target area includes: In response to the target object's request to enter the target area, a target image acquisition device acquires the target object's facial image; the target image acquisition device is installed at the gate device at the entrance of the target area. The facial image is subjected to identity authentication processing to determine the identity information of the target object.
6. A data processing device based on blockchain, characterized in that, The device includes: The acquisition module is configured to receive target object data collected by a data acquisition device installed on the target object if a target object is detected entering a target area to perform a target task; the target object data includes at least one of location data, motion data, and heart rate data; and input the target object data into a pre-trained behavior recognition neural network to obtain the actual behavior data corresponding to the target object. The calling module is used to call a smart contract pre-generated on the blockchain before the target object executes the target task; the smart contract declares at least one abnormal behavior identification condition corresponding to the target task, and the virtual resource deduction amount corresponding to the abnormal behavior data that satisfies each of the abnormal behavior identification conditions; the smart contract also declares the abnormal execution duration identification condition corresponding to the target task, and the target virtual resource deduction amount corresponding to satisfying the abnormal execution duration identification condition; The determination module is used to determine whether the actual behavior data meets at least one abnormal behavior identification condition corresponding to the target task declared in the smart contract, and to determine the actual behavior data that meets each abnormal behavior identification condition as abnormal behavior data. A generation module is used to, upon detecting that the target object has left the target area, obtain the duration the target object has been in the target area, thus obtaining the area stay duration; if the area stay duration does not meet the abnormal execution duration determination condition, then, based on the target virtual resource deduction amount and the virtual resource deduction amount corresponding to the at least one abnormal behavior data, generate the virtual resource deduction message; the virtual resource deduction message is used to be broadcast to the blockchain network where the blockchain is located; at least one node in the blockchain network is used to determine the actual amount of virtual resources transferred to the target object based on the virtual resource deduction message.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
User management method based on wearable device and related device
CN110245476A
Block chain system for wage payment and wage payment method
CN111695978A
Resource transfer method based on block chain network
CN113656499A