A block function testing method, system, device and computer storage medium
By introducing three-dimensional virtual scenes and programming interfaces into the programming learning software, users can select tiles and execute target operation codes, solving the problem that the tiles function cannot be intuitively tested in the existing technology, and achieving a fast and intuitive demonstration of tiles function and learn.
Patent Information
- Application Number
- CN202011622107.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-30
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2040-12-30
AI Technical Summary
In existing programming learning software, users cannot intuitively test the function of tiles in actual scenarios, and can only learn code vocabulary or statements through text theory.
Provide a tile function test method. By displaying a three-dimensional virtual scene and programming interface, users can select target tile in the tile accommodation area and obtain target operation code, control the object to perform corresponding actions in the object control area, and realize the tile An intuitive demonstration of the functions.
Users can directly see the function demonstration of tiles in the actual scene in the object control area, and quickly and intuitively test the tiles function, improving the practicality and effectiveness of programming learning.
Smart Images

Figure CN112631575B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the computer field, and the instrument relates to a block function testing method, system, device and computer storage medium. Background Art
[0002] The programming software in the prior art provides many functional functions, and the user can use the functional functions to write a code program according to his own needs, and then test the corresponding functions of the code program by compiling and executing it.
[0003] When using each programming software, users need to learn the most basic code rules of the programming software in advance, otherwise they will not be able to further understand the functions implemented by the commonly used basic statements. In the prior art, programming learning software will provide blocks that are convenient for users to learn. The blocks contain code statements and corresponding code function text analysis, and users can learn code statements from the blocks. However, in the existing learning methods, users can only learn the text theory of learning code vocabulary or code statements from the blocks, and cannot intuitively test the functions of the blocks in actual scenarios. Summary of the invention
[0004] A first aspect of the present application provides a block function testing method, the method comprising:
[0005] Displaying a three-dimensional virtual scene, wherein the three-dimensional virtual scene includes at least one control object, and the control object has a virtual three-dimensional feature;
[0006] Acquire a first operation instruction of a user, where the first operation instruction is used to open the programming interface;
[0007] Displaying a programming interface according to the first operation instruction, the programming interface comprising a block accommodating area and an object control area, the block accommodating area having at least one block, the object control area having at least one control object, the control object being used to demonstrate the function of the block;
[0008] Acquire a second operation instruction of the user, where the second operation instruction is used to determine a target tile selected by the user on the tile accommodating area;
[0009] Determine a target operation code corresponding to the target block according to the second operation instruction;
[0010] The control object is controlled to perform corresponding actions according to the target operation code and displayed in the object control area.
[0011] Optionally, displaying a programming interface according to the first operation instruction includes:
[0012] Determine code type information in the first operation instruction, where the code type information indicates a code type selected by a user to learn;
[0013] An editing interface is displayed according to the code type information.
[0014] Optionally, after displaying the programming interface according to the first operation instruction and before obtaining the second operation instruction from the user, the method further includes:
[0015] A third operation instruction of the user is obtained, and the control object in the object control area is updated according to the third operation instruction.
[0016] Optionally, after displaying the programming interface according to the first operation instruction, the method further includes:
[0017] When it is detected that the time for which the user's indicating cursor stays on the block in the block accommodating area reaches a preset threshold, the code description interface corresponding to the block is opened.
[0018] Optionally, determining the target operation code corresponding to the target tile according to the second operation instruction includes:
[0019] Acquire the function identifier and the parameter identifier carried in the target image block according to the second operation instruction;
[0020] The target operation code is determined according to the function identifier and the parameter identifier. The target operation code includes a three-dimensional motion target operation code, a time control target operation code, a scene perspective control target operation code, an animation control target operation code, and a three-dimensional size control target operation code according to different function identifiers.
[0021] Optionally, the function identifier is a time function identifier, the parameter identifier is a time parameter identifier, and determining the target operation code according to the function identifier and the parameter identifier includes:
[0022] A time control target operation code is determined according to the time function identifier and the time parameter identifier.
[0023] Optionally, controlling the control object to perform a corresponding action according to the target operation code and displaying it in the object control area includes:
[0024] Determining a corresponding control object in the object control area according to the target operation code;
[0025] Control the control object to execute the operation corresponding to the target operation code.
[0026] A second aspect of the present application provides a block function testing system, comprising:
[0027] A first display unit, used for displaying a three-dimensional virtual scene, wherein the three-dimensional virtual scene includes at least one control object, and the control object has a virtual three-dimensional feature;
[0028] A first acquisition unit, used to acquire a first operation instruction of a user, where the first operation instruction is used to open the programming interface;
[0029] a second display unit, configured to display a programming interface according to the first operation instruction, wherein the programming interface includes a block accommodating area and an object control area, wherein the block accommodating area contains at least one block, and the object control area contains at least one control object, wherein the control object is used to demonstrate the function of the block;
[0030] A second acquisition unit, used for acquiring a second operation instruction of the user, where the second operation instruction is used for determining a target tile selected by the user on the tile accommodating area;
[0031] A first determining unit, configured to determine a target operation code corresponding to the target tile according to the second operation instruction;
[0032] An execution unit is used to control the control object to execute a corresponding action according to the target operation code, and display it in the object control area.
[0033] A third aspect of the present application provides a block function testing device, comprising:
[0034] Processor, memory, input-output unit, and bus;
[0035] The processor is connected to the memory, the input and output unit, and the bus;
[0036] The memory stores a program, and the processor calls the program to execute the method for testing the code described in any one of the first aspects.
[0037] A fourth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the program executes the first aspect and any optional method in the first aspect.
[0038] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0039] In the block function testing method provided in the present application, a three-dimensional virtual scene and a programming interface are first displayed, and the programming interface includes a block accommodating area and an object control area. The second operation instruction sent by the user is obtained, and the target operation code corresponding to the target block is determined according to the second operation instruction, and finally the behavior corresponding to the target operation code is executed on the control object in the object control area. The block to be tested can be directly selected from the block accommodating area, and the object can be controlled in the object control area to perform the corresponding function demonstration, which can intuitively test the function of the block in the actual scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0041] Figure 1 A schematic diagram of an embodiment of a block function testing method in this application;
[0042] Figure 2 This is a flowchart of another embodiment of the block function testing method in the present application;
[0043] Figure 3 A schematic diagram of the structure of an embodiment of a block function test system in this application;
[0044] Figure 4 This is a schematic diagram of the structure of an embodiment of a block function testing device in the present application. DETAILED DESCRIPTION
[0045] In order to solve the above-mentioned problems of the prior art, the present application provides a block function testing method, system, device and computer storage medium, which help users to intuitively test the functions of blocks in actual scenarios.
[0046] It should be noted that the block function test method provided in the embodiment of the present application can be applied to a terminal, a system, or a server. For example, the terminal can be a smart phone or a computer, a tablet computer, a smart TV, a smart watch, a portable computer terminal, or a fixed terminal such as a desktop computer. For the convenience of explanation, the embodiment of the present application takes the terminal as the control object for example.
[0047] See also Figure 1 , Figure 1 1 is a flow chart of the first embodiment of the block function testing method provided by the present application, and the block function testing method includes:
[0048] 101. Displaying a three-dimensional virtual scene, where the three-dimensional virtual scene includes at least one control object;
[0049] The terminal displays a three-dimensional virtual scene, and the user can perform various operations on the control objects in the virtual scene.
[0050] The terminal can obtain the three-dimensional virtual scene from a local storage unit, or obtain the three-dimensional virtual scene from a cloud server, or obtain the three-dimensional virtual scene from a mobile storage medium, which is not limited here. The three-dimensional virtual scene in this application is configured with an XYZ coordinate system. When the user operates in the three-dimensional virtual scene, the XYZ coordinate system can be used to determine the orientation. The three-dimensional virtual scene can include many three-dimensional virtual scenes, such as the sky, the ground, and the river, which are not limited here.
[0051] The three-dimensional virtual scene also includes at least one control object. The control object mentioned or discussed in the implementation of this application refers to the control object in the three-dimensional virtual scene that the user needs to control by programming. In the present embodiment, the control object can be a role object such as a virtual person, animal, plant, vehicle, and science fiction character, or a terrain object such as a wall, ditch, cliff, cable, ladder, boss, or other virtual prop object in the scene, which is not specifically limited here. These control objects have virtual three-dimensional features, and the changes of these control objects in the three-dimensional virtual scene can be virtual three-dimensional changes, such as rotation or movement based on the X, Y or Z coordinate axis, and the features displayed at different angles are different. These control objects can also have skeletons, and the terminal can drive the control object to perform three-dimensional motion by controlling the position of the skeleton. The skeleton can be composed of skeleton points and connecting lines connecting the skeleton points, and any skeleton point is configured with a relative three-dimensional coordinate axis with the skeleton point as the origin.
[0052] 102. Obtain a first operation instruction from a user, where the first operation instruction is used to open a programming interface;
[0053] When the user opens the programming interface, the terminal obtains the first operation instruction to programmatically control the object in the three-dimensional virtual scene. In this embodiment, the control object can be selected first and then the programming interface is opened, or the control object can be selected after the programming interface is opened. For example, the programming interface can be opened by receiving a right-click instruction of the user on the control object.
[0054] The first operation instruction described in this embodiment is merely illustrative. In the specific implementation, there may be other implementation methods, which are not limited here.
[0055] 103. Displaying a programming interface according to the first operation instruction, wherein the programming interface includes a block accommodating area and an object control area, wherein the block accommodating area contains at least one block, and the object control area contains at least one control object, and the control object is used to demonstrate the function of the block;
[0056] The terminal responds to the first operation instruction and displays a programming interface. In the present embodiment, the programming interface includes a block accommodating area and an object control area, and blocks are accommodated in the block accommodating area. The blocks mentioned or discussed in this application refer to blocks used to generate programming processes, and different blocks correspond to different code functions. In the present embodiment, the blocks can also carry text descriptions. Compared with directly displaying string codes, blocks with text descriptions have better readability, and users can directly understand the function or purpose of the blocks through the blocks. Blocks can also be displayed in the block accommodating area in a classified manner.
[0057] In this embodiment, at least one control object is generated in the object control area, and the control object is an operable virtual model, that is, the control object can perform corresponding operations according to the code corresponding to the block. The control object can be replaced according to the user's own needs.
[0058] 104. Obtain a second operation instruction from the user, where the second operation instruction is used to determine a target tile selected by the user on the tile accommodating area;
[0059] When a user selects a tile in the tile accommodating area, a corresponding second operation instruction will be generated, and the selected tile will be used as the target tile. When a user selects a tile in the tile accommodating area, the user can use the cursor to click on the tile in the tile accommodating area to select it, or the user can use a shortcut key to quickly select the tile in the tile accommodating area, which is not limited here.
[0060] 105. Determine a target operation code corresponding to the target block according to the second operation instruction;
[0061] After the terminal obtains the target block, it confirms and analyzes the target block to determine the target operation code corresponding to the target block. The target operation code includes a function identifier and a parameter identifier. The function identifier corresponds to the function keyword and determines the operation form of the control object. The parameter identifier corresponds to the parameter value and determines the degree of operation of the control object.
[0062] For example, the code function keyword is moveforward, which means that the control object moves forward, and the parameter value represents the distance of the forward movement. It should be noted that the terminal can set the parameter value to a default value, and the user can customize the default parameter value to change the functional test degree of the target block.
[0063] Specifically, there are different types of target operation codes, including three-dimensional motion target operation codes, time control target operation codes, scene perspective control target operation codes, animation control target operation codes and three-dimensional size control target operation codes, according to different function identifiers.
[0064] In one possible implementation, determining the target operation code according to the target block can be by obtaining a three-dimensional motion function identifier and a three-dimensional coordinate identifier carried in the block, the terminal obtaining the three-dimensional motion function according to the three-dimensional motion function identifier, obtaining the three-dimensional motion coordinates according to the three-dimensional coordinate identifier, and finally determining the three-dimensional motion target operation code according to the three-dimensional motion function and the three-dimensional motion coordinates. For example, the walk function and the three-dimensional coordinates (4,5,6,) are obtained according to the identifier carried in the target block, and the target operation code is determined to be walk(4,5,6,), that is, walking to a position with coordinates X=4, Y=5, Z=6, and the terminal controls the control object in the three-dimensional virtual scene to walk to this position.
[0065] In another possible implementation, determining the target operation code according to the target block may also be to obtain the time function identifier and the time parameter identifier carried in the block, obtain the time function and the time parameter according to the identifier carried in the target block, and finally determine the time control code according to the time function and the time parameter. For example, if the target block carries the function wait and the time parameter (2), then the target operation code is determined to be wait (2), that is, wait for 2 seconds, and the terminal controls the control object in the three-dimensional virtual scene to wait for 2 seconds. The specific waiting may be to keep the current state of the control object unchanged, or to use a preconfigured waiting action.
[0066] In another possible implementation, determining the target operation code according to the target tile can also be to obtain the viewing function and the viewing parameter according to the viewing function identifier and the viewing parameter identifier carried in the target tile, and finally determine the scene viewing control target operation code according to the viewing function and the viewing parameter. For example, the camera function and the viewing parameter (12, 45, 90) are obtained according to the identifier carried in the target tile, and the terminal determines that the target operation code is camera (12, 45, 90) according to the function and the viewing parameter. That is, the scene viewing control target operation code is determined according to the viewing function identifier and the viewing parameter identifier, and the terminal can control the camera viewing angle in the scene to be converted to a distance of 12 unit lengths, an angle of 45 degrees, and a direction of 90 degrees.
[0067] In another possible implementation, determining the target operation code according to the target block can also be to obtain the animation control function and the animation control parameters according to the animation control function identifier and the animation control parameter identifier carried in the target block; for example, obtaining the playMovie function and the corresponding animation parameters ("myself", 0, -1, true) according to the identifier carried in the target block, and determining the target code as playMovie ("myself", 0, -1, true) according to the function identifier and the animation parameters, that is, the terminal can obtain the animation with the animation name "myself" according to the target code, and play the animation "myself" from time 0 to time -1 in the three-dimensional virtual scene. In the present application, the timing of the animation playback can be either positive or reverse, which is specifically determined by the time parameter value in the function. The animation in this embodiment can be a pre-recorded animation, or a pre-configured template animation about the control object in the three-dimensional virtual scene. For example, when playing "myself", it can be to call a pre-stored animation and play it directly, or it can be to control the control object in the three-dimensional virtual scene to make a series of changes about "myself".
[0068] In another possible implementation, determining the target operation code according to the target tile may also be to obtain the three-dimensional size control function and the three-dimensional size parameter according to the three-dimensional size control function identifier and the three-dimensional size parameter identifier carried in the target tile, for example, obtaining the scaleTo function and parameter (50) according to the identifier carried in the target tile, and finally determining that the target operation code is scaleTo (50), and the terminal controls the three-dimensional size of the controlled object in the three-dimensional virtual scene to be proportionally reduced to 50% of the original size.
[0069] 106. Control the control object to perform a corresponding action according to the target operation code, and display the action in the object control area.
[0070] The terminal controls the object to perform corresponding operations according to the target operation code and displays it in the object control area.
[0071] For example, the target operation code determined according to the target block is walk(4,5,6,), that is, walking to the position with coordinates X=4, Y=5, Z=6, and the terminal controls the control object in the three-dimensional virtual scene to walk to the position.
[0072] For example, if the target operation code determined according to the target block is scaleTo(50), the terminal controls the three-dimensional size of the controlled object in the three-dimensional virtual scene to be reduced proportionally to 50% of the original size.
[0073] In the block function testing method provided in the embodiment of the present application, a three-dimensional virtual scene and a programming interface are first displayed, and the programming interface includes a block accommodating area and an object control area. The second operation instruction sent by the user is obtained, and the target operation code corresponding to the target block is determined according to the second operation instruction, and finally the behavior corresponding to the target operation code is executed on the control object in the object control area. By directly selecting the block to be tested from the block accommodating area, the object can be controlled in the object control area to perform the corresponding function demonstration. The user can directly test the block function, which helps the user to quickly and intuitively test the function of the block in the actual scene.
[0074] See also Figure 2 , Figure 2 : is a flow chart of a second embodiment of a block function testing method provided by the present application, and the block function testing method includes:
[0075] 201. Displaying a three-dimensional virtual scene, wherein the three-dimensional virtual scene includes at least one control object, and the control object has a virtual three-dimensional feature;
[0076] 202. Acquire a first operation instruction of a user, where the first operation instruction is used to open the programming interface;
[0077] Steps 201 and 202 in this embodiment are similar to steps 101 and 102 in the aforementioned embodiment, and are not described again here.
[0078] 203. Determine code type information in the first operation instruction, where the code type information indicates a code type selected by the user for learning;
[0079] When the terminal receives the first operation instruction, it first determines the initial options set by the user in the first operation instruction, such as code type information, learning level, etc. Code type information refers to the type of programming language selected by the current user. When the programming language type learned by the user is C\C++, this option can be set before or before clicking the code module, so that the terminal can determine the type of programming language selected by the user and open the corresponding interface for the user to operate.
[0080] In this embodiment, the terminal will set a default programming language, and when the user does not set other related options, the terminal will directly enter the default editing interface.
[0081] 204. Displaying an editing interface according to the code type information;
[0082] The terminal determines the programming language that the current user wants to test by acquiring the code type information in the first operation instruction, and displays the editing interface according to the code type information.
[0083] The programming interface includes a block accommodating area and an object control area. The block accommodating area contains at least one block, and the object control area contains at least one control object, which is used to demonstrate the function of the block. The editing interface is displayed through the code type information, so that the corresponding type of blocks can be displayed in the block accommodating area according to the code type information. When the user wants to change the code type currently being tested, it can be modified through the terminal, and the accommodating blocks in the block accommodating area will also change to blocks corresponding to the modified code type information.
[0084] In this embodiment, different types of codes will generate corresponding code libraries, which are used to store the code function keywords of this code type. The blocks will be associated with these code function keywords, so that after the user determines the code type information, the terminal obtains the blocks corresponding to the code type information and displays them in the block accommodation area. The code types obtained can be multiple, such as C\C++, Python, vbscript, javascript, installshield script, ActionScrip, etc., which are not limited here. As long as they meet the class attributes of the programming language, they are within the protection scope of this application.
[0085] In this embodiment, there are multiple ways to display tiles in the tile accommodating area. After the user determines the test code type, the terminal can classify and display the tiles according to different levels of difficulty, such as entry-level, intermediate, advanced, etc., so that users can proceed from simple to advanced, step by step; the tiles can also be classified and displayed according to different operation types, such as control, motion, appearance, etc., for easy query and use.
[0086] 205. Obtain a third operation instruction from the user, and update the control object in the object control area according to the third operation instruction;
[0087] There can be many types of control object models, such as people, traffic, buildings, etc. In order to facilitate users to replace a certain control object, a corresponding replacement control object option is set in the editing interface so that users can replace the control object according to their own needs.
[0088] When the user changes the control object through the role model option, the terminal receives the third operation instruction and changes the original control object to the new control object included in the third operation instruction according to the third operation instruction.
[0089] 206. When it is detected that the time for which the user's indicating cursor stays on the block in the block accommodating area reaches a preset threshold, a code description interface corresponding to the block is opened;
[0090] Specifically, the terminal may preset a threshold value, and when the terminal detects that the time for which the user's indicating cursor stays on a tile in the tile accommodating area reaches the preset threshold value, the code description interface corresponding to the tile is opened.
[0091] For example, when the user's mouse is on a certain block for a preset time, a code description interface will pop up according to the code corresponding to the block. The code description interface contains a text analysis of the code, which is used to provide a text description of the function and usage of the code, so that the user can understand the instruction code of the block and the function it implements in text form.
[0092] 207. Obtain a second operation instruction from the user, where the second operation instruction is used to determine a target tile selected by the user on the tile accommodating area;
[0093] 208. Determine a target operation code corresponding to the target block according to the second operation instruction;
[0094] Steps 207 and 208 in this embodiment are similar to steps 104 and 105 in the above-mentioned embodiment, and are not described again here.
[0095] 209. Determine a corresponding control object in the object control area according to the target operation code;
[0096] The execution object of the target operation code can be one or more. Therefore, after the terminal determines the target operation code, the terminal determines the corresponding control object in the object control area through the target operation code, and the control object will perform a series of visual drives and displays according to the operation code.
[0097] For example, the function of the target operation code is to move the first control object from its original coordinate position to a coordinate 5 units in the positive direction of the X-axis of the second control object coordinate. The terminal determines the current first control object and the second control object according to the operation code, and then performs corresponding operations on the two control objects according to the target operation code.
[0098] 210. Control the control object to execute the operation corresponding to the target operation code.
[0099] After the terminal determines the control object according to the operation code, the terminal performs the operation corresponding to the target operation code on the control object. In the process of controlling the control object to perform the operation corresponding to the target operation code, the terminal first needs to determine the operation form of the target operation code. The operation form can be a moving form, an appearance change form, an event trigger form, a sound trigger form, a time control form, etc. Each operation form varies according to the information of the specific code, and is not limited here.
[0100] After determining the operation form corresponding to the current operation code, the parameter values required for the operation form are obtained, and the operation to be performed is determined based on the operation form and the parameter values. The control object can be controlled to perform the corresponding operation, so that the control object completes the operation corresponding to the target operation code.
[0101] In the block function testing method provided in the embodiment of the present application, a three-dimensional virtual scene and a programming interface are first displayed, and the first operation instruction sent by the user is obtained, the code type information is determined, and the editing interface is displayed using the code type information. The programming interface includes a block accommodating area and an object control area. When it is detected that the time that the user's indicating cursor stays on the block in the block accommodating area reaches a preset threshold, the code description interface corresponding to the block is opened. The second operation instruction sent by the user is obtained, and the target operation code corresponding to the target block is determined according to the second operation instruction, and finally the behavior corresponding to the target operation code is executed on the control object in the object control area. Directly select the block to be tested from the block accommodating area, and the object can be controlled in the object control area to perform the corresponding function demonstration. The user can directly test the block function, which helps the user to quickly and intuitively test the function of the block in the actual scene.
[0102] Secondly, when it is detected that the time for which the user's indicating cursor stays on the block in the block accommodating area reaches a preset threshold, the code description interface corresponding to the block is opened, so that the user can learn the block code through the code description interface.
[0103] The above describes the embodiments of the method in the present application. The following describes the block function testing system, device and computer storage medium in the present application in conjunction with the accompanying drawings.
[0104] See also Figure 3 , Figure 3 This is a schematic diagram of an embodiment of a block function test system in the present application. The block function test system includes:
[0105] A first display unit 301 is used to display a three-dimensional virtual scene, wherein the three-dimensional virtual scene includes at least one control object, and the control object has a virtual three-dimensional feature;
[0106] A first acquisition unit 302 is used to acquire a first operation instruction of a user, where the first operation instruction is used to open the programming interface;
[0107] A second display unit 303 is used to display a programming interface according to the first operation instruction, wherein the programming interface includes a block accommodating area and an object control area, wherein the block accommodating area contains at least one block, and the object control area contains at least one control object, wherein the control object is used to demonstrate the function of the block;
[0108] A second acquisition unit 304 is used to acquire a second operation instruction of the user, where the second operation instruction is used to determine a target tile selected by the user on the tile accommodating area;
[0109] A first determining unit 305, configured to determine a target operation code corresponding to the target tile according to the second operation instruction;
[0110] The execution unit 306 is used to control the control object to execute a corresponding action according to the target operation code, and display it in the object control area.
[0111] Optionally, the second display unit 303 is specifically used for:
[0112] Determine code type information in the first operation instruction, where the code type information indicates a code type selected by a user to learn;
[0113] An editing interface is displayed according to the code type information.
[0114] Optionally, the system further comprises:
[0115] A third operation instruction of the user is obtained, and the control object in the object control area is updated according to the third operation instruction.
[0116] Optionally, the system further comprises:
[0117] When it is detected that the time for which the user's indicating cursor stays on the block in the block accommodating area reaches a preset threshold, the code description interface corresponding to the block is opened.
[0118] Optionally, the first determining unit 305 is specifically configured to:
[0119] Acquire the function identifier and the parameter identifier carried in the target image block according to the second operation instruction;
[0120] The target operation code is determined according to the function identifier and the parameter identifier. The target operation code includes a three-dimensional motion target operation code, a time control target operation code, a scene perspective control target operation code, an animation control target operation code, and a three-dimensional size control target operation code according to different function identifiers.
[0121] Optionally, the execution unit 306 is specifically configured to:
[0122] Determining a corresponding control object in the object control area according to the target operation code;
[0123] Control the control object to execute the operation corresponding to the target operation code.
[0124] The present application also provides a block function testing device, comprising:
[0125] Processor 401, memory 402, input and output unit 403 and bus 404;
[0126] The processor 401 is connected to the memory 402, the input and output unit 403 and the bus 404;
[0127] The memory 402 stores a program, and the processor 401 calls the program to execute the above-mentioned block function testing method.
[0128] The present application also provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the above-mentioned block function testing method is executed.
[0129] The present application also provides a computer-readable storage medium, on which a program is stored. When the program is run on a computer, the computer executes any of the block function testing methods described above.
[0130] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0131] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices 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 system, 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0132] 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.
[0133] In addition, each functional unit in each embodiment of the present application 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0134] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable 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 method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A block function testing method, characterized in that: include: Displaying a three-dimensional virtual scene, wherein the three-dimensional virtual scene includes at least one control object, and the control object has a virtual three-dimensional feature; Acquire a first operation instruction of a user, where the first operation instruction is used to open a programming interface; Displaying a programming interface according to the first operation instruction, the programming interface comprising a block accommodating area and an object control area, the block accommodating area having at least one block, the object control area having at least one control object, the control object being used to demonstrate the function of the block; The displaying of a programming interface according to the first operation instruction includes: Determine code type information in the first operation instruction, the code type information indicating the code type selected by the user to learn; and display an editing interface according to the code type information; When it is detected that the time for which the user's pointer cursor stays on the block in the block accommodating area reaches a preset threshold, opening a code description interface corresponding to the block; Acquire a third operation instruction of the user, and update the control object in the object control area according to the third operation instruction; Acquire a second operation instruction of the user, where the second operation instruction is used to determine a target tile selected by the user on the tile accommodating area; Determine a target operation code corresponding to the target block according to the second operation instruction; The determining the target operation code corresponding to the target block according to the second operation instruction includes: acquiring a function identifier and a parameter identifier carried in the target block according to the second operation instruction; determining a target operation code according to the function identifier and the parameter identifier, wherein the target operation code includes a three-dimensional motion target operation code, a time control target operation code, a scene perspective control target operation code, an animation control target operation code, and a three-dimensional size control target operation code according to different function identifiers; The function identifier is a time function identifier, the parameter identifier is a time parameter identifier, and determining the target operation code according to the function identifier and the parameter identifier includes: determining the time control target operation code according to the time function identifier and the time parameter identifier; Control the control object to perform a corresponding action according to the target operation code, and display it in the object control area; The controlling the control object to perform a corresponding action according to the target operation code and displaying it in the object control area includes: Determining a corresponding control object in the object control area according to the target operation code; Control the control object to execute the operation corresponding to the target operation code.
2. A block function test system, characterized in that: include: A first display unit, used for displaying a three-dimensional virtual scene, wherein the three-dimensional virtual scene includes at least one control object, and the control object has a virtual three-dimensional feature; A first acquisition unit, used to acquire a first operation instruction of a user, where the first operation instruction is used to open a programming interface; a second display unit, configured to display a programming interface according to the first operation instruction, wherein the programming interface includes a block accommodating area and an object control area, wherein the block accommodating area contains at least one block, and the object control area contains at least one control object, wherein the control object is used to demonstrate the function of the block; The second display unit is specifically used for: Determine code type information in the first operation instruction, the code type information indicating the code type selected by the user to learn; and display an editing interface according to the code type information; The system further includes: when it is detected that the time for which the user's indicating cursor stays on the block in the block accommodating area reaches a preset threshold, opening a code description interface corresponding to the block; The system further includes: acquiring a third operation instruction of a user, and updating a control object in the object control area according to the third operation instruction; A second acquisition unit, used for acquiring a second operation instruction of the user, where the second operation instruction is used for determining a target tile selected by the user on the tile accommodating area; A first determining unit, configured to determine a target operation code corresponding to the target tile according to the second operation instruction; The first determining unit is specifically configured to: Acquire the function identifier and the parameter identifier carried in the target image block according to the second operation instruction; Determining a target operation code according to the function identifier and the parameter identifier, wherein the target operation code includes a three-dimensional motion target operation code, a time control target operation code, a scene perspective control target operation code, an animation control target operation code, and a three-dimensional size control target operation code according to different function identifiers; the function identifier is a time function identifier, and the parameter identifier is a time parameter identifier, and determining the target operation code according to the function identifier and the parameter identifier includes: determining the time control target operation code according to the time function identifier and the time parameter identifier; an execution unit, configured to control the control object to execute a corresponding action according to the target operation code, and display the action in the object control area; The execution unit is specifically used for: Determine a corresponding control object in the object control area according to the target operation code; and control the control object to perform an operation corresponding to the target operation code.
3. A block function testing device, characterized in that: The device comprises: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the block function testing method according to claim 1. 4 . A computer-readable storage medium having a program stored thereon, wherein the program performs the method according to claim 1 when executed on a computer.
