A cyberspace asset detection method and system based on automatic task scheduling
Through automatic task orchestration technology, network space asset detection is optimized based on real-time network topology and load conditions, solving the problems of low efficiency and load imbalance in existing technologies, and achieving efficient and balanced asset detection and management.
Patent Information
- Application Number
- CN202410243803.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-04
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-03-04
AI Technical Summary
Existing cyberspace asset detection methods are difficult to adapt to complex and changeable network environments and require manual assistance to specify the detection range, resulting in low detection efficiency and load imbalance, which affects network transmission.
A method based on automatic task orchestration is adopted to obtain the real-time network space topology, generate asset detection subtasks, combine related tasks, automatically arrange execution threads and sequences, and partition tasks according to real-time load to achieve task execution with the highest detection efficiency.
It improves the efficiency of asset detection, maintains load balancing during the detection process, avoids the impact on network transmission, and improves the efficiency and security of cyberspace asset management.
Smart Images

Figure CN118200148B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and system for detecting cyberspace assets based on automatic task scheduling. Background Art
[0002] Cyberspace assets refer to various resources and entities existing in cyberspace, including but not limited to data assets, equipment assets, network service assets, software assets, etc. Identifying the ownership of network assets helps to better manage network resources, optimize different assets, and improve network performance and efficiency.
[0003] Traditional cyberspace asset detection methods mainly include active detection and passive detection. Passive detection is a method that does not directly initiate requests or scans to the target, but obtains information about the target by monitoring network traffic and observing data in the network. Passive detection does not actively initiate connections or scans to the target, but passively collects information. This method is usually used to monitor the network, discover and identify the existence and behavior of target assets without having a direct impact on the target assets. Active detection is a method that directly initiates requests and scans to the target, used to actively discover and identify assets in the network. Active detection sends specific requests to the target, such as port scans, vulnerability scans, etc., to obtain information about the target assets. This method is a proactive way to help gain a deeper understanding of the security status of the network and discover potential security vulnerabilities.
[0004] However, the existing technologies, whether active or passive detection, are often difficult to adapt to complex and changing network environments. Manual assistance is usually required to specify the detection range, and the detection process is only mechanically performed one by one, which may cause load imbalance, resulting in low detection efficiency and affecting network transmission. Summary of the invention
[0005] In order to solve the technical problems that the prior art is difficult to adapt to the complex and changeable network environment, usually requires manual assistance to specify the detection range, and the detection process is only mechanically performed one by one, which may cause load imbalance, resulting in low detection efficiency and affecting network transmission, the present invention provides a cyberspace asset detection method and system based on automatic task scheduling.
[0006] The technical solution provided by the embodiment of the present invention is as follows:
[0007] First aspect
[0008] An embodiment of the present invention provides a method for detecting cyberspace assets based on automatic task scheduling, comprising:
[0009] S1: Get asset detection instructions;
[0010] S2: Responding to the asset detection instruction, obtaining a real-time network space topology structure;
[0011] S3: generating a plurality of asset detection subtasks according to the real-time network space topology structure;
[0012] S4: according to the detection objects of each asset detection subtask, the asset detection subtasks detecting the same object are combined into a theme;
[0013] S5: Based on the dependencies between the topics, with the goal of maximizing detection efficiency, automatically schedule tasks for each topic and determine the execution threads and execution order of each topic;
[0014] S6: According to the determined execution threads and execution order, partition tasks are assigned to each topic one by one according to the real-time load situation;
[0015] S7: Actively detect assets in the partitions and summarize the detection results to obtain cyberspace asset detection results.
[0016] Second aspect
[0017] An embodiment of the present invention provides a cyberspace asset detection system based on automatic task scheduling, comprising:
[0018] processor;
[0019] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method for detecting cyberspace assets based on automatic task scheduling as described in the first aspect is implemented.
[0020] The third aspect
[0021] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method for detecting cyberspace assets based on automatic task scheduling as described in the first aspect is implemented.
[0022] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0023] In the present invention, task scheduling can be automatically performed according to the real-time network space topology structure to realize asset detection. In the scheduling process, the dependencies between various topics are taken into consideration, and the execution thread and execution order of each topic are determined with the highest detection efficiency as the goal, thereby improving the asset detection efficiency. When performing partition task allocation, task partitioning is performed according to the real-time load situation to maintain load balance during the detection process and avoid affecting network transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 A flowchart of a method for detecting cyberspace assets based on automatic task scheduling provided by an embodiment of the present invention;
[0026] Figure 2 A flowchart of a task scheduling method provided by an embodiment of the present invention;
[0027] Figure 3 A flowchart of a partition task allocation method provided by an embodiment of the present invention;
[0028] Figure 4 A schematic diagram of the structure of a cyberspace asset detection system based on automatic task scheduling provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0030] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0031] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0032] In the embodiments of the present invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.
[0033] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0034] Reference Manual Attached Figure 1 , showing a flow chart of a cyberspace asset detection method based on automatic task orchestration provided by an embodiment of the present invention.
[0035] The embodiment of the present invention provides a method for detecting cyberspace assets based on automatic task scheduling, which can be implemented by a cyberspace asset detection device based on automatic task scheduling, and the cyberspace asset detection device based on automatic task scheduling can be a terminal or a server. The processing flow of the method for detecting cyberspace assets based on automatic task scheduling may include the following steps:
[0036] S1: Get asset detection instructions.
[0037] Specifically, the asset detection instruction may be an instruction initiated by a user through a computer.
[0038] S2: Responding to the asset detection instruction, obtaining the real-time network space topology structure.
[0039] Specifically, you can use network scanning tools such as Nmap and ZMap to actively send detection data packets to the network to obtain the target network's device information, open ports, service types, etc. You can also deploy passive network monitoring devices such as IDS / IPS (intrusion detection system / intrusion prevention system) and network traffic analyzers to monitor network traffic, analyze packet capture data, and obtain communication information between network devices, thereby building a network topology.
[0040] S3: Generate multiple asset detection subtasks based on the real-time network space topology.
[0041] Specifically, the target device or target range that needs to be detected can be determined based on the device information in the topology structure, which may be a specific IP address range, a specific type of device (such as a database server, Web server, etc.). Each target device or target range is regarded as a subtask, and each subtask represents asset detection for a specific device or a group of devices. Furthermore, the specific detection method and parameters of each subtask can be determined based on the device type and requirements. For example, database port scanning can be selected for a database server, and HTTP detection can be selected for a Web server.
[0042] In the present invention, by analyzing the real-time network topology, a corresponding asset detection subtask can be generated for each device or device component in the network, thereby ensuring comprehensive detection of the entire network, improving the adaptability of asset detection technology to complex network environments, and ensuring the flexibility and stability of the task, which helps to promptly discover security risks and problems in the network.
[0043] S4: According to the detection objects of each asset detection subtask, the asset detection subtasks that detect the same object are combined into a theme.
[0044] It should be noted that the benefit of combining asset detection subtasks for detecting the same object into a theme is that it can optimize task execution efficiency and resource utilization, avoid repeated detection of the same target, and combine related detection tasks together to better manage and schedule tasks.
[0045] Furthermore, combining asset detection subtasks that detect the same object into a theme can optimize the execution efficiency and resource utilization of the task, and improve the overall performance and stability of the system. Combining asset detection subtasks that detect the same object into a theme can optimize the execution efficiency and resource utilization of the task, and improve the overall performance and stability of the system.
[0046] S5: Based on the dependencies between the topics, with the goal of maximizing detection efficiency, automatically schedule tasks for each topic and determine the execution threads and execution order of each topic.
[0047] Among them, dependencies include: data dependencies, control dependencies and conditional dependencies.
[0048] Data dependency means that the execution of one topic depends on the data generated by another topic. For example, the execution of topic B depends on the data generated by the execution of topic A.
[0049] The control dependency constraint means that the execution of one topic depends on the control state of another topic. For example, the execution of topic B depends on the state of topic A when it is executed.
[0050] Among them, the conditional dependency constraint means that the execution of one topic needs to depend on the result of the execution of another topic as a condition. For example, it means that the execution of topic B needs to depend on the result of the execution of topic A as a condition.
[0051] Reference Manual Attached Figure 2 , which shows a flow chart of a task scheduling method provided by an embodiment of the present invention.
[0052] In a possible implementation, S5 specifically includes sub-steps S501 to S503:
[0053] S501: With the highest detection efficiency as the goal, construct the task scheduling objective function:
[0054] F(X)=max[λ1D(X)-λ2T(X)]
[0055] The detection efficiency is quantified by bandwidth utilization and detection time, F() represents the task scheduling objective function, X represents the task execution scheduling combination, X = [x ijk ], x ijk Indicates that the i-th topic is executed in the j-th thread for the kth time. When x ijk =1, when x ijk =0, no execution; max represents the maximum value; D represents the bandwidth utilization; D(X) represents the detection accuracy when the task execution arrangement combination X is used for detection; λ1 represents the weight coefficient of the detection accuracy; T represents the detection time; T(X) represents the detection time when the task execution arrangement combination X is used for detection; and λ2 represents the weight coefficient of the detection time.
[0056] Among them, those skilled in the art can set the weight coefficient λ1 of detection accuracy and the weight coefficient λ2 of detection time according to actual conditions, and the present invention does not limit it. The importance of detection accuracy and detection time can be adjusted according to different application scenarios and requirements. This can make the system more flexible to adapt to different detection tasks and environments.
[0057] It should be noted that in the task scheduling objective function, the system can maximize the detection efficiency by balancing bandwidth utilization and detection time.
[0058] In the present invention, optimizing the objective function can enable the system to reduce detection time and resource consumption as much as possible while ensuring detection accuracy, thereby achieving the highest detection efficiency, helping to effectively discover security issues and asset conditions in the network, and improving network security and management efficiency.
[0059] S502: Setting task scheduling constraints.
[0060] The task scheduling constraints include:
[0061] Thread constraints mean that each topic can only be executed in a certain thread:
[0062]
[0063] Where j=1,2,L,m, and m represents the total number of threads.
[0064] It should be noted that thread constraints ensure that each topic has a clear thread in charge during execution, avoiding the situation where multiple topics occupy the same thread at the same time, and helping to reasonably allocate system resources.
[0065] Topic constraints indicate that each topic can only be executed once:
[0066]
[0067] Where i=1,2,L,n, and n represents the total number of topics.
[0068] It should be noted that the topic constraint ensures that each topic will only be executed once, avoiding repeated execution of the same task and ensuring the integrity and correctness of task execution.
[0069] Data dependency constraints mean that when the execution of Topic B depends on the data generated by the execution of Topic A, Topic A takes precedence over Topic B.
[0070] It should be noted that when Topic B is executed, the data it depends on has been generated by Topic A, ensuring the accuracy and consistency of the data.
[0071] The control dependency constraint means that when the execution of Topic B depends on the state of Topic A for control, Topic A takes precedence over Topic B.
[0072] It should be noted that the control dependency constraint ensures that before the execution of topic B, topic A has completed the necessary state control or preparation work, ensuring the correctness and stability of the task execution order.
[0073] A conditional dependency constraint means that when the execution of Topic B depends on the result of the execution of Topic A as a condition, Topic A takes precedence over Topic B.
[0074] It should be noted that the conditional dependency constraint ensures that the conditions that Topic B depends on during execution have been satisfied by Topic A, thus avoiding incorrect execution or task failure caused by unsatisfied conditions.
[0075] Load balancing constraint means that the load balancing prediction value during the detection process is within a safe range.
[0076] It should be noted that the load balancing constraint ensures that the load of the system is evenly distributed during the detection process, avoiding system instability or performance degradation caused by excessive load on some threads or nodes.
[0077] Optionally, the load balancing prediction value is specifically:
[0078]
[0079] Among them, a j represents the total data volume of the jth thread, Indicates the average amount of data for each thread.
[0080] In the present invention, the calculation of load balancing prediction value helps to optimize the utilization of system resources. By monitoring and predicting the load balancing situation, task allocation can be adjusted in time to avoid wasting system resources due to overloading of some threads, or reducing system performance due to underloading of some threads.
[0081] S503: Under the constraints of the task scheduling constraints, with the goal of maximizing the function value of the task scheduling objective function, the execution threads and execution order of each topic are determined through an improved sparrow search algorithm.
[0082] Among them, the Sparrow Search Algorithm (SSA) is a heuristic optimization algorithm based on the foraging behavior and territory competition behavior of sparrows in nature. It simulates the behavior of sparrows in finding food and protecting territory, and searches for the optimal solution through the process of foraging and competing for territory.
[0083] It should be noted that by determining the execution threads and execution order of each topic through the improved sparrow search algorithm, and taking the maximum function value of the task scheduling objective function as the goal, the task scheduling can be optimized, and the efficiency of asset detection, resource utilization and system stability can be improved.
[0084] In a possible implementation manner, S503 specifically includes:
[0085] Initialize the sparrow population, which contains multiple individuals, each of which represents a feasible task execution arrangement combination.
[0086] The task scheduling objective function is used as the fitness function of the improved sparrow search algorithm:
[0087] Individuals in a sparrow population were classified into finders, followers, and anti-predators.
[0088] It should be noted that by dividing the sparrow individuals into discoverers, followers and anti-predators, the algorithm can perform global search and local search at the same time. During the iteration process, the discoverer calculates the distance with other sparrow individuals to find the optimal neighbor individuals with higher fitness values, thereby promoting global search; while followers and anti-predators search in local areas, which helps to converge to the local optimal solution faster.
[0089] Calculate the distance between the current discoverer and other sparrow individuals:
[0090] D j =||XX j ||2
[0091] Among them, D j represents the distance between the current discoverer and the jth sparrow individual, X represents the task execution arrangement combination represented by the current discoverer, and X j represents the task execution arrangement combination represented by the j-th sparrow individual, and || ||2 represents the two-norm calculation.
[0092] The sparrow individual with the highest fitness value among the sparrow individuals whose distance to the current discoverer is less than the preset distance is taken as the optimal neighbor individual.
[0093] At each iteration, the finder's position is updated according to the following formula:
[0094]
[0095] in, represents the position of the i-th discoverer at the t+1th iteration, represents the position of the i-th individual at the t-th iteration, exp() represents the exponential function with the natural constant e as the base, i represents the index value of the individual, r1 represents a random number between 0 and 1, T represents the maximum number of iterations, R2 represents the alarm value, ST represents the safety threshold, w represents the adaptive weight factor, and f b represents the fitness of the current global optimal individual, R2 represents a random number that follows a normal distribution in the interval 0 to 1, and I represents the unit column matrix.
[0096] Among them, the innovative introduction of the adaptive weight factor w can be dynamically adjusted during the iteration process, making the change of the step size more flexible. When R2<ST, w·r1·f b The role of is to explore around the current position.
[0097] It should be noted that the introduction of adaptive weight factors can make the search process more diverse and global, helping to avoid falling into the local optimal solution. The adjustment of the adaptive weight factor can balance the algorithm between exploring and utilizing the current optimal solution, avoiding falling into the local optimal solution in the early stage.
[0098] As the traditional sparrow search algorithm is easy to fall into the local optimal solution, mutation processing is introduced to the sparrow individuals.
[0099] Generate a random number and compare it with the mutation probability. If the random number is smaller than the mutation probability, update the position of the discoverer twice:
[0100]
[0101] Wherein, r2 represents a random number between 0 and 1.
[0102] In the present invention, by introducing mutation processing, the algorithm can have more randomness in the search process, thereby increasing the diversity of the search, helping to avoid the algorithm from falling into the local optimal solution, and improving the algorithm's global search ability. Mutation processing can prompt the algorithm to conduct a wider exploration in the search space, try to jump out of the limitations of the local optimal solution, and help find a better solution. This can increase the possibility of the algorithm finding the global optimal solution.
[0103] Optionally, the mutation probability is specifically:
[0104]
[0105] Among them, P t represents the mutation probability at the tth iteration, P0 represents the initial mutation probability, PT represents the termination mutation probability, and e represents the natural constant.
[0106] It should be noted that the lower mutation probability at the beginning helps the algorithm to make more use of the solution space near the current optimal solution and perform local optimization, thereby accelerating convergence; and as the number of iterations increases, the mutation probability increases, which helps the algorithm gradually jump out of the local optimal solution and conduct more extensive exploration, balancing the relationship between exploration and utilization. In the early stage, more attention can be paid to exploring the breadth of the search space, and in the later stage, more attention can be paid to the depth of the search space, which helps to search the solution space more comprehensively.
[0107] In the present invention, the introduction of a mutation probability mechanism that changes with the number of iterations helps the algorithm to gradually adjust the exploration strategy during the search process, balance exploration and utilization, increase diversity, and adaptively adjust the search strategy, thereby improving the global search capability and robustness of the algorithm.
[0108] Update the follower's position according to the following formula:
[0109]
[0110] in, represents the position of the i-th follower at the t+1th iteration, represents the global worst position at the tth iteration, A represents the optimal position of the discoverer at the t+1th iteration. + =A T (AA T ) -1 , A represents a random row matrix, the elements in A are 1 or -1, and m represents the total number of individuals in the population.
[0111] Update the position of the anti-predator according to the following formula:
[0112]
[0113] in, represents the position of the i-th anti-predator at the t+1th iteration, represents the global optimal position at the tth iteration, τ represents the step size control parameter, K represents a random number between -1 and 1, and f i represents the fitness of the current individual, f grepresents the fitness of the individual in the optimal position, f w represents the fitness of the individual in the worst position, and ε represents a hyperparameter that avoids the denominator being 0.
[0114] When the number of iterations reaches the maximum number of iterations, the individual with the highest current fitness is output, and the task execution arrangement combination represented by the individual with the highest fitness is taken as the optimal task execution arrangement combination and output.
[0115] In the present invention, the improved sparrow search algorithm can effectively arrange tasks to improve the efficiency and quality of task execution. The algorithm has strong global search ability, adaptability and diversity maintenance characteristics, and can achieve good optimization effects in different problem scenarios.
[0116] S6: According to the determined execution threads and execution order, partition tasks are assigned to each topic one by one according to the real-time load situation.
[0117] It should be noted that allocating tasks according to real-time load conditions can help maintain system load balance. Reasonable allocation of tasks to different execution threads can avoid system performance degradation caused by overloading some threads, while ensuring that all resources are fully utilized, improving the overall efficiency and performance of the system.
[0118] Reference Manual Attached Figure 3 , showing a flow chart of a partition task allocation method provided by an embodiment of the present invention.
[0119] In a possible implementation, S6 specifically includes sub-steps S601 to S605:
[0120] S601: Calculate the dependency parameters between topics at the current moment.
[0121] Optionally, the calculation method of the dependency parameter is as follows:
[0122]
[0123] Among them, c1 represents the number of topics with data dependencies, c2 represents the number of topics with control dependencies, c3 represents the number of topics with conditional dependencies, and N represents the total number of topics to be processed at the current moment.
[0124] In the present invention, the number of topics of data dependency, control dependency, and conditional dependency is normalized to the ratio of the total number of topics, and the impact of different types of dependencies on the overall task is comprehensively considered, so that the dependencies between tasks can be evaluated more comprehensively.
[0125] S602: When the dependency parameter at the current moment is less than the preset parameter value, the RangeAssignor algorithm is used to perform partition task allocation.
[0126] Among them, the RangeAssignor algorithm is a simple and effective task partitioning algorithm, which is suitable for situations with low dependency parameters. Its basic idea is to assign the topics to be processed to different threads in order to ensure that the range of topics processed by each thread is within a fixed range. The specific steps are as follows:
[0127] S603: When the dependency parameter at the current moment is greater than the preset parameter value, the consumer instance change rate at the current moment is calculated.
[0128] Among them, consumer instances refer to individual consumers in a distributed system or message queue system. In a distributed system, entities that perform a specific task in the system are called consumer instances. These entities may be processes, services, containers, or virtual machines running on different computer nodes. These consumer instances usually process tasks, messages, or data received from producers.
[0129] Optionally, the consumer instance change rate is:
[0130]
[0131] Where E represents the consumer instance change rate, e t Indicates the number of consumer instances at the current moment, e t-1 Indicates the number of consumer instances at the previous moment.
[0132] In the present invention, the consumer instance change rate can intuitively reflect the dynamic change of the number of consumers. By comparing the number of consumer instances at the current moment and the previous moment, the increase or decrease of the number of consumers can be known.
[0133] S604: When the consumer instance change rate at the current moment is greater than the preset change rate, the StickyAssignor algorithm is used to perform partition task assignment.
[0134] Among them, the StickyAssignor algorithm is a task partitioning algorithm suitable for cases with high dependency parameters. When the dependency parameter is high, it means that the dependency relationship between topics is complex and a more sophisticated task assignment strategy is required. The basic idea of the StickyAssignor algorithm is "sticky" partitioning, that is, assigning topics processed by a thread to the same thread to reduce the overhead of context switching and data transmission.
[0135] S605: When the consumer instance change rate at the current moment is less than the preset change rate, the RoundRobinAssignor algorithm is used to perform partition task assignment.
[0136] Among them, the RoundRobinAssignor algorithm is a simple and fair task partitioning algorithm, which is suitable for situations where the tasks are relatively uniform and the dependency parameters are low. Its basic idea is to assign the topics to be processed to different threads in a round-robin manner to ensure that the tasks are evenly distributed among the threads.
[0137] It should be noted that the RangeAssignor algorithm, the StickyAssignor algorithm and the RoundRobinAssignor algorithm are already mature existing technologies, but there is currently a lack of innovative technologies that combine the three. The present invention innovatively introduces dependency parameters and consumer instance change rate to dynamically select one of the three for partition task allocation.
[0138] In the present invention, the dynamic adjustment of the task allocation strategy can better adapt to the actual situation of the system during operation, so that the system can maintain an efficient and stable operating state under different loads. This can improve the overall performance and response speed of the system and better meet user needs.
[0139] S7: Actively detect assets in the partitions and summarize the detection results to obtain cyberspace asset detection results.
[0140] In a possible implementation, S7 specifically includes:
[0141] S701: In the partition, scan the corresponding network space to obtain network space asset data.
[0142] S702: According to the cyberspace asset data, determine the category of the cyberspace asset data through a convolutional neural network based on an attention mechanism.
[0143] The Attention Mechanism Convolutional Neural Network (Attention CNN) combines the traditional Convolutional Neural Network (CNN) and the Attention Mechanism (Attention Mechanism), which can more effectively capture important features when processing sequence data and image data.
[0144] Specifically, S702 includes:
[0145] The self-attention of cyberspace asset data is calculated using the following formula:
[0146]
[0147] Among them, H represents self-attention, Q represents query matrix, K represents key matrix and V represents value matrix, and D represents the number of columns of key matrix.
[0148] It should be noted that self-attention can assign different weights to different parts of the input data, allowing the network to pay more attention to important features. This can improve the network's ability to understand the internal relationships of the data and better capture the dependencies and important information between the data.
[0149] Combined with the self-attention of cyberspace asset data, the data features of cyberspace asset data are extracted through convolutional neural networks.
[0150] It should be noted that convolutional neural networks are powerful tools for processing images and sequence data, and can effectively extract local features. Combined with the self-attention mechanism, the network can pay more attention to the internal correlation of the data when extracting features, thus enhancing the expressiveness of features.
[0151] Calculate the cosine similarity between the data features of the cyberspace asset data and each cyberspace asset data in the cyberspace asset database.
[0152] Classify the cyberspace asset data into the category corresponding to the cyberspace asset with the highest cosine similarity.
[0153] It should be noted that cosine similarity can be used to measure the similarity between two vectors, which is very effective in data classification tasks. By calculating the cosine similarity between the feature vector of cyberspace asset data and the feature vector of each cyberspace asset data in the database, similar data can be quickly found and classified into the corresponding category.
[0154] In the present invention, a method combining the self-attention mechanism and the convolutional neural network is used to better extract the characteristics of cyberspace asset data and accurately classify them into corresponding categories, thereby improving the efficiency and accuracy of data processing.
[0155] In a possible implementation, the processing flow of the cyberspace asset detection method based on automatic task scheduling may further include the following steps:
[0156] S8: Compare the cyberspace asset detection results with the cyberspace asset database to determine the lost assets.
[0157] S9: Recover lost assets.
[0158] In the present invention, the process of comparing the network space asset detection results with the database and recovering the lost assets helps to ensure the integrity and security of network space assets, reduce security risks, reduce data loss losses, and improve the efficiency of asset management. These advantages enable the network to make corresponding processing more quickly and effectively when facing asset loss or omission, ensuring the normal operation and security of the network.
[0159] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0160] In the present invention, task scheduling can be automatically performed according to the real-time network space topology structure to realize asset detection. In the scheduling process, the dependencies between various topics are taken into consideration, and the execution thread and execution order of each topic are determined with the highest detection efficiency as the goal, thereby improving the asset detection efficiency. When performing partition task allocation, task partitioning is performed according to the real-time load situation to maintain load balance during the detection process and avoid affecting network transmission.
[0161] Reference Manual Attached Figure 4 , showing a structural schematic diagram of a cyberspace asset detection system based on automatic task scheduling provided by the present invention.
[0162] The present invention further provides a network space asset detection system 20 based on automatic task scheduling, which is applied to the above-mentioned network space asset detection method based on automatic task scheduling, comprising:
[0163] Processor 201;
[0164] The memory 202 stores computer-readable instructions, and when the computer-readable instructions are executed by the processor 201, the cyberspace asset detection method based on automatic task scheduling as described in the method embodiment is implemented.
[0165] The cyberspace asset detection system 20 based on automatic task scheduling provided by the present invention can execute the above-mentioned cyberspace asset detection method based on automatic task scheduling and achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.
[0166] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0167] In the present invention, task scheduling can be automatically performed according to the real-time network space topology structure to realize asset detection. In the scheduling process, the dependencies between various topics are taken into consideration, and the execution thread and execution order of each topic are determined with the highest detection efficiency as the goal, thereby improving the asset detection efficiency. When performing partition task allocation, task partitioning is performed according to the real-time load situation to maintain load balance during the detection process and avoid affecting network transmission.
[0168] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0169] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0170] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0171] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0172] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0173] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0174] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0175] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0176] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0177] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0178] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0179] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0180] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the method for detecting cyberspace assets based on automatic task scheduling as described in the method embodiment is implemented.
[0181] A computer-readable storage medium provided by the present invention can implement the steps and effects of the cyberspace asset detection method based on automatic task scheduling of the above method embodiment. To avoid repetition, the present invention will not go into details.
[0182] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0183] (1) In the present invention, through self-learning, it is possible to give priority to learning samples that are easy to identify based on the difficulty of sample identification, and gradually learn more difficult samples. The sample data can be learned in an orderly manner rather than all at once, which helps the model to gradually accumulate recognition experience, avoid falling into a local optimal solution, and improve the recognition ability of complex and difficult samples, thereby improving the model's accuracy in identifying the ownership of cyberspace assets.
[0184] (2) In the present invention, by calculating the recognition contribution of each asset feature to the identification of cyberspace asset attribution, high-quality features with greater contribution to identification can be screened out, which helps to simplify the model, improve the efficiency of cyberspace asset attribution identification, and reduce the risk of overfitting in practical applications.
[0185] (3) In the present invention, the state and configuration of cyberspace assets may change over time. Through gradual learning and high-quality feature selection, these changes can be adapted, which helps to maintain the timeliness and accuracy of the model.
[0186] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0187] Compared with the prior art, the above technical solution has at least the following beneficial effects:
[0188] In the present invention, the light and shadow of the static objects can be optimized based on the light baking technology, and the light streaming of the game animation can be optimized based on the light streaming processing technology, and the screen of the nostalgic online game can be optimized to enhance the attractiveness of the nostalgic online game to new players and enhance the market competitiveness of the nostalgic online game.
[0189] There are a few points to note:
[0190] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.
[0191] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of the layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.
[0192] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.
[0193] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A cyberspace asset detection method based on automatic task orchestration, It is characterized in that include: S1: Get asset detection instructions; S2: Responding to the asset detection instruction, obtaining a real-time network space topology structure; S3: generating a plurality of asset detection subtasks according to the real-time network space topology structure; S4: according to the detection objects of each asset detection subtask, the asset detection subtasks detecting the same object are combined into a theme; S5: Based on the dependencies between the topics, with the goal of maximizing detection efficiency, automatically schedule tasks for each topic and determine the execution threads and execution order of each topic; S6: According to the determined execution threads and execution order, partition tasks are assigned to each topic one by one according to the real-time load situation; S7: Actively detect assets in the partitions and summarize the detection results to obtain cyberspace asset detection results.
2. The method for detecting cyberspace assets based on automatic task scheduling according to claim 1, It is characterized in that Also includes: S8: comparing the cyberspace asset detection result with the cyberspace asset database to determine the lost assets; S9: Recover the lost assets.
3. The method for detecting cyberspace assets based on automatic task scheduling according to claim 1, It is characterized in that The dependency relationships include: data dependency, control dependency and conditional dependency.
4. The method for detecting cyberspace assets based on automatic task scheduling according to claim 1, It is characterized in that The S5 specifically includes: S501: With the highest detection efficiency as the goal, construct the task scheduling objective function: F(X)=max[λ 1 D(X)-λ 2 T(X)] The detection efficiency is quantified by bandwidth utilization and detection time, F() represents the task scheduling objective function, X represents the task execution scheduling combination, X = [x ijk ], x ijk Indicates that the i-th topic is executed in the j-th thread for the kth time. When x ijk =1, when x ijk = 0, no execution, max represents the maximum value, D represents the bandwidth utilization, D(X) represents the detection accuracy when the task execution arrangement combination X is used for detection, λ 1 represents the weight coefficient of detection accuracy, T represents the detection time, T(X) represents the detection time when the task execution arrangement combination X is used for detection, and λ 2 The weight coefficient representing the detection time; S502: Setting task scheduling constraints; The task scheduling constraints specifically include: Thread constraint, which means that each topic can only be executed in a certain thread; Topic constraints, which means that each topic can only be executed once; Data dependency constraints mean that when the execution of Topic B depends on the data generated by the execution of Topic A, Topic A takes precedence over Topic B. Control dependency constraint means that when the execution of Topic B depends on the status of Topic A for control, Topic A takes precedence over Topic B. Conditional dependency constraints mean that when the execution of Topic B depends on the result of Topic A as a condition, Topic A takes precedence over Topic B. Load balancing constraint, which means that the load balancing prediction value during the detection process is within a safe range; S503: Under the constraints of the task scheduling constraints, with the goal of maximizing the function value of the task scheduling objective function, the execution threads and execution order of each topic are determined through an improved sparrow search algorithm.
5. The method for detecting cyberspace assets based on automatic task scheduling according to claim 4, It is characterized in that S503 specifically includes: Initialize a sparrow population, wherein the sparrow population includes a plurality of individuals, and each individual represents a feasible task execution arrangement combination; The task scheduling objective function is used as the fitness function of the improved sparrow search algorithm: Classifying individuals in the sparrow population into finders, followers, and anti-predators; Calculate the distance between the current discoverer and other sparrow individuals: D j =||X-X j || 2 Among them, D j represents the distance between the current discoverer and the jth sparrow individual, X represents the task execution arrangement combination represented by the current discoverer, and X j represents the task execution arrangement combination represented by the jth sparrow individual, || || 2 represents the calculation of the second norm; The sparrow individual with the highest fitness value among the sparrow individuals whose distance to the current discoverer is less than the preset distance is taken as the optimal neighbor individual; At each iteration, the finder's position is updated according to the following formula: in, represents the position of the i-th discoverer at the t+1th iteration, represents the position of the i-th individual at the t-th iteration, exp() represents the exponential function with the natural constant e as the base, i represents the index value of the individual, and r 1 represents a random number between 0 and 1, T represents the maximum number of iterations, R 2 represents the alarm value, ST represents the safety threshold, w represents the adaptive weight factor, and f b represents the fitness of the current global optimal individual, R represents a random number that follows a normal distribution in the interval 0 to 1, and I represents the unit column matrix; Generate a random number and compare it with the mutation probability. If the random number is smaller than the mutation probability, update the position of the discoverer twice: Among them, r 2 Represents a random number between 0 and 1; Update the follower's position according to the following formula: in, represents the position of the i-th follower at the t+1th iteration, represents the global worst position at the tth iteration, A represents the optimal position of the discoverer at the t+1th iteration. + =A T (AA T ) -1 , A represents a random row matrix, the elements in A are 1 or -1, and m represents the total number of individuals in the population; Update the position of the anti-predator according to the following formula: in, represents the position of the i-th anti-predator at the t+1th iteration, represents the global optimal position at the tth iteration, τ represents the step size control parameter, K represents a random number between -1 and 1, and f i represents the fitness of the current individual, f g represents the fitness of the individual in the optimal position, f w represents the fitness of the individual in the worst position, and ε represents a hyperparameter that avoids the denominator being 0; When the number of iterations reaches the maximum number of iterations, the individual with the highest current fitness is output, and the task execution arrangement combination represented by the individual with the highest fitness is taken as the optimal task execution arrangement combination and output.
6. The method for detecting cyberspace assets based on automatic task scheduling according to claim 1, It is characterized in that The S6 specifically includes: S601: Calculate dependency parameters between topics at the current moment; S602: When the dependency parameter at the current moment is less than the preset parameter value, the RangeAssignor algorithm is used to perform partition task allocation; S603: When the dependency parameter at the current moment is greater than the preset parameter value, calculate the consumer instance change rate at the current moment; S604: When the consumer instance change rate at the current moment is greater than the preset change rate, the StickyAssignor algorithm is used to assign partition tasks; S605: When the consumer instance change rate at the current moment is less than the preset change rate, the RoundRobinAssignor algorithm is used to perform partition task assignment.
7. The method for detecting cyberspace assets based on automatic task scheduling according to claim 6, It is characterized in that The calculation method of the dependency parameter is specifically as follows: Among them, c 1 Indicates the number of topics with data dependencies, c 2 Indicates the number of topics with control dependencies, c 3 Indicates the number of topics with conditional dependencies, and N indicates the total number of topics to be processed at the current moment.
8. The method for detecting cyberspace assets based on automatic task scheduling according to claim 6, It is characterized in that The consumer instance change rate is specifically: Where E represents the consumer instance change rate, e t Indicates the number of consumer instances at the current moment, e t-1 Indicates the number of consumer instances at the previous moment.
9. A cyberspace asset detection system based on automatic task scheduling, It is characterized in that include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method for detecting cyberspace assets based on automatic task scheduling as described in any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method for detecting cyberspace assets based on automatic task scheduling as described in any one of claims 1 to 8 is implemented.
