Method and device for transforming graphical service flow into service script

Provided is a method for transforming a graphical service flow into a service script, including: determining a brother SIB for each service independent building block (SIB) according to the divergence and convergence circumstances of the branches of the graphical service flow (201); determining an action scope for each SIB according to the brother SIB of each SIB (202); and generating a service script according to the action scope of each SIB and the brother SIB of each SIB (203). Also provided is a device for transforming a graphical service flow into a service script. By utilizing the method and device in the present solution, the structure of the generated service script is clear, thus greatly enhancing the readability of the service script.