CN117033146A - Identification method, device, equipment and medium for appointed consensus contract execution process - Google Patents

Identification method, device, equipment and medium for appointed consensus contract execution process Download PDF

Info

Publication number
CN117033146A
CN117033146A CN202311303215.6A CN202311303215A CN117033146A CN 117033146 A CN117033146 A CN 117033146A CN 202311303215 A CN202311303215 A CN 202311303215A CN 117033146 A CN117033146 A CN 117033146A
Authority
CN
China
Prior art keywords
target
time
num
instruction set
preset
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.)
Granted
Application number
CN202311303215.6A
Other languages
Chinese (zh)
Other versions
CN117033146B (en
Inventor
关墨辰
李旗
肖新光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Antiy Network Technology Co Ltd
Original Assignee
Beijing Antiy Network Technology Co 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 Beijing Antiy Network Technology Co Ltd filed Critical Beijing Antiy Network Technology Co Ltd
Priority to CN202311303215.6A priority Critical patent/CN117033146B/en
Publication of CN117033146A publication Critical patent/CN117033146A/en
Application granted granted Critical
Publication of CN117033146B publication Critical patent/CN117033146B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Executing Machine-Instructions (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a method, a device, equipment and a medium for identifying an execution process of a designated consensus contract, and relates to the field of network completeness. The method comprises the following steps: in the target time period, determining calling information corresponding to the currently called key instruction set every time the target process calls any key instruction set so as to obtain a calling information list D; determining a target quantity list set B according to the D and a preset name-quantity mapping table; determining a total number list NUM according to the D; according to B and NUM, a target proportion list L is obtained; if PL > Y1 and FL < Y2, determining the target process as a specified consensus contract execution process; wherein Y1 is a preset proportion threshold, Y2 is a preset proportion fluctuation threshold, PL is a key proportion, and FL is a proportion fluctuation value; PL and FL are determined from L. The method and the device can accurately identify the execution process of the appointed consensus contract.

Description

Identification method, device, equipment and medium for appointed consensus contract execution process
Technical Field
The present application relates to the field of network completion, and in particular, to a method, apparatus, device, and medium for identifying a specific consensus contract execution process.
Background
In some methods of identifying processes executing a consensus contract, the determination is made based on instructions executed by the process. However, this method requires the establishment of a corresponding monitoring process to monitor and record the instructions executed by the computer. And then identifying whether the process is executing the consensus contract according to the characteristics of the executed instruction. However, since the computer executes the instructions very fast, the method requires very high computational power, which affects the performance of the computer during operation.
Disclosure of Invention
In view of the above, the present application provides a method, apparatus, device and medium for identifying a process for executing a specified consensus contract, so as to solve the problem that the computing power is excessively occupied when identifying the process for executing the consensus contract.
In one aspect of the present application, there is provided an identification method for specifying a consensus contract execution process, including:
s100, in the target time period, determining call information corresponding to the currently called key instruction set when any key instruction set is called by the target process, so as to obtain a call information list D= (D) 1 ,D 2 ,…,D i ,…,D n );D i =(TIME i ,NAME i ) The method comprises the steps of carrying out a first treatment on the surface of the i=1, 2, …, n; wherein n is the number of times the target process calls the key instruction set in the target time period; d (D) i Call information corresponding to an ith key instruction set called for the target process; TIME (TIME) i Time, NAME, when the ith critical instruction set is invoked for the target process i An instruction set name of an ith key instruction set called for the target process; the execution of the key instruction set is used for accelerating the execution of the corresponding preset function;
s200, determining a target quantity list set B= (B) according to the D and a preset name-quantity mapping table 1 ,B 2 ,…,B i ,…,B n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein B is i For D i The execution times of target instructions in a preset function corresponding to the acceleration of the key instruction set;
s300, determining a total number list NUM= (NUM) according to D 1 ,NUM 2 ,…,NUM i ,…,NUM n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein NUM i For D i Corresponding total number, and if i=1, 2, …, n-1, NUM i For TIME i To TIME i+1 The order of (2) for a period of timeThe total number of arbitrary instructions executed by the target process, if i=n, NUM i For TIME i To TIME i +(TIME n -TIME 1 ) The total number of arbitrary instructions executed by the target process within the time period of/(n-1);
s400, according to B and NUM, obtaining a target proportion list L= (L) 1 ,L 2 ,…,L i ,…,L n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein L is i For the ith target proportion, L i =B i /NUM i
S500, if PL is more than Y1 and FL is less than Y2, determining the target process as a designated consensus contract execution process; wherein Y1 is a preset proportion threshold, Y2 is a preset proportion fluctuation threshold, PL is a key proportion, and FL is a proportion fluctuation value; pl= (Σ) i=1 n L i )/n;FL=((∑ i=1 n (L i -PL) 2 )/n) 1/2
In one exemplary embodiment of the present application, the target time period is composed of p sub-time periods connected in sequence and having the same length;
the step S500 includes:
s510, if PL is more than Y1 and FL is less than Y2, acquiring a memory average occupancy rate list C and a video memory average occupancy rate list G corresponding to the target time period; wherein c= (C 1 ,C 2 ,…,C q ,…,C p );q=1,2,…,p;C q The average occupancy rate of the memory corresponding to the target process in the q-th sub-time period; g= (G) 1 ,G 2 ,…,G q ,…,G p );G q The average occupancy rate of the video memory corresponding to the target process in the q sub-time period;
s520, determining a storage occupancy feature vector CT= (CT) according to C and G 1 ,CT 2 ,…,CT q ,…,CT p );CT q =(C q ,G q );CT q The q characteristic parameter group in CT;
s530, inputting the CT into a preset K-means classification module, and if the K-means classification module does not classify the CT into any preset classification set, determining the target process as a designated consensus contract execution process; the preset classification set is determined according to a known machine learning execution process and/or a game execution process.
In an exemplary embodiment of the present application, after the step S100, the method further includes:
s110, determining a time interval list s= (S) 1 ,S 2 ,…,S j ,…,S m ) J=1, 2, …, m; m=n-1; where m is the number of time intervals, S j For the j-th time interval in S, S j =TIME j+1 -TIME j
The step S500 includes:
s501, if PL is more than Y1, FL is less than Y2 and SD is less than Y3, determining the target process as a designated consensus contract execution process; wherein SD is a duration fluctuation value, sd= (Σ) j=1 m (S j -avg (S)))/m; y3 is a preset time amount fluctuation threshold.
In an exemplary embodiment of the present application, the name-number mapping table Ys= (YS) 1 ,YS 2 ,…,YS b ,…,YS d );YS b =(YNANE b ,YN b ) The method comprises the steps of carrying out a first treatment on the surface of the b=1, 2, …, d; d is the number of preset key instruction sets; YS (YS) b Mapping relation information corresponding to a preset b-th key instruction set; YNANE b For the instruction set name corresponding to the preset b-th key instruction set, YN b And the mapping quantity corresponding to the preset b-th key instruction set.
In an exemplary embodiment of the present application, the step S200 includes:
s210, traversing D, if NAME i =YNANE b Then determine B i =YN b
In an exemplary embodiment of the application, the target instruction comprises at least one of:
bit operation instructions, floating point operation instructions, multiplication instructions, division instructions, subtraction instructions, addition instructions, vector operation instructions.
In an exemplary embodiment of the present application, before the step S100, the method further includes:
s000, in response to the CPU occupancy rate or the GPU occupancy rate being continuously larger than a preset occupancy rate threshold value within a preset duration, determining a process with the largest current CPU occupancy rate or GPU occupancy rate as a target process, and entering step S100.
In another aspect of the present application, there is provided an identification apparatus for specifying a consensus contract execution process, comprising:
the acquisition module is used for determining call information corresponding to the currently called key instruction set every time the target process calls any key instruction set in the target time period to obtain a call information list D= (D) 1 ,D 2 ,…,D i ,…,D n );D i =(TIME i ,NAME i ) The method comprises the steps of carrying out a first treatment on the surface of the i=1, 2, …, n; wherein n is the number of times the target process calls the key instruction set in the target time period; d (D) i Call information corresponding to an ith key instruction set called for the target process; TIME (TIME) i Time, NAME, when the ith critical instruction set is invoked for the target process i An instruction set name of an ith key instruction set called for the target process;
the mapping module is used for determining a target quantity list set B= (B) according to the D and a preset name-quantity mapping table 1 ,B 2 ,…,B i ,…,B n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein B is i For D i Corresponding to the number of target instructions in the key instruction set;
a number determination module for determining a total number list Num= (NUM) according to D 1 ,NUM 2 ,…,NUM i ,…,NUM n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein NUM i For D i Corresponding total number, and if i=1, 2, …, n-1, NUM i For TIME i To TIME i+1 The total number of arbitrary instructions executed by the target process during the period of (1), if i=n, NUM i For TIME i To TIME i +(TIME n -TIME 1 ) The total number of arbitrary instructions executed by the target process within the time period of/(n-1);
the proportion determining module is used for obtaining a target proportion list L= = (the target proportion list L= (the target proportion) according to the B and the NUM)L 1 ,L 2 ,…,L i ,…,L n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein L is i For the ith target proportion, L i =B i /NUM i
A determination module for determining the target process as a specified consensus contract execution process in the case of PL > Y1 and FL < Y2; wherein Y1 is a preset proportion threshold, Y2 is a preset proportion fluctuation threshold, PL is a key proportion, and FL is a proportion fluctuation value; pl= (Σ) i=1 n L i )/n;FL=((∑ i=1 n (L i -PL) 2 )/n) 1/2
In another aspect of the application, an electronic device is provided that includes a processor and a memory;
the processor is configured to execute the steps of the method by calling a program or instructions stored in the memory.
In another aspect of the present application, there is provided a non-transitory computer-readable storage medium storing a program or instructions that cause a computer to perform the steps of the above-described method.
The beneficial effects are that:
the identification method of the appointed consensus contract execution process provided by the application can acquire the call information corresponding to the called key instruction set when the target process calls any key instruction set for accelerating the execution of the corresponding preset function in the target time period. And then the execution times of target instructions in the preset function accelerated by each key instruction set are calculated according to the preset name-quantity mapping table. Because processes can call a large number of preset functions (such as various hash functions) specified in the application when executing the consensus contract, and meanwhile, in order to obtain more rewards in the blockchain adopting the workload certification mechanism, the processes executing the consensus contract can call corresponding acceleration instruction sets (namely key instruction sets) when calling the preset functions. Therefore, in the application, the number of target instructions executed by the target process can be approximately determined by calling the information list D and the preset name-number mapping table. Therefore, the aim quantity list set B can be obtained by monitoring the calls of a few key instruction sets without monitoring each instruction executed by the computer. Thereby reducing the computational effort required in determining the number of target instructions to be executed by the target process.
Meanwhile, the experiment determines that the process of executing the consensus contract has a higher proportion of executing the target instruction than the normal process. And executing the predetermined function is performed with a relatively stable periodicity. Therefore, in the application, according to the proportion characteristic between the target number of the key instruction set bet won by the key instruction set called before and the total number of any instructions executed by the target process and the fluctuation condition of the proportion, whether the proportion of the target process executing the target instruction is higher or not is determined to present stable periodicity. In turn, a quick determination is made as to whether the target process is executing a specified consensus contract (i.e., a blockchain consensus contract that employs a workload certification mechanism).
Furthermore, the total number list NUM obtained in the application does not need to distinguish different instruction types, so that only a simple counter is adopted, and the consumption of great calculation force is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an identification method for specifying a consensus contract execution process according to an embodiment of the present application;
fig. 2 is a block diagram of an identification device for specifying a common contract execution process according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
It should be noted that, without conflict, the following embodiments and features in the embodiments may be combined with each other; and, based on the embodiments in this disclosure, all other embodiments that may be made by one of ordinary skill in the art without inventive effort are within the scope of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the following claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the present disclosure, one skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such apparatus may be implemented and/or such methods practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
Referring to fig. 1, in one aspect of the present application, there is provided a method for identifying a process executed by a specified consensus contract, including:
s100, in the target time period, determining call information corresponding to the currently called key instruction set when any key instruction set is called by the target process, so as to obtain a call information list D= (D) 1 ,D 2 ,…,D i ,…,D n );D i =(TIME i ,NAME i ) The method comprises the steps of carrying out a first treatment on the surface of the i=1, 2, …, n; wherein n is the number of times the target process calls the key instruction set in the target time period; d (D) i Call information corresponding to an ith key instruction set called for the target process; TIME (TIME) i Time, NAME, when the ith critical instruction set is invoked for the target process i An instruction set name of an ith key instruction set called for the target process; the execution of the key instruction set is used for accelerating the execution of the corresponding preset function. Specifically, the preset function may be a hash function such as SHA1, SHA256, and the like. The key instruction set can be SHA1MSG1, SHA1MSG2, SHA1NEXTE, SHA1RNDS4, SHA256MSG1, SHA256MSG2, SHA256RNDS2, etc.
Further, in some exemplary embodiments, the target process may call any one of the key instruction sets and obtain the corresponding call information by adding a preset information return instruction to each of the key instruction sets, so that when each of the key instruction sets is called and executed, the corresponding call information may be automatically returned, thereby avoiding the setting of the monitoring module to monitor the call operation of the process, and further reducing the calculation effort.
S200, determining a target quantity list set B= (B) according to the D and a preset name-quantity mapping table 1 ,B 2 ,…,B i ,…,B n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein B is i For D i The execution times of target instructions in a preset function corresponding to the acceleration of the key instruction set.
In this embodiment, the target instruction is pre-specified, and the number of the target instruction may be one or more, where the target instruction may include at least one of the following: bit operation instructions, floating point operation instructions, multiplication instructions, division instructions, subtraction instructions, addition instructions, vector operation instructions. Preferably, in the present application, the target instruction includes each of the above.
Specifically, the name-number mapping table Ys= (YS) 1 ,YS 2 ,…,YS b ,…,YS d );YS b =(YNANE b ,YN b ) The method comprises the steps of carrying out a first treatment on the surface of the b=1, 2, …, d; d is the number of preset key instruction sets; YS (YS) b Mapping relation information corresponding to a preset b-th key instruction set; YNANE b For the instruction set name corresponding to the preset b-th key instruction set, YN b And the mapping quantity corresponding to the preset b-th key instruction set.
In an exemplary embodiment of the present application, the step S200 includes:
s210, traversing D, if NAME i =YNANE b Then determine B i =YN b
S300, determining a total number list NUM= (NUM) according to D 1 ,NUM 2 ,…,NUM i ,…,NUM n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein NUM i For D i Corresponding total number, and if i=1, 2, …, n-1, NUM i For TIME i To TIME i+1 The total number of arbitrary instructions executed by the target process during the period of (1), if i=n, NUM i For TIME i To TIME i +(TIME n -TIME 1 ) And/or (n-1) the total number of arbitrary instructions executed by the target process during the time period.
In particular, due to D n Is the last time the target process called the key instruction set, so the time interval between the target process and the next time the key instruction set is called cannot be directly determined. Therefore, in this embodiment, the average value of each previous time interval is taken as the last time interval, so as to ensure the data accuracy in the subsequent processing process as much as possible.
S400, according to B and NUM, obtaining a target proportion list L= (L) 1 ,L 2 ,…,L i ,…,L n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein L is i For the ith target proportion, L i =B i /NUM i
S500, if PL > Y1 and FL < Y2, determining the target process as a specified consensus contract execution process. Wherein Y1 is a preset proportion threshold, Y2 is a preset proportion fluctuation threshold, PL is a key proportion, and FL is a proportion fluctuation value; pl= (Σ) i=1 n L i )/n;FL=((∑ i=1 n (L i -PL) 2 )/n) 1/2
The identification method of the specified consensus contract execution process provided by the embodiment can acquire call information corresponding to a called key instruction set when the target process calls any key instruction set for accelerating the execution of a corresponding preset function within a target time period. And then the execution times of target instructions in the preset function accelerated by each key instruction set are calculated according to the preset name-quantity mapping table. Because the process executes the consensus contract, a large number of preset functions (such as various hash functions) specified in the embodiment are called, and meanwhile, in order to obtain more rewards in the blockchain adopting the workload certification mechanism, the process executing the consensus contract calls a corresponding acceleration instruction set (i.e. a key instruction set) at the same time when the preset functions are called. Therefore, in this embodiment, the number of target instructions executed by the target process can be approximately determined by calling the information list D and the preset name-number mapping table. Therefore, the aim quantity list set B can be obtained by monitoring the calls of a few key instruction sets without monitoring each instruction executed by the computer. Thereby reducing the computational effort required in determining the number of target instructions to be executed by the target process.
Moreover, since normal secure encryption processes and machine learning processes, while also executing target instructions in large numbers, such normal processes do not call critical instruction sets in the present application in large numbers. Therefore, the execution quantity of the target instruction determined by the method provided by the application is more accurate, and the normal safe encryption process, the machine learning process and the like can be directly filtered out, so that the false alarm rate is reduced.
Meanwhile, the experiment determines that the process of executing the consensus contract has a higher proportion of executing the target instruction than the normal process. And executing the predetermined function is performed with a relatively stable periodicity. Therefore, in this embodiment, according to the proportion feature between the number of the target objects won by the last called key instruction set and the total number of any instructions executed by the target process and the fluctuation condition of the proportion, it is determined whether the proportion of executing the target instructions by the target process is higher or not and shows stable periodicity. In turn, a quick determination is made as to whether the target process is executing a specified consensus contract (i.e., a blockchain consensus contract that employs a workload certification mechanism).
Further, the total number list NUM obtained in this embodiment does not need to distinguish between different instruction types, so that only a simple counter is used, and no great calculation effort is required.
In an exemplary embodiment of the present application, the target period is composed of p sub-periods connected in sequence and having the same length.
Meanwhile, the step S500 includes:
s510, if PL is more than Y1 and FL is less than Y2, acquiring a memory average occupancy rate list C and a video memory average occupancy rate list G corresponding to the target time period; wherein c= (C 1 ,C 2 ,…,C q ,…,C p );q=1,2,…,p;C q The average occupancy rate of the memory corresponding to the target process in the q-th sub-time period; g= (G) 1 ,G 2 ,…,G q ,…,G p );G q And the average occupancy rate of the video memory corresponding to the target process in the qth sub-time period.
S520, determining a storage occupancy feature vector CT= (CT) according to C and G 1 ,CT 2 ,…,CT q ,…,CT p );CT q =(C q ,G q );CT q Is the q-th characteristic parameter set in CT.
S530, inputting the CT into a preset K-means classification module, and if the K-means classification module does not classify the CT into any preset classification set, determining the target process as a designated consensus contract execution process; the preset classification set is determined according to a known machine learning execution process and/or a game execution process.
When the common contract related instruction is executed, the occupation characteristics of the common contract related instruction on the memory and the display memory are different from the characteristics of normal behaviors such as machine learning, encryption calculation and the like. Therefore, in this embodiment, in order to further reduce the false alarm rate, under the conditions that PL is greater than Y1 and FL is less than Y2, the average occupancy rate of the memory and the average occupancy rate of the video memory corresponding to the target process in each sub-period in the target period are further obtained, and the corresponding storage occupancy feature vector CT is established, so that the CT can include the memory occupancy feature and the video memory occupancy feature of the target process at the same time. And determining the target process as a designated consensus contract execution process when the K-means classification module does not classify the CT into any preset classification set by using a preset K-means classification module.
Because the update of the consensus contracts is faster and the differences between them are larger, if a classification set is established using the known features that execute the designated consensus contracts, and if the CT is classified into any classification set, determining the target process as the designated consensus contract executing process may result in an inability to effectively detect if the target process executes a new consensus contract. Therefore, in the application, the preset classification set is determined according to the known machine learning execution process and/or game execution process, so that the effective detection of the execution process of the new consensus contract can be effectively improved.
In an exemplary embodiment of the present application, after the step S100, the method further includes:
s110, determining a time interval list s= (S) 1 ,S 2 ,…,S j ,…,S m ) J=1, 2, …, m; m=n-1; where m is the number of time intervals, S j For the j-th time interval in S, S j =TIME j+1 -TIME j
The step S500 includes:
s501, if PL is more than Y1, FL is less than Y2 and SD is less than Y3, determining the target process as a designated consensus contract execution process; wherein SD is a duration fluctuation value, sd= (Σ) j=1 m (S j -avg (S)))/m; y3 is a preset time amount fluctuation threshold.
Experiments prove that when a process executes a consensus contract, the hash function is periodically called (the execution of the hash function can greatly execute the target instructions), and when a normal process jumps the control flow, the normal process is always random. Thus, in this embodiment, the time interval for calling the critical instruction set every two adjacent times is determined to obtain S. And obtaining a duration fluctuation value according to a plurality of time intervals in the S, and judging together with the key proportion and the proportion fluctuation value to determine whether the target process is an execution process of the appointed consensus contract, thereby identifying accuracy.
In an exemplary embodiment of the present application, before the step S100, the method further includes:
s000, in response to the CPU occupancy rate or the GPU occupancy rate being continuously larger than a preset occupancy rate threshold value within a preset duration, determining a process with the largest current CPU occupancy rate or GPU occupancy rate as a target process, and entering step S100.
In this embodiment, in order to further save the use of computing power, the above-mentioned processing steps are not required to be performed on each process in the electronic device, but only when the CPU occupancy rate or the GPU occupancy rate of the electronic device is continuously greater than the preset occupancy rate threshold value within the third set period of time, the process with the current CPU occupancy rate or the GPU occupancy rate being the largest is determined as the target process, and a specific abnormal process determination process is performed. Specifically, the third set period of time may be determined empirically, and in this embodiment, the third set period of time is 10 minutes.
Referring to fig. 2, in another aspect of the present application, there is provided an identification device for specifying a consensus contract execution process, including:
the acquisition module is used for determining call information corresponding to the currently called key instruction set every time the target process calls any key instruction set in the target time period to obtain a call information list D= (D) 1 ,D 2 ,…,D i ,…,D n );D i =(TIME i ,NAME i ) The method comprises the steps of carrying out a first treatment on the surface of the i=1, 2, …, n; wherein n is the number of times the target process calls the key instruction set in the target time period; d (D) i Call information corresponding to an ith key instruction set called for the target process; TIME (TIME) i Time, NAME, when the ith critical instruction set is invoked for the target process i An instruction set name of an ith key instruction set called for the target process;
the mapping module is used for determining a target quantity list set B= (B) according to the D and a preset name-quantity mapping table 1 ,B 2 ,…,B i ,…,B n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein B is i For D i Corresponding to the number of target instructions in the key instruction set;
a number determination module for determining a total number list Num= (NUM) according to D 1 ,NUM 2 ,…,NUM i ,…,NUM n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein NUM i For D i Corresponding total number, and if i=1, 2, …, n-1, NUM i For TIME i To TIME i+1 The total number of arbitrary instructions executed by the target process over a period of time,if i=n, NUM i For TIME i To TIME i +(TIME n -TIME 1 ) The total number of arbitrary instructions executed by the target process within the time period of/(n-1);
a proportion determining module for obtaining a target proportion list l= (L) according to B and NUM 1 ,L 2 ,…,L i ,…,L n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein L is i For the ith target proportion, L i =B i /NUM i
A determination module for determining the target process as a specified consensus contract execution process in the case of PL > Y1 and FL < Y2; wherein Y1 is a preset proportion threshold, Y2 is a preset proportion fluctuation threshold, PL is a key proportion, and FL is a proportion fluctuation value; pl= (Σ) i=1 n L i )/n;FL=((∑ i=1 n (L i -PL) 2 )/n) 1/2
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order or that all illustrated steps be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
Those skilled in the art will appreciate that the various aspects of the application may be implemented as a system, method, or program product. Accordingly, aspects of the application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device according to this embodiment of the application. The electronic device is merely an example, and should not impose any limitations on the functionality and scope of use of embodiments of the present application.
The electronic device is in the form of a general purpose computing device. Components of an electronic device may include, but are not limited to: the at least one processor, the at least one memory, and a bus connecting the various system components, including the memory and the processor.
Wherein the memory stores program code that is executable by the processor to cause the processor to perform steps according to various exemplary embodiments of the application described in the "exemplary methods" section of this specification.
The storage may include readable media in the form of volatile storage, such as Random Access Memory (RAM) and/or cache memory, and may further include Read Only Memory (ROM).
The storage may also include a program/utility having a set (at least one) of program modules including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The bus may be one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.
The electronic device may also communicate with one or more external devices (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device, and/or with any device (e.g., router, modem, etc.) that enables the electronic device to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface. And, the electronic device may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through a network adapter. The network adapter communicates with other modules of the electronic device via a bus. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with an electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the application may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the application as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present application, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present application should be included in the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. A method of identifying a specified consensus contract execution process, comprising:
s100, in the target time period, determining call information corresponding to the currently called key instruction set when any key instruction set is called by the target process, so as to obtain a call information list D= (D) 1 ,D 2 ,…,D i ,…,D n );D i =(TIME i ,NAME i ) The method comprises the steps of carrying out a first treatment on the surface of the i=1, 2, …, n; wherein n is the targetThe times of calling the key instruction set by the target process in the time period; d (D) i Call information corresponding to an ith key instruction set called for the target process; TIME (TIME) i Time, NAME, when the ith critical instruction set is invoked for the target process i An instruction set name of an ith key instruction set called for the target process; the execution of the key instruction set is used for accelerating the execution of the corresponding preset function;
s200, determining a target quantity list set B= (B) according to the D and a preset name-quantity mapping table 1 ,B 2 ,…,B i ,…,B n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein B is i For D i The execution times of target instructions in a preset function corresponding to the acceleration of the key instruction set;
s300, determining a total number list NUM= (NUM) according to D 1 ,NUM 2 ,…,NUM i ,…,NUM n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein NUM i For D i Corresponding total number, and if i=1, 2, …, n-1, NUM i For TIME i To TIME i+1 The total number of arbitrary instructions executed by the target process during the period of (1), if i=n, NUM i For TIME i To TIME i +(TIME n -TIME 1 ) The total number of arbitrary instructions executed by the target process within the time period of/(n-1);
s400, according to B and NUM, obtaining a target proportion list L= (L) 1 ,L 2 ,…,L i ,…,L n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein L is i For the ith target proportion, L i =B i /NUM i
S500, if PL is more than Y1 and FL is less than Y2, determining the target process as a designated consensus contract execution process; wherein Y1 is a preset proportion threshold, Y2 is a preset proportion fluctuation threshold, PL is a key proportion, and FL is a proportion fluctuation value; pl= (Σ) i=1 n L i )/n;FL=((∑ i=1 n (L i -PL) 2 )/n) 1/2
2. The method for identifying a specified consensus contract execution process according to claim 1, wherein the target time period consists of p sub-time periods which are connected in sequence and have the same length;
the step S500 includes:
s510, if PL is more than Y1 and FL is less than Y2, acquiring a memory average occupancy rate list C and a video memory average occupancy rate list G corresponding to the target time period; wherein c= (C 1 ,C 2 ,…,C q ,…,C p );q=1,2,…,p;C q The average occupancy rate of the memory corresponding to the target process in the q-th sub-time period; g= (G) 1 ,G 2 ,…,G q ,…,G p );G q The average occupancy rate of the video memory corresponding to the target process in the q sub-time period;
s520, determining a storage occupancy feature vector CT= (CT) according to C and G 1 ,CT 2 ,…,CT q ,…,CT p );CT q =(C q ,G q );CT q The q characteristic parameter group in CT;
s530, inputting the CT into a preset K-means classification module, and if the K-means classification module does not classify the CT into any preset classification set, determining the target process as a designated consensus contract execution process; the preset classification set is determined according to a known machine learning execution process and/or a game execution process.
3. The method for identifying a specified consensus contract executing process according to claim 1, further comprising, after said step S100:
s110, determining a time interval list s= (S) 1 ,S 2 ,…,S j ,…,S m ) J=1, 2, …, m; m=n-1; where m is the number of time intervals, S j For the j-th time interval in S, S j =TIME j+1 -TIME j
The step S500 includes:
s501, if PL is more than Y1, FL is less than Y2 and SD is less than Y3, determining the target process as a designated consensus contract execution process; wherein SD is a duration fluctuation value, sd= (Σ) j=1 m (S j -avg (S)))/m; y3 is a preset time amount fluctuation threshold.
4. The method for identifying a specified consensus contract execution process according to claim 1, wherein a name-number mapping table Ys= (YS) 1 ,YS 2 ,…,YS b ,…,YS d );YS b =(YNANE b ,YN b ) The method comprises the steps of carrying out a first treatment on the surface of the b=1, 2, …, d; d is the number of preset key instruction sets; YS (YS) b Mapping relation information corresponding to a preset b-th key instruction set; YNANE b For the instruction set name corresponding to the preset b-th key instruction set, YN b And the mapping quantity corresponding to the preset b-th key instruction set.
5. The method for identifying a specified consensus contract executing process according to claim 4, wherein said step S200 comprises:
s210, traversing D, if NAME i =YNANE b Then determine B i =YN b
6. The method of claim 1, wherein the target instruction comprises at least one of:
bit operation instructions, floating point operation instructions, multiplication instructions, division instructions, subtraction instructions, addition instructions, vector operation instructions.
7. The method for identifying a specified consensus contract executing process according to claim 1, further comprising, prior to said step S100:
s000, in response to the CPU occupancy rate or the GPU occupancy rate being continuously larger than a preset occupancy rate threshold value within a preset duration, determining a process with the largest current CPU occupancy rate or GPU occupancy rate as a target process, and entering step S100.
8. An identifying device for specifying a consensus contract execution process, comprising:
the acquisition module is used for determining call information corresponding to the currently called key instruction set every time the target process calls any key instruction set in the target time period to obtain a call information list D= (D) 1 ,D 2 ,…,D i ,…,D n );D i =(TIME i ,NAME i ) The method comprises the steps of carrying out a first treatment on the surface of the i=1, 2, …, n; wherein n is the number of times the target process calls the key instruction set in the target time period; d (D) i Call information corresponding to an ith key instruction set called for the target process; TIME (TIME) i Time, NAME, when the ith critical instruction set is invoked for the target process i An instruction set name of an ith key instruction set called for the target process;
the mapping module is used for determining a target quantity list set B= (B) according to the D and a preset name-quantity mapping table 1 ,B 2 ,…,B i ,…,B n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein B is i For D i Corresponding to the number of target instructions in the key instruction set;
a number determination module for determining a total number list Num= (NUM) according to D 1 ,NUM 2 ,…,NUM i ,…,NUM n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein NUM i For D i Corresponding total number, and if i=1, 2, …, n-1, NUM i For TIME i To TIME i+1 The total number of arbitrary instructions executed by the target process during the period of (1), if i=n, NUM i For TIME i To TIME i +(TIME n -TIME 1 ) The total number of arbitrary instructions executed by the target process within the time period of/(n-1);
a proportion determining module for obtaining a target proportion list l= (L) according to B and NUM 1 ,L 2 ,…,L i ,…,L n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein L is i For the ith target proportion, L i =B i /NUM i
A determination module for determining the target process as a specified consensus contract execution process in the case of PL > Y1 and FL < Y2; wherein Y1 is a preset proportion threshold value, Y2 is a preset proportionFluctuation threshold, PL is the key proportion, FL is the proportion fluctuation value; pl= (Σ) i=1 n L i )/n;FL=((∑ i=1 n (L i -PL) 2 )/n) 1/2
9. An electronic device comprising a processor and a memory;
the processor is configured to perform the steps of the method according to any one of claims 1 to 7 by invoking a program or instruction stored in the memory.
10. A non-transitory computer-readable storage medium storing a program or instructions that cause a computer to perform the steps of the method of any one of claims 1 to 7.
CN202311303215.6A 2023-10-10 2023-10-10 Identification method, device, equipment and medium for appointed consensus contract execution process Active CN117033146B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311303215.6A CN117033146B (en) 2023-10-10 2023-10-10 Identification method, device, equipment and medium for appointed consensus contract execution process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311303215.6A CN117033146B (en) 2023-10-10 2023-10-10 Identification method, device, equipment and medium for appointed consensus contract execution process

Publications (2)

Publication Number Publication Date
CN117033146A true CN117033146A (en) 2023-11-10
CN117033146B CN117033146B (en) 2023-12-08

Family

ID=88637734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311303215.6A Active CN117033146B (en) 2023-10-10 2023-10-10 Identification method, device, equipment and medium for appointed consensus contract execution process

Country Status (1)

Country Link
CN (1) CN117033146B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117726050A (en) * 2024-02-08 2024-03-19 中航信移动科技有限公司 Task execution number determining method, electronic device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464589A (en) * 2020-03-03 2020-07-28 深圳壹账通智能科技有限公司 Intelligent contract processing method, computer equipment and storage medium
CN112748960A (en) * 2019-10-30 2021-05-04 腾讯科技(深圳)有限公司 Process control method and device, electronic equipment and storage medium
US20210326352A1 (en) * 2020-04-17 2021-10-21 International Business Machines Corporation Faster view change for blockchain
CN113743055A (en) * 2020-05-29 2021-12-03 腾讯科技(深圳)有限公司 Text information processing method and device, electronic equipment, server and storage medium
CN114936093A (en) * 2022-05-30 2022-08-23 蚂蚁区块链科技(上海)有限公司 Transaction execution method in blockchain system, node and blockchain system
US20220337602A1 (en) * 2021-04-19 2022-10-20 Mitsubishi Electric Research Laboratories, Inc. Blockchain-Based Accountable Distributed Computing System

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112748960A (en) * 2019-10-30 2021-05-04 腾讯科技(深圳)有限公司 Process control method and device, electronic equipment and storage medium
CN111464589A (en) * 2020-03-03 2020-07-28 深圳壹账通智能科技有限公司 Intelligent contract processing method, computer equipment and storage medium
US20210326352A1 (en) * 2020-04-17 2021-10-21 International Business Machines Corporation Faster view change for blockchain
CN113743055A (en) * 2020-05-29 2021-12-03 腾讯科技(深圳)有限公司 Text information processing method and device, electronic equipment, server and storage medium
US20220337602A1 (en) * 2021-04-19 2022-10-20 Mitsubishi Electric Research Laboratories, Inc. Blockchain-Based Accountable Distributed Computing System
CN114936093A (en) * 2022-05-30 2022-08-23 蚂蚁区块链科技(上海)有限公司 Transaction execution method in blockchain system, node and blockchain system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SUSUMU OHNUMA: "Consensus building: Process design toward finding a shared recognition of common goal beyond conflicts", 《HANDBOOK OF SYSTEMS SCIENCES》, pages 645 - 662 *
曾土花: "区块链赋能网络意识形态治理的内在机理与创新路径", 《政府现代化》, no. 7, pages 47 - 56 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117726050A (en) * 2024-02-08 2024-03-19 中航信移动科技有限公司 Task execution number determining method, electronic device and storage medium
CN117726050B (en) * 2024-02-08 2024-05-10 中航信移动科技有限公司 Method for determining execution quantity of target flight tasks, electronic device and storage medium

Also Published As

Publication number Publication date
CN117033146B (en) 2023-12-08

Similar Documents

Publication Publication Date Title
CN107885762B (en) Intelligent big data system, method and equipment for providing intelligent big data service
US11966778B2 (en) Cloud application scaler
CN117033146B (en) Identification method, device, equipment and medium for appointed consensus contract execution process
US11144330B2 (en) Algorithm program loading method and related apparatus
AU2016204093B2 (en) System and method for detecting outliers in real-time for a univariate time-series signal
CN113515399A (en) Data anomaly detection method and device
CN117034276B (en) Abnormal process determining method and device, electronic equipment and storage medium
CN117688342B (en) Model-based equipment state prediction method, electronic equipment and storage medium
CN117896181B (en) Anomaly data determination method, device, medium and equipment based on HMM model
CN112948223A (en) Method and device for monitoring operation condition
CN116861430B (en) Malicious file detection method, device, equipment and medium
CN111476349A (en) Model testing method and server
CN115311764A (en) Door lock safety evaluation method and related equipment
CN117056927B (en) Method, device, equipment and medium for determining malicious process based on instruction
CN114201729A (en) Method, device and equipment for selecting matrix operation mode and storage medium
CN117034261B (en) Exception detection method and device based on identifier, medium and electronic equipment
CN116881918B (en) Process safety detection protection method and device, electronic equipment and medium
CN117130873B (en) Task monitoring method and device
CN116861428B (en) Malicious detection method, device, equipment and medium based on associated files
CN115604091A (en) Data processing method and device, substrate control management system and electronic equipment
CN116992439B (en) User behavior habit model determining method, device, equipment and medium
CN116010026B (en) Micro-service control method and control system based on virtual path
CN110399243B (en) Blue screen reason determining method, system, computer readable medium and electronic device
CN112114972B (en) Data inclination prediction method and device
CN116861429B (en) Malicious detection method, device, equipment and medium based on sample behaviors

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
GR01 Patent grant
GR01 Patent grant