Aiming at power systems dominated by hydrogen production using surplus electricity and clean energy generation, a composite game strategy is proposed to address the transaction game problems among multiple complementary energy entities within the system. First, a model of the hydrogen-photovoltaic-grid coupled system containing hydrogen production and refueling stations is established, constructing the internal energy interaction mechanism of the system. On this basis, from the perspective of multi-agent games, a multi-agent composite game scheme with a nested structure is proposed. This scheme comprises three stages: in the cooperative cost minimization stage, a two-layer optimization model incorporating temporal look-ahead is introduced to balance the economy of alliance operation and the volatility of renewable energy output; in the entity cost minimization stage, a genetic algorithm is used to solve the non-cooperative game problem; in the profit distribution stage, the Shapley value method is applied to achieve fair distribution of alliance profits. Finally, by comparing different game schemes, the effectiveness of the proposed strategy in reducing uncertainty risks and improving the benefits of individual entities and the overall system is verified.