System, method, program, and information processing apparatus for efficient control and use of computing resources
By applying idempotent reference transparency expressions in the system, the problem of low efficiency in computing resource utilization during the verification process is solved, efficient identification, retrieval and reuse of computing resources is realized, and verification efficiency is improved.
Patent Information
- Application Number
- CN202380047140.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-06-17
- Filing Date
- 2023-06-07
- Publication Date
- 2025-02-07
AI Technical Summary
The prior art is difficult to efficiently control and utilize computing resources when verifying game programs and system behaviors, resulting in time-consuming and wasteful resources.
By using idempotent reference transparency expressions, efficient identification, retrieval and reuse of computing resources can be achieved, ensuring the immutability and reuse of computing resources.
It realizes efficient control and utilization of computing resources, reduces the time and resource consumption of the verification process, and improves the efficiency of system behavior verification.
Smart Images

Figure CN119404178A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a system, method, program and information processing device for efficient control and use of computing resources in a system. Background Art
[0002] In recent years, systems that provide a variety of services including online games that run on general electronic devices such as smartphones and PCs and communicate with servers through open networks have become widely popular. In the process of developing such a system, it is necessary to verify the behavior of programs and the like used to make the system function. In online games such as games based on battles with other users, the following form is known: a large number of game media such as cards are prepared, and a media set (deck) containing a plurality of game media selected by the player is used to fight. Depending on the combination of the media sets used in the battle, an adverse situation or a bias in the winning rate may occur, so it is necessary to verify the behavior of the game program and system as software that takes the combination of the media sets into consideration.
[0003] However, when there are many types of cards, the types of media groups based on their combination become huge. In addition, online games that continuously provide game services sometimes add new cards to maintain user interest. In this case, in order to verify the impact of adding new cards on the game program and system behavior, it is necessary to use a large amount of computing resources to conduct long-term experiments.
[0004] Prior art literature
[0005] Patent Literature
[0006] Patent Document 1: Japanese Patent Application Publication No. 2021-145939 Summary of the invention
[0007] Problem that the invention aims to solve
[0008] Patent document 1 discloses a virtualization technology that verifies the appropriateness of the behavior of a game program based on a combination of a large number of media groups in a comprehensive, high-speed, and parallel manner on the server side while making the game program (application) close to the actual environment. However, in Patent document 1, whenever a verification test of the game program behavior is performed, a test environment for the game program needs to be constructed in the verification system, and it is sometimes not possible to achieve efficient control and utilization of computing resources.
[0009] Solutions for solving problems
[0010] 1. The present invention is made in view of the above-mentioned problems and has the following features. That is, a system in one embodiment of the present invention executes a process based on an idempotent referential transparency expression having idempotence and referential transparency, and the system performs the following processes: storing identification information of a computing resource as an execution result of the process based on the idempotent referential transparency expression in correspondence with identification information of a character string representing the idempotent referential transparency expression and a data type of the idempotent referential transparency expression; determining identification information of a character string representing the idempotent referential transparency expression set as an execution target based on an execution command for the system and a data type of the idempotent referential transparency expression; retrieving identification information of a computing resource corresponding to identification information of a character string representing the idempotent referential transparency expression as an execution target and a data type of the idempotent referential transparency expression from the stored identification information of the computing resource; and when identification information of a computing resource is determined from the stored identification information of the computing resource through the retrieval, determining to use the computing resource identified by the determined identification information as the execution result of the process based on the idempotent referential transparency expression as an execution target.
[0011] 2. In the system of item 1, it can also be set that, when executing processing based on the idempotent reference transparency expression as the execution object and a group of other idempotent reference transparency expressions as the execution object, when the identification information of the computing resource is determined from the stored identification information of the computing resource through the retrieval, the computing resource identified according to the determined identification information is used as the execution result of the processing based on the idempotent reference transparency expression as the execution object, to execute processing based on other idempotent reference transparency expressions.
[0012] 3. In the system of item 1 or 2, it can also be set that, without determining the identification information of the computing resource corresponding to the identification information of the character string representing the idempotent reference transparency expression as the execution object and the data type of the idempotent reference transparency expression from the stored identification information of the computing resource, processing based on the idempotent reference transparency expression as the execution object is performed, and the determined identification information of the computing resource is stored in correspondence with the identification information of the character string representing the idempotent reference transparency expression as the execution object and the data type of the idempotent reference transparency expression.
[0013] 4. In the system of any one of items 1 to 3, the identification information of the character string representing the idempotent referential transparency expression may be determined based on a character string obtained by normalizing the idempotent referential transparency expression.
[0014] 5. In the system of any one of items 1 to 4, the identification information of the string representing the idempotent referential transparency expression may be a hash value of the string.
[0015] 6. In the system of any one of items 1 to 5, it is possible that the processing based on the idempotent reference transparency expression includes at least one of virtual machine image creation processing, virtual machine instance startup processing, virtual machine image modification processing, virtual machine image copy processing, container startup processing, and non-destructive data writing processing of an application to a storage device.
[0016] 7. In the system of any one of items 1 to 6, it is possible that the computing resources include at least one of a process running in the system, a processor executing the process, a memory storing information associated with the process, and a memory storing results of executing the processing.
[0017] 8. In the system of item 7, it can also be set that the process includes at least one of the process of the virtual machine instance and the process of the container.
[0018] 9. A method in one embodiment of the present invention is used to execute processing based on an idempotent referential transparency expression by a computer, and the method includes the following stages: storing identification information of a computing resource as an execution result of processing based on the idempotent referential transparency expression corresponding to identification information of a string representing the idempotent referential transparency expression and a data type of the idempotent referential transparency expression; determining identification information of a string representing an idempotent referential transparency expression that is set as an execution object based on an execution command for the system and a data type of the idempotent referential transparency expression; retrieving identification information of a computing resource corresponding to identification information of a string representing the idempotent referential transparency expression as an execution object and a data type of the idempotent referential transparency expression from the stored identification information of the computing resource; and in a case where identification information of a computing resource is determined from the stored identification information of the computing resource through the retrieval, determining to use the computing resource identified according to the determined identification information as the execution result of processing based on the idempotent referential transparency expression as an execution object.
[0019] 10. A program according to one embodiment of the present invention can be used to cause a computer to execute the method described in item 9.
[0020] 11. In one embodiment of the present invention, an information processing device performs processing based on an idempotent referential transparency expression, and the information processing device performs the following processing: storing identification information of a computing resource as an execution result of processing based on the idempotent referential transparency expression corresponding to identification information of a character string representing the idempotent referential transparency expression and a data type of the idempotent referential transparency expression; determining identification information of a character string representing an idempotent referential transparency expression that is set as an execution object based on an execution command for the system and a data type of the idempotent referential transparency expression; retrieving identification information of a computing resource corresponding to identification information of a character string representing the idempotent referential transparency expression as an execution object and a data type of the idempotent referential transparency expression from the stored identification information of the computing resource; and in a case where identification information of a computing resource is determined from the stored identification information of the computing resource through the retrieval, determining to use the computing resource identified according to the determined identification information as the execution result of processing based on the idempotent referential transparency expression as an execution object.
[0021] Effects of the Invention
[0022] According to the present invention, it is possible to efficiently control and utilize computing resources within a system in order to verify a program or a system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is the overall structure of a system according to one embodiment of the present invention.
[0024] Figure 2 This is a hardware configuration diagram of a system according to one embodiment of the present invention.
[0025] Figure 3 This is a functional block diagram of a system according to one embodiment of the present invention.
[0026] Figure 4 This is a flowchart showing information processing according to one embodiment of the present invention.
[0027] Figure 5 This is a conceptual diagram of the operation of a system according to one embodiment of the present invention.
[0028] Figure 6 1 is a conceptual diagram showing the reuse of computing resources according to the first embodiment of the present invention.
[0029] Figure 7 2 is a conceptual diagram showing the reuse of computing resources according to the second embodiment of the present invention.
[0030] Figure 8 2 is a conceptual diagram showing the reuse of computing resources according to the third embodiment of the present invention.
[0031] Fig. 9 1 is a conceptual diagram showing the reuse of computing resources according to the fourth embodiment of the present invention. DETAILED DESCRIPTION
[0032] In one embodiment of the present invention, the following system is used: the system creates a system that is a replica environment of the entire game service including the client application, and performs automatic debugging of the application and KPI (Key Performance Indicator) calculation by using the simulation of the replica environment system. This embodiment is not limited to the game system, and can be used in any system that requires verification. In this embodiment, a program described by an idempotent referential transparency expression is used to realize the processing of controlling virtual machines, containers, game applications, and distributed storage devices in the cloud respectively.
[0033] An idempotent referentially transparent expression is an expression that has two characteristics: idempotence and referential transparency. Idempotence means that even if a specified expression is repeatedly evaluated (executed), the same result will be obtained. Referential transparency means that the same result will be returned when the same arguments are given to the specified expression. For example, a functional language expression is an example of an idempotent referentially transparent expression. In this specification, the meaning of an idempotent referentially transparent expression is sometimes referred to as a functional language expression. In this embodiment, a program recorded in a functional programming language is used, and the functional programming language is described using functional language expressions.
[0034] An expression is an expression for calling a function, which is the smallest unit representing a function executed in the system. A function has a predetermined name. As described later, in this embodiment, for example, define function, instantiate function, launch function, apply function, preprocess function, postprocess function, etc. are defined. The apply function executes the exec function, and a specific game play in the game is executed inside the exec function, and the exec function is also treated as a function.
[0035] Functional programming languages can model the process of automatic verification including debugging as the repetition of operations with referential transparency and idempotence, and define the behavior of the game system as a "sequence of function applications". Therefore, when any function is applied, the entire or part of the game environment can be temporarily stopped and saved as a verification snapshot for debugging and KPI output.
[0036] In a common programming language processing system, the programming language has a high degree of freedom, so in order to find expressions with equivalent values, data flow analysis is required, which is costly. Global value numbering can detect the equivalent value of expressions at a lower cost, so it is widely used in compilers, but it cannot determine the equivalent value of large-scale expressions such as virtual machine generation and cloud resource management. Therefore, in the prior art, cloud resource management does not rely on the data flow analysis of the compiler, but is usually implemented by the programmer's own cache mechanism.
[0037] In this embodiment, in a programming language that specifies the structure management of the cloud in the paradigm of a functional language, the programming language is modeled as a tree structure that does not contain any control structures such as conditional branches, recursion, and loops, but only contains function definitions and calls. Based on the premise that the produced computing resources are maintained in an unchanged manner, the global computing resources (resources) of the cloud are reused through the following three points: 1) Equivalent operation expressions are given the same string representation; 2) A function is provided to uniquely associate the identification information of the string representation of the expression used to constitute the cloud program, the data type of the expression, and the identifier of the cloud resource as a triple; 3) When multiple programs (programs used to constitute the cloud) contain expressions with the same identification information, based on the principle of "reference transparency", the value of the expression is reused if the value of the expression has been evaluated in the past.
[0038] In this embodiment, there are no destructive operations such as explicit resource deletion / update operations for cloud resources that have been generated once, but all resources are created at any time and deleted when they are no longer needed. That is, after being created, the computing resources in the cloud are treated as immutable resources. As a result, resources (computing resources) that are the result of copying, modifying, starting, deploying containers, executing client applications, etc. of cloud virtual machines can be referenced as identification information (ID) without considering the state changes of cloud resources.
[0039] In order to give the same string representation to equivalent operation expressions, the program description order on the tree structure of the program function call can be standardized. In addition, in order to give the same identification information to equivalent operation expressions, the hash value of the string representing the program can be calculated and used as the identification information.
[0040] Hereinafter, the present embodiment will be described with reference to the accompanying drawings. Figure 1As shown, the system 100 involved in this embodiment can be implemented by a system including a control server 110, one or more processing execution servers 120, one or more storage devices (storage) 130, and one or more expression input terminals 140 connected via a network 150. In this embodiment, the control server 110, the processing execution server 120, and the storage device 130 are set as cloud-type servers and distributed storage devices, which can be accessed from the expression input terminal 140 via the network 150 which is the Internet, but can also be set as on-premise servers and storage devices.
[0041] Figure 2 The hardware structure of the control server 110, the processing execution server 120, and the expression input terminal 140 in this embodiment is shown in the figure. The storage device 130 only needs to have the hardware structure of a general storage device, so it is not shown in the figure. The storage device 130 can have both the file server function and the database function, and can also realize the function of one of them. The storage device 130 can be configured as a part of the control server 110 and the processing execution server 120, or it can be used as a cloud storage device to respond to queries from the control server 110 and the like and send data.
[0042] The control server 110 is an information processing device that receives an execution command of an idempotent referential transparency expression from the expression input terminal 140 via the network 150, communicates with the processing execution server 120 and the storage device 130, controls the entire execution process based on the idempotent referential transparency expression, and generates an execution result. The control server 110 is, for example, an electronic device such as a server. Figure 2 As shown, the control server 110 may include a processor 211, an output device 212, an input device 213, a storage device 216, a communication device 217, and a bus 218. The storage device 216 stores a program 219 such as an idempotent referential transparency expression execution control program.
[0043] The processing execution server 120 is an information processing device that performs various processes based on the program 229, the input data from the input device 223, the data received from the communication device 207, and the like. Figure 2 Although only a single processing execution server is described in , it is preferable to set it as a plurality of processing execution servers. In addition, it can also be set as a cloud server, and execute the processing based on the command from the control server 110 etc. via the network 150.
[0044] The expression input terminal 140 is an information processing device for creating an idempotent referential transparency expression to send an execution command to the control server 110. An example of the expression input terminal 140 is a computer, but it can also be set to other electronic devices such as a tablet terminal. The expression input terminal 140 can have a processor 241, an output device 242, an input device 243, a storage device 246, a communication device 247, and a bus 248. The storage device 246 stores a program 249 such as an idempotent referential transparency expression creation program.
[0045] The processors 211, 221, 241 control the overall actions of the control server 110, the processing execution server 120, and the expression input terminal 140, respectively, and are, for example, CPUs. In addition, circuits such as MPUs may also be used as the processors 211, 221, 241. The processors 211, 221, 241 perform various processes by reading programs and data stored in the storage devices 216, 226, 246 and executing the programs. In one example, the processors 211, 221, 241 are composed of a plurality of processors.
[0046] The output devices 212, 222, and 242 display application screens, etc. to the users of the information processing devices according to the control of the processor. They can be liquid crystal displays, displays using organic EL, plasma displays, etc. The input devices 213, 223, and 243 are user interfaces that accept user input to the information processing devices, such as keyboards, mice, touch panels, and touch pads.
[0047] The storage devices 216, 226, and 246 are devices for storing programs, data, etc. used in each information processing device. In one example, they are storage devices used in general smartphones and computers, including RAM as volatile memory and flash memory such as eMMC, UFS, and SSD as non-volatile memory, and magnetic storage devices. In addition, as the storage device, an external memory, file server, or database physically separated from each information processing device can also be used.
[0048] The communication devices 217, 227, 247 communicate via the network 150 (in Figure 2 For example, each communication device performs wired communication using an Ethernet (registered trademark) cable, mobile communication, wireless LAN or other wireless communication to connect to the network 150.
[0049] Figure 3An example of a functional block diagram of the system 100 of the present invention is shown. The control server 110 includes an expression analysis unit 311, a computing resource retrieval unit 312, an execution processing control unit 313, and a computing resource deletion unit 314. The processing execution server 120 includes various control units 320, 330, 340, 350, a virtual machine (VM) image 321, a virtual machine (VM) instance 331, and a container 341. The storage device 130 has a function of storing various data used in this system. The expression input terminal 140 includes an expression creation unit 391 and an expression execution command unit 392.
[0050] The user of expression input terminal 140 uses expression creation unit 391 to create an idempotent referential transparency expression, and uses expression execution command unit 392 to send an execution command including the created idempotent referential transparency expression to control server 110, thereby inputting the idempotent referential transparency expression as the execution object to the system. Here, the user of expression input terminal 140 is a developer of the game system, and is assumed to be a person who creates a functional language expression as an idempotent referential transparency expression for functional verification of the game system program, but any person may be sufficient as long as the person sends an execution command including an idempotent referential transparency expression for system verification, and the system may not be a game system.
[0051] The control unit 310 of the control server 110 causes the expression analysis unit 311 to determine the identification information of the string representing the idempotent referential transparency expression contained in the execution command and the data type of the idempotent referential transparency expression based on the execution command received from the expression input terminal 140. The identification information of the string representing the idempotent referential transparency expression can also be determined based on the standardized string of the idempotent referential transparency expression. Thereby, the uniqueness of the identification information of the string representing the idempotent referential transparency expression can be ensured. In addition, an example of the identification information of the string representing the idempotent referential transparency expression is the hash value of the string.
[0052] When the idempotent referential transparency expression included in the execution command from the expression input terminal 140 is composed of a group of multiple idempotent referential transparency expressions, the group is divided into individual idempotent referential transparency expressions, and computing resource retrieval or execution processing is performed for each idempotent referential transparency expression obtained by the division. The execution result of each expression can be used to perform computing resource retrieval or execution processing of other expressions.
[0053] For example, in the case of computing resource retrieval or execution processing of an expression, when the identification information of the computing resource is determined based on the stored identification information of the computing resource through retrieval, when processing other expressions that reference the expression, the computing resource identification information can be used to replace the result of the referenced expression, thereby executing the processing using the computing resource.
[0054] The expression analysis unit 311 decomposes the idempotent referential transparency expression received by the control unit 310 into subexpressions. Regarding the decomposition of the subexpressions, a decomposition method suitable for realizing efficient control and utilization of computing resources can be appropriately selected. For example, it can be decomposed into subexpressions according to each function of the functional language expression contained in the script, or it can be decomposed into subexpressions according to each part corresponding to the computing resource that should be set as the management object. In the case where the define function that defines the virtual machine image contains an array and each element of the array defines the virtual machine image, each element of the array can be decomposed into subexpressions. In this specification, the term idempotent referential transparency expression sometimes refers to the decomposed subexpression.
[0055] The computing resource search unit 312 searches for computing resources corresponding to the identification information of the character string representing the idempotent referential transparency expression determined by the expression analysis unit 311 as the execution object and the data type of the idempotent referential transparency expression. Here, the search is performed by sending a search command to the processing execution server 120 and the storage device 130, but the computing resource search unit 312 can also be set to store the identification information of the available computing resources in a manner that establishes a correspondence between the hash value and the data type of the idempotent referential transparency expression and the identifier of the computing resource, and perform the search for the computing resource with reference to the correspondence table. It is also possible to perform the search without using the type and only use the correspondence table between the hash value and the identification information of the computing resource.
[0056] Moreover, when the identification information of the computing resource is determined by the search, it is decided to use the computing resource identified according to the determined identification information as the execution result of the processing based on the idempotent referential transparency expression as the execution object, and send the execution result to the control unit 310.
[0057] When the computing resource search unit 312 does not determine the computing resource, the execution processing control unit 313 executes the processing based on the idempotent referential transparency expression as the execution object, and stores the identification information of the newly generated computing resource in correspondence with the identification information of the string representing the idempotent referential transparency expression as the execution object and the data type of the idempotent referential transparency expression. Here, it is assumed that the execution processing control unit 313 sends a processing execution command for executing the processing based on the idempotent referential transparency expression as the execution object to the processing execution server 120, and causes the processing execution server to execute the processing execution command, but the processing execution command can also be executed in the control server 110.
[0058] Storing the determined computing resource identification information in correspondence with the identification information of the string representing the idempotent referential transparency expression as the execution object and the data type of the idempotent referential transparency expression does not only mean storing the three pieces of information in correspondence with each other in one table, but also means that the three pieces of information are established in correspondence in some way. For example, as in the present embodiment, the situation where the hash value of the expression and the identification information of the computing resource as the execution result of the expression are stored in correspondence in the control unit corresponding to the data type of the expression is also equivalent to storing the determined computing resource identification information in correspondence with the identification information of the string representing the idempotent referential transparency expression and the data type of the idempotent referential transparency expression.
[0059] The computing resource deletion unit 314 functions as a garbage collector that deletes computing resources. For example, it is possible to use reference counting and the expiration timer function of the cloud to delete computing resources that have become unnecessary. In the present invention, the reference relationship between computing resources is defined as the reference relationship between functions of idempotent reference transparency expressions (whether they are passed as arguments), so a reference graph can be easily generated. In addition, unlike general programming languages, it is impossible to define references such as calculation results referencing other calculation results, so there is no need to consider circular references. Therefore, the garbage collector in this embodiment can be implemented extremely simply, and even if the expiration timer function of the cloud is used directly, a sufficiently efficient garbage collector can be implemented.
[0060] Here, each control unit of the process execution server 120 is set to be a VM image control unit 320, a VM instance control unit 330, a container control unit 340, and a game application control unit 350. Each control unit is assumed to be implemented by executing a subroutine corresponding to each control unit executed in the process execution server 120. In this embodiment, it is assumed that there is one control unit corresponding to one data type of the idempotent referential transparency expression, but one control unit may be provided for multiple data types.
[0061] Regarding the retrieval command from the computing resource retrieval unit 312 of the control server 110 and the processing execution command from the execution processing control unit 313, it is set to start the API (Application Programming Interface) corresponding to the type of expression in the control server 110, and through the API, the corresponding control units 320, 330, 340, 350 execute the retrieval command and the processing execution command.
[0062] For example, if the function called by the expression is a define function, the data type of the expression is a "VMImage" type, and in the control server 110, the image API is started as an API corresponding to this type to send a command, and the VM image control unit 320 executes the command. If the function is launch (starting an instance or starting a container), the data type is "VMInstance" or "ContainerInstance", the VM instance API and container API corresponding to these data types are started, and the VM instance control unit 330 or the container control unit 340 executes the command. If the expression is an exec function, it is a "PlayResult" type, the game application API is started, and the game application control unit 350 executes the command.
[0063] In the present embodiment, regarding the search command, the processing execution server 120 receives the search command and determines whether a VM image that has been created is stored based on the identification information of the expression that is the execution object and is assigned as an argument. For example, a correspondence table of hash values as identification information and VM image identification information is stored in advance in the VM image control unit 320, and it is possible to determine whether a VM image corresponding to the hash value assigned as the argument of the search command is stored based on the correspondence table. In the case where the function is launch (starting an instance or starting a container), the data type is "VMInstance" or "ContainerInstance", and the VM instance API or container API corresponding to these data types is started, and it is possible to determine whether the VM instance or container that is the execution result of the expression that is currently the execution object is already available based on the hash value.
[0064] Each control unit 320, 330, 340, 350 executes processing based on the idempotent referential transparency expression based on the processing execution command of the execution processing control unit from the control server 110. When the execution processing of the idempotent referential transparency expression is completed, each control unit maintains the generated computing resources in an available state and sends information for identifying the computing resources to the control server 110.
[0065] The execution processing of idempotent referential transparency expressions includes virtual machine image creation processing, virtual machine instance startup processing, virtual machine image modification processing, virtual machine image replication processing, container startup processing, and non-destructive data writing processing of applications to storage devices. Virtual machine instance startup processing is sometimes called virtual machine instance generation processing. Non-destructive data writing processing refers to destructive processing of stored data such as not overwriting or updating existing data. As an example of non-destructive data writing processing, the writing processing of application execution logs to storage devices can be cited.
[0066] A virtual machine image is data used to start a virtual machine, and is data that completely stores the contents of the virtual machine's memory and hard disk. A virtual machine image is created to start a virtual machine, and can be modified or copied for subsequent reuse.
[0067] In this specification, a virtual machine generated as an entity when a virtual machine image is read into a virtual machine is referred to as a virtual machine (VM) instance. The virtual machine instance startup process is performed based on the created virtual machine image, thereby starting the virtualized machine, that is, generating an instance for the virtual machine. For example, if an image file for a server is input into a virtual machine, a virtual server can be started.
[0068] Furthermore, a container can be started in the machine to execute an application virtualized by container-based virtualization. Container-based virtualization is one of the virtualization methods, and virtualization can be performed in units of processes. For example, container-based virtualization can be used when virtualizing an application executed in a smartphone. In the present invention, the object virtualized by a virtual machine instance can be set to a server or a user terminal, and the application running on these devices can be virtually executed by container-based virtualization.
[0069] In the case where the execution processing of the idempotent referential transparency expression is a virtual machine image production processing, the VM image control unit 320 generates a VM image 321 and saves the VM image in correspondence with identifiable identification information in the processing execution server 120. For example, computing resource identification information (ID) is allocated and saved to the produced VM image, and a table that establishes a correspondence between the identification information and the identification information of the idempotent referential transparency expression is stored in the VM image control unit 320. Then, as the execution result of the virtual machine image production processing, the computing resource identification information of the generated VM image is sent to the control server 110. The computing resource identification information is information that can uniquely identify the VM image in the system 100.
[0070] If the execution processing of the idempotent referential transparency expression is a virtual machine instance startup processing, a virtual machine image modification processing, or a virtual machine image copy processing for a virtual machine, the VM instance control unit 330 executes the processing and sends computing resource identification information for determining the VM instance generated as a result of the execution to the control server 110. If the execution processing of the idempotent referential transparency expression is a processing for further generating a container for starting a specified application on the VM instance, the identification information for determining the container is computing resource identification information. In the case where the execution processing of the idempotent referential transparency expression is a container startup processing executed on the VM instance, etc., the container control unit 340 executes the same processing.
[0071] When the execution process of the idempotent referential transparency expression is a process of inputting a predetermined parameter to the application and causing the application to output a calculation result, the game application control unit 350 performs a process to cause the storage device 130 to store the output calculation result, and transmits the identification information for specifying the calculation result as the calculation resource identification information to the control server 110. The calculation result itself, as well as the identification information and the calculation result may be transmitted to the control server 110.
[0072] In this embodiment, VM image 321, VM instance 331, container 341, and data as the result of execution are computing resources, but computing resources can be any computing resources as long as they are computing resources on the system. For example, the process of the virtual machine instance as the process of executing the virtual instance, the application process executing the application, and the process of the started container, etc., which are currently being executed, are also computing resources. In addition, the processing device that executes the process, the storage device that stores the information required for executing the process, the data as the result of execution, the storage area of the storage device, and the storage device are also computing resources.
[0073] The execution processing control unit 313 of the control server 110 sends the computing resource identification information or the computing result received from the processing execution server 120 as a response to the processing execution command as an execution result to the control unit 310. The control unit 310 sends a response to the execution command from the expression input terminal 140 based on the execution result received from the computing resource retrieval unit 312 or the execution processing control unit 313. The response may also include the execution result and other information such as log information associated with the execution.
[0074] In this embodiment, each functional unit is executed by a processing device. Figure 2 The program included in the hardware configuration described in the specification and the hardware of the output device, input device, storage device, and communication device cooperate with the software to achieve this, but circuits corresponding to each function may also be provided to achieve this.
[0075] In this embodiment, in a programming language for specifying the structure management of a system, preferably a cloud system, with a large amount of computing resources in the paradigm of idempotent referential transparency expressions of functional languages, the programming language is modeled as a tree structure that does not contain any control structures such as conditional branches, recursion, and loops, but only contains the definition and call of functions. The following three points enable efficient control and use of computing resources: 1) by standardizing the description order of programs on the tree structure of function calls of programs, equivalent operation expressions are given the same string representation; 2) providing a function to uniquely associate the identification information (hash value) of the string representation of the expression of the program used to constitute the cloud, the data type of the expression, and the identifier of the cloud resource as a triple; 3) in the case where multiple programs (programs used to constitute the cloud) contain expressions with the same identification information (hash value), according to the principle of "referential transparency", the value of the expression is reused if the value of the expression has been evaluated in the past.
[0076] Figure 1 shows an example of a script described by a functional language expression as an idempotent referential transparency expression used in this embodiment. This embodiment is used to verify a game application executed using a cloud infrastructure. The script can be implemented as a language processing system that gives cloud structure information and analyzes and executes information on the automatic execution of the game.
[0077] [Number 1]
[0078]
[0079]
[0080] The script shown in Figure 1 is defined as a collection of expressions given in JSON. define is a function expression used to define the image of the virtual machine. Regarding definitions, multiple definitions can be included as an array. instantiate is a function expression used to define the startup method of the virtual machine instance, and launch specifies the startup of the virtual machine instance and the startup of the container. apply defines the automatic game method of the game system that is the development object. It is possible to specify the parameters for automatic game play and the save destination of the automatic game play results. In this way, the control of cloud computing resources can be defined as a sequence of function definitions and function applications.
[0081] Next, based on Figure 4 The processing performed in the system 100 of this embodiment is described with reference to the flowchart shown in FIG. As an example, a script file, i.e., a JSON file, which declaratively defines everything from the cloud infrastructure construction method to the game content to be executed in the game application and the calculation parameters of the KPI is input into the system. Figure 5 A conceptual diagram of the operation of the system when using this embodiment is shown in FIG.
[0082] First, a user of the expression input terminal 140 who is a developer of the game system uses the expression input terminal 140 to create a JSON file containing strings representing multiple functional language expressions as a script for verifying the game application, and sends it to the control server 110 together with the execution command of the idempotent referential transparency expression.
[0083] When the control server 110 receives the sending information, the expression analysis unit 311 standardizes the character string of the script in the JSON file (S401). In this embodiment, the script is standardized by sorting the attribute names at all levels of the received JSON file according to the dictionary order of the attribute names (for example, the order of appearance of the Unicode code point table) and other criteria. Those skilled in the art can clearly understand that this method is called deterministic JSONization, which can be implemented by json-stable-stringify, fast-json-stable-stringify, etc. In this way, by standardizing the order of appearance of attribute names at all levels of JSON, the same string representation can be given to script files that perform the same function.
[0084] Furthermore, when the standardized script contains multiple sub-expressions, it is decomposed into sub-expressions (S402). Figure 5As shown, it is decomposed into an expression for making an image of a virtual machine, an expression for starting an instance of a virtual machine, an expression for starting a container within the virtual machine, an expression for playing a game using a game application within the container, and the like.
[0085] The system performs processing S404 to S416 on each sub-expression obtained by decomposition. The expression analysis unit 311 determines the identification information and data type of the sub-expression (S404). As long as the identification information of the sub-expression can uniquely determine the string, the identification information can be calculated by any method, but in this embodiment, it is set to use a hash function (SHA256). Taking the exec function of starting a game as an example, the string "1030410201040210301042130101052410101060240101060410101082410201082410301102410101110410101110410201120110201120320101122110201122 410301150130101152310101170230101170310101172110101182240101210210 10121023010121031010121034010121041010121044010121211010121211020 121211030121214010121221010121221020121224010121231010121234010121241010121241020800234030900041150” is converted into “e841bd5de2c588aa8330ade0cb42c65cbce49979ef3e8c926f433f4f8b70b8ab” using SHA256, and the resulting value is used as a hash value serving as identification information of the exec function.
[0086] The data type can be determined according to the function of each sub-expression. For example, the data type can be determined by using a rule base according to the function of each sub-expression. The data type can be determined as follows: if the function is define, the data type is "VMImage", if the function is launch, the data type is "VMInstance" or "ContainerInstance", and if the function is exec, the data type is "PlayResult".
[0087] The computing resource search unit 312 searches for computing resources corresponding to the hash value and data type of the calculated identification information of the sub-expression (S406), and determines whether the sub-expression has been executed and is available as an available computing resource (S408). If it is determined that the computing resource is available, the determined (discovered) available computing resource is obtained (S410).
[0088] Acquiring computing resources means making computing resources available. For example, when the function of the sub-expression is launch for starting a virtual machine instance, the VM instance started by the sub-expression is made available, and when the function of the sub-expression is an exec function, the game result data executed according to the parameters of the sub-expression is acquired.
[0089] The computing resource may also be a process running in the above-mentioned system, or a processor executing the process. In this case, making the computing resource available may also refer to, for example, granting information for identifying the running process or the processor executing the process, and granting access rights to the process or the processor. The computing resource may also be a storage device or a storage area. In this case, making the computing resource available may also refer to granting information for identifying the storage device or storage area storing data as an execution result, and granting access rights to the storage device or storage area.
[0090] In this embodiment, other expressions can be referenced by name from within an expression, so the expression analysis unit 311 can replace the result of the referenced expression with the identifier of the computing resource with the aid of the computing resource retrieval unit 312, and perform the processing of the subsequent sub-expression. In the case where an expression is newly executed by the processing execution server 120, the expression can also be replaced with the newly generated computing resource information.
[0091] In this embodiment, the retrieval of computing resources is implemented as follows: the API corresponding to the data type is started, a hash value is used as a parameter, and the retrieval command is executed using the started API. The control unit corresponding to the computing resources corresponding to each API of the processing execution server 120 retrieves the computing resources based on the retrieval command. When the execution result for the sub-expression is determined, the control server 110 obtains at least one of the identification information of the computing resource and the execution result data itself as the computing resource as the execution result of the sub-expression.
[0092] For example, in the case of a define function, the type is "VMImage", and as an API corresponding to this type, an image API (Application Programming Interface) is started, and the hash value of the define function as the execution object is used as an argument to execute the search command. In this embodiment, the VM image control unit 320 of the processing execution server 120 receives the search command and determines whether a VM image that has been created is stored based on the hash value given as the argument. Here, it is possible to determine whether a VM image corresponding to the hash value is stored based on the hash value stored in the VM image control unit 320 and the VM image identification information correspondence table.
[0093] When the function is launch (starting a virtual machine instance or container), the data type is "VMInstance" or "ContainerInstance", respectively, and the VM instance API or container API corresponding to these data types can be started to retrieve whether the execution result of the sub-expression as the execution object is already available based on the hash value. The execution result in this case is the VM instance 331 or container 341 started in the process execution server 120. For example, it can be determined which type is "VMInstance" or "ContainerInstance" based on the parameters of the launch function.
[0094] When a VM instance 331 or container 341 corresponding to the hash value of the expression is found through the search, the VM instance 331 or container 341 is set to a state that can be used in the script being executed. Here, the process that is executing the script is given permission to use the VM instance 331 so that the VM instance 331 can be used in other sub-expressions. For example, the access right to the VM instance 331 can be granted and the identification information of the VM instance 331 can be given to the control server 110, so that other sub-expressions of the script can start a container in the VM instance 331 based on the received identification information of the VM instance.
[0095] If the function is exec, the data type is "PlayResult". In this case, the game application API for accessing the storage device 130 storing the execution result is started, and the storage device 130 is searched to see whether the execution result data is stored. A corresponding table of hash values and execution result data is stored in the storage device 130, and based on the search command of the game application API, it is determined whether the calculation result corresponding to the hash value is stored. In the case of determining that the calculation result has been saved, the calculation result itself can be returned to the control server 110 as the execution result of the sub-expression, or identification information for determining the address of the storage area storing the calculation result can be returned to obtain the calculation result.
[0096] If no available computing resources are determined, processing based on the sub-expression to be executed is executed ( S412 ), and identification information of the computing resource as the execution result is newly registered in correspondence with the identification information of the sub-expression ( S414 ).
[0097] In this embodiment, an API corresponding to the type of the sub-expression as the execution object is started and an execution command is sent to any control unit of the processing execution server 120, and the control unit that receives the execution command executes processing based on the sub-expression. For example, in the case where the sub-expression is a define function for defining an image of a virtual machine, the image API is started, and the VM image generation command is sent using the parameters of the define function as arguments. When the VM image control unit 320 of the processing execution server 120 receives the VM image generation command, a VM image is generated, the identification information of the produced VM image is stored corresponding to the hash value of the sub-expression, and the produced VM image is set to an available state and the identification information is sent to the control server 110.
[0098] In the case where the expression to be executed is an expression for starting a virtual machine, a VM instance start command is sent using the VM instance API, and the VM instance control unit 330 that receives the VM instance start command starts the VM instance, stores the hash value of the expression in association with the instance, and sends information for identifying the started VM instance to the control server 110. For example, by giving identification information of a VM image for starting a VM instance as an argument to the instance start command, the VM instance can be started using a VM image that has been saved in the process execution server 120. The API for executing a function may also be different from the API for retrieving computing resources.
[0099] In a case where the expression to be executed is an exec function and is an expression for calculating the game play result of a game application, when the game application API is started and the execution command is sent as an argument with a game play parameter, the game application control unit 350 of the processing execution server 120 receives the execution command and executes the game play, saves the execution result to the storage device 130 in correspondence with the hash value of the sub-expression, and sends the game play result to the control server 110.
[0100] When the processing of the sub-expression is completed, it is determined whether there are any remaining sub-expressions in the script (S416). If there are any remaining sub-expressions, S404 to S416 are repeatedly executed until there are no more sub-expressions. If there are no remaining sub-expressions, the execution processing of the script is terminated.
[0101] by Figure 5 For example, the script JSON file is decomposed into expressions for making an image of a virtual machine, an expression for starting an instance of a virtual machine, an expression for starting a container in a virtual machine, an expression for playing a game application in a container, etc. Then, the hash value of each sub-expression is calculated and the type of the expression is determined. Based on the determined hash value and type, a retrieval or registration process of a computing resource based on each sub-expression is performed on each sub-expression.
[0102] In the retrieval and registration process, the retrieval target and the registration target are determined based on the data type of the sub-expression. For example, in the case of image creation, VM instance startup, and container startup, the image API, VM instance API, and container API are started respectively, and the execution result of the sub-expression as the execution object is retrieved based on the hash value of the sub-expression to see if it is already available. If it is available, each computing resource is set to an available state. If it is not available, the sub-expression is executed in the execution server, and its result is registered in the table of the execution server corresponding to the hash value of the sub-expression.
[0103] When the result of the execution of the processing based on the sub-expression is data such as the result of playing the game application, the game result data corresponding to the hash value is retrieved in the storage device. When the game result data is not stored in the storage device, it is unavailable, so the sub-expression is executed in the execution server, and the identification information of the computing resource as the result is registered in the storage device corresponding to the hash value of the sub-expression.
[0104] In this embodiment, by establishing a "Hash-Type-ID management" that uniquely associates 1) a hash value (Hash) of identification information represented as a string of an expression in a functional language, 2) a data type (Type) of the expression, and 3) identification information (ID) of cloud resources (computing resources) as a triple, it is possible to automatically extract and reuse common processing among multiple scripts regardless of their creators, purposes, and execution order.
[0105] By using idempotent referential transparency expressions to model a tree structure that does not contain any control structures such as conditional branches, recursion, and loops but only contains function definitions and calls, and by standardizing the order of describing the program on the tree structure, it is possible to give the same string representation to equivalent operation expressions. By using identification information such as a hash value for identifying the string representation, it is possible to uniquely identify the idempotent referential transparency expression. That is, by limiting both the syntax and functions used to record the script, the same identification information is calculated from the equivalent operation expressions even in the operation expressions of the scripts described by different users.
[0106] According to such a structure, it is possible to determine the equivalence of cloud operations such as the creation of virtual machine images, the startup of virtual machine (VM) instances, and the writing of application execution logs to the cloud, and reuse equivalent operation results. In a case where it takes several minutes to create a VM image and tens of minutes to hours to start a VM instance, when executing other scripts that use a VM instance started based on exactly the same VM image, if the already started VM instance can be used, then by using this VM instance, the processing using the VM instance can be executed without the VM image creation time and startup time. The data itself as the execution result can also be reused. It is possible to omit globally repeated operations in the construction and operation of the system environment of the cloud, etc.
[0107] Next, use Figure 6 to Figure 8 The following describes an embodiment in which the present invention can be effectively utilized. First, as a first embodiment, an embodiment in which the operation results of common sub-expressions are shared as the simplest example of efficient utilization of computing resources is described. In this embodiment, when multiple development projects are being carried out in parallel, the execution results (evaluation results) of the common sub-expressions are shared between different scripts corresponding to the projects.
[0108] exist Figure 6In the example shown, when there are three script files, the processing shared by the three script files can be extracted, and the result of the first executed script can be reused by the later executed script. Scripts 1 to 3 contain subexpression 601 in common, scripts 2 and 3 contain subexpression 602 in common, and scripts 1 and 2 contain subexpression 604 in common. When script 1 is executed first, script 2 is executed second, and script 3 is executed last, the execution result of the common subexpression 601 generated by executing script 1 is reused in scripts 2 and 3, and the execution result of the common subexpression 604 is reused in the execution of script 2. Furthermore, the execution result of the subexpression 602 generated by executing script 2 is reused in the execution of script 3.
[0109] Figure 7 The second embodiment is shown in . This embodiment is an example of sharing cascade operation results, and is an example of humans reusing the results of a script automatically executed by a machine. In this example, in the case where there is a desire to change only a part of a script that is continuously executed for 24 hours to perform a process ad hoc, the intermediate results obtained by the machine execution can be reused at any time to perform other processes by humans. For example, as a verification of a game system for executing a battle game using a media set containing multiple cards, if there is a need to re-verify only a specific card during the process of performing 24 hours of automatic debugging using script 1, a script 1' that only changes the card definition is put in. Since all the common parts are reused, the results of using a specific card can be obtained in a shorter time than when all the verifications are performed again. In the case where other developers further want to continue the experiment using different card definitions, even if script 1' is put in, the common parts are all reused, and the results can be obtained by executing only the part affected by the change of the specific card.
[0110] Figure 8 The third embodiment shown is an example of differential execution, which is an example of executing a script by repeatedly utilizing (skipping) the battles that meet the number conditions in the battles built by the virtual machine and executed during the incremental execution. In this example, after executing the expression 801 that all combined battles are executed at least 3 times, when executing the expression 802 that all combined battles are executed at least 10 times, for the three battles that have been executed first, the execution results of expression 801 are reused, and only the differential 7 battles (802') are executed. And, when executing the expression 803 that all combined battles are executed at least 20 times, for the three battles and seven battles that have been executed before, the results that have been executed are reused, and only the differential 10 battles (804') are executed. In this way, only the cards and media groups that you want to verify in depth can be selected for multiple verification.
[0111] Fig. 9 The fourth embodiment shown is an example of a case where logic and execution permissions are separated. This example is an example of seamlessly performing verification even when the cloud access permissions of the game development project and the automatic verification project are different. This embodiment is useful when making a clone of a game server. Fig. 9 In the example, cloud system A is a cloud environment for automatic verification, and cloud system B is a cloud environment for game development and operation. In this case, it is not preferable to allow cloud system A for automatic verification to directly access cloud system B for game development and operation from the perspective of security and information management. On the other hand, there is no problem in writing the necessary information from cloud system B for game development and operation to cloud system A for automatic verification.
[0112] In this case, if an expression that can be executed with the permissions of cloud system B is executed in the environment of cloud system B and the result is written to the verification cloud system A, then even if the verification program does not include a permission management mechanism at all, it can be directly and seamlessly executed in the verification cloud system A. Moreover, the execution result that is executed in the environment of cloud system B and written to cloud system A can be reused by the script executed later in cloud system A. This is because the expression type and the hash value of the expression are used to identify the calculation result of the expression. As long as there is a result of a common sub-expression, it does not matter which cloud environment the result of the expression is executed in.
[0113] In the above-described processing or action, the processing or action can be freely changed as long as no contradiction occurs. In addition, the above-described embodiments are examples for illustrating the present invention, and the present invention is not limited to these embodiments. It is also possible to implement any function with an information processing device different from the information processing device described in the embodiment. The present invention can be implemented in various ways as long as it does not deviate from its purpose. In addition, the effects described in the present embodiment are merely examples of the most preferred effects produced by the present invention, and the effects of the present invention are not limited to the effects described in the present embodiment.
[0114] Description of Reference Numerals
[0115] 100: system; 110: control server; 120: processing execution server; 130: storage device; 140: expression input terminal; 150: network; 207: communication device; 211: processor; 212: output device; 213: input device; 216: storage device; 217: communication device; 218: bus; 219: program; 221: processor; 222: output device; 223: input device; 226: storage device; 227: communication device; 229: program; 241: processor; 242: output device; 243: input device; 246: storage device; 247: communication device; 248: bus; 249: program; 310: control unit; 311: expression analysis unit; 312: computing resource retrieval unit; 313: execution processing control unit; 314: computing resource deletion unit; 320: VM image control unit; 321: VM image; 330: VM instance control unit; 331: VM instance; 340: container control unit; 341: container; 350: game application control unit; 391: expression creation unit; 392: expression execution command unit.
Claims
1. A system for performing processing based on an idempotent referentially transparent expression having idempotence and referential transparency, wherein the system is characterized by performing the following processing: storing, in correspondence with identification information of a character string representing an idempotent referential transparency expression and a data type of the idempotent referential transparency expression, identification information of a computing resource that is an execution result of a process based on the idempotent referential transparency expression; determining identification information of a character string representing an idempotent referential transparency expression that is set as an execution target based on an execution command for the system and a data type of the idempotent referential transparency expression; Retrieving, from the stored identification information of the computing resources, the identification information of the computing resources corresponding to the identification information of the character string representing the idempotent referential transparency expression as an execution object and the data type of the idempotent referential transparency expression; as well as When identification information of a computing resource is determined from the stored identification information of the computing resource through the search, it is determined that the computing resource identified by the determined identification information is used as an execution result of a process based on the idempotent referential transparency expression as an execution object.
2. The system according to claim 1, characterized in that In the case of performing processing based on the idempotent referential transparency expression as the execution object and a group of other idempotent referential transparency expressions as the execution object, when the identification information of the computing resource is determined from the stored identification information of the computing resource through the retrieval, the processing based on other idempotent referential transparency expressions is performed using the computing resource identified according to the determined identification information as the execution result of the processing based on the idempotent referential transparency expression as the execution object.
3. The system according to claim 1, characterized in that If identification information of a computing resource corresponding to identification information of a character string representing the idempotent referential transparency expression as an execution target and a data type of the idempotent referential transparency expression is not determined from the stored identification information of the computing resource, executing a process based on the idempotent referential transparency expression as an execution object, The determined identification information of the computing resource is stored in association with the identification information of the character string representing the idempotent referential transparency expression as an execution target and the data type of the idempotent referential transparency expression.
4. The system according to claim 1, characterized in that The identification information of the character string representing the idempotent referential transparency expression is determined based on the character string obtained by normalizing the idempotent referential transparency expression.
5. The system according to claim 1, characterized in that The identification information of the string representing the idempotent referential transparency expression is a hash value of the string.
6. The system according to claim 1, characterized in that The processing based on the idempotent referential transparency expression includes at least one of virtual machine image creation processing, virtual machine instance startup processing, virtual machine image modification processing, virtual machine image copy processing, container startup processing, and non-destructive data writing processing of an application to a storage device.
7. The system according to claim 1, characterized in that The computing resources include at least one of a process running in the system, a processor executing the process, a memory storing information associated with the process, and a memory storing results of executing a process.
8. The system according to claim 7, characterized in that The process includes at least one of a process for a virtual machine instance and a process for a container.
9. A method for performing, by a computer, processing based on an idempotent referential transparency expression, the method being characterized by: The following phases are included: storing, in correspondence with identification information of a character string representing an idempotent referential transparency expression and a data type of the idempotent referential transparency expression, identification information of a computing resource that is an execution result of a process based on the idempotent referential transparency expression; determining identification information of a character string representing an idempotent referential transparency expression that is set as an execution target based on an execution command for the system and a data type of the idempotent referential transparency expression; Retrieving, from the stored identification information of the computing resources, the identification information of the computing resources corresponding to the identification information of the character string representing the idempotent referential transparency expression as an execution object and the data type of the idempotent referential transparency expression; as well as When identification information of a computing resource is determined from the stored identification information of the computing resource through the search, it is determined that the computing resource identified by the determined identification information is used as an execution result of a process based on the idempotent referential transparency expression as an execution object.
10. A program for causing a computer to execute the method according to claim 9.
11. An information processing device for performing processing based on an idempotent referential transparency expression, the information processing device performing the following processing: storing, in correspondence with identification information of a character string representing an idempotent referential transparency expression and a data type of the idempotent referential transparency expression, identification information of a computing resource that is an execution result of a process based on the idempotent referential transparency expression; determining identification information of a character string representing an idempotent referential transparency expression that is set as an execution target based on an execution command for the system and a data type of the idempotent referential transparency expression; Retrieving, from the stored identification information of the computing resources, the identification information of the computing resources corresponding to the identification information of the character string representing the idempotent referential transparency expression as an execution object and the data type of the idempotent referential transparency expression; as well as When identification information of a computing resource is determined from the stored identification information of the computing resource through the search, it is determined that the computing resource identified by the determined identification information is used as an execution result of a process based on the idempotent referential transparency expression as an execution object.
Citation Information
Patent Citations
Method for program verification, program, system and server
JP2021145939A