The application discloses a sequence construction method and
system. The method constructs a switching matrix based on the number of various types of elements in the sequence, establishes a unified constraint
system, and obtains a numerical solution of the switching matrix through optimization. Based on the numerical solution, a graph structure is constructed and
connectivity is determined to determine whether a
complete sequence can be formed; when the
connectivity is satisfied, a target sequence that meets the switching relationship and quantity requirements is generated based on the graph structure. The method supports segment-
level structure expression, modeling of the head-
tail relationship of the
augmented matrix, and sub-sequence combination expression, and is suitable for multiple sequence construction tasks. Accordingly, the application also provides a sequence construction
system, which includes a matrix modeling module, a constraint construction module, a solving module, a
connectivity determination module, and a sequence generation module.