CN109634567B - Information creating method, device, terminal and storage medium - Google Patents

Information creating method, device, terminal and storage medium Download PDF

Info

Publication number
CN109634567B
CN109634567B CN201811495118.0A CN201811495118A CN109634567B CN 109634567 B CN109634567 B CN 109634567B CN 201811495118 A CN201811495118 A CN 201811495118A CN 109634567 B CN109634567 B CN 109634567B
Authority
CN
China
Prior art keywords
target
target class
class
creating
created
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811495118.0A
Other languages
Chinese (zh)
Other versions
CN109634567A (en
Inventor
周志刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Ouyuan Network Video Co ltd
Original Assignee
Wuhan Ouyuan Network Video Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Ouyuan Network Video Co ltd filed Critical Wuhan Ouyuan Network Video Co ltd
Priority to CN201811495118.0A priority Critical patent/CN109634567B/en
Publication of CN109634567A publication Critical patent/CN109634567A/en
Application granted granted Critical
Publication of CN109634567B publication Critical patent/CN109634567B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented

Abstract

The embodiment of the invention discloses an information creating method, an information creating device, a terminal and a storage medium. The method comprises the following steps: determining the attribute of each target class to be created; creating a base class based on the common attributes of the target classes to be created; creating each target class to be created based on the base class to obtain each target class, wherein each target class inherits the base class; creating target class objects respectively corresponding to at least one target class, and displaying the target class objects; and when the picture is updated, the display position of the target class object is updated by calling a preset object position updating function. According to the technical scheme of the embodiment of the invention, each target class can be established on the basis of the base class, so that the structure of a system formed by each target class is more reasonable, and the robustness and reusability of the whole system are improved; and each target class object created on the basis of the target class can update the display position and present the effect of a dynamic picture.

Description

Information creating method, device, terminal and storage medium
Technical Field
The embodiment of the invention relates to the field of computers, in particular to an information creating method, an information creating device, a terminal and a storage medium.
Background
With the development and sophistication of various types of software systems, the number of information elements that may be involved increases dramatically. For example, the information element in the live system may be a gift element or a message element. Considering that each information element may involve multiple attributes, the creation processes of each information element in the existing scheme are independent from each other, so that the development process of the system is complex and the robustness is not high.
Disclosure of Invention
The embodiment of the invention provides an information creating method, an information creating device, a terminal and a storage medium, which are used for improving the robustness and the reusability of a system and enabling the structure of the whole system to be more reasonable.
In a first aspect, an embodiment of the present invention provides an information creating method, including:
determining the attribute of each target class to be created;
creating a base class based on the common attributes of the target classes to be created;
creating each target class to be created based on the base class to obtain each target class, wherein each target class inherits the base class;
creating target class objects respectively corresponding to at least one target class, and displaying the target class objects;
and when the picture is updated, the display position of the target class object is updated by calling a preset object position updating function.
Optionally, the location update function may implement a function of updating the display location of the target class object by:
acquiring the target moving speed of the target class object, and determining the target moving distance when each frame of picture is updated according to the target moving speed;
determining the target moving direction of the target class object according to the preset mark bit;
determining the target coordinates of the target class object during the picture updating according to the current coordinates, the target moving distance and the target moving direction of the target class object;
and when the picture is updated, moving the target class object from the position of the current coordinate to the position of the target coordinate.
Optionally, after determining the target coordinates of the target class object at the time of screen update, the method may further include:
and when the position of the target coordinate exceeds the boundary position, adjusting the mark position, and updating the target moving direction and the target coordinate according to the adjustment result.
Optionally, after creating the target class object corresponding to the at least one target class, the method may further include:
when the target class object is surrounded by the external rectangular frame, acquiring the side length of the rectangular frame;
and determining the target action point coordinate of the target class object according to the scaling factor, the anchor point coordinate, the current coordinate and the side length of the target class object.
Optionally, creating a target class object corresponding to at least one target class may include:
the method comprises the steps of obtaining the type of a target class object to be created, and creating the target class object of the type based on the type and a preset object creation interface.
Optionally, creating a target class object of the type based on the type and a preset object creation interface may include:
acquiring initial coordinates of a target class object to be created;
based on a preset object creating interface, creating a target class object according to the identity identification number, the type and/or the initial coordinate of the target class object to be created; the identification number is used for determining the attribute of the target class object.
In a second aspect, an embodiment of the present invention further provides an information creating apparatus, where the apparatus includes:
the attribute determining module is used for determining the attribute of each target class to be created;
the base class creating module is used for creating a base class based on the common attributes of the target classes to be created;
the target class creating module is used for creating each target class to be created based on the base class to obtain each target class, wherein each target class inherits the base class;
the target class object creating module is used for creating target class objects corresponding to at least one target class respectively and displaying the target class objects;
and the display position updating module is used for updating the display position of the target class object by calling a preset object position updating function when the picture is updated.
In a third aspect, an embodiment of the present invention further provides a terminal, where the terminal includes:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the information creation method provided by any embodiment of the present invention.
In a fourth aspect, the embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the information creating method provided in any embodiment of the present invention.
According to the technical scheme of the embodiment of the invention, the base class is created based on the common attributes of the target classes to be created by determining the attributes of the target classes to be created, so that all the common attributes of the target classes to be created can be included in the base class, and the relation among the target classes to be created is enhanced; each target class to be created is created based on the base class to obtain each target class, wherein each target class inherits the base class, so that the creation process of each target class can only aim at the respective specific attribute of each target class, the whole creation process is simplified, and the pertinence is stronger; creating at least one target class object corresponding to the target class respectively, so that instantiation and concretization of the target class are realized, and the target class object is convenient to display; the preset object position updating function is called, so that the display position of the target class object can be synchronously updated during the picture updating, the moving process of the target class object is embodied, and the effect of a dynamic picture is presented. In the technical scheme, each target class is established on the basis of the base class, so that the structure of a system formed by each target class is more reasonable, and the robustness and the reusability of the whole system are improved; and each target class object created on the basis of the target class can update the display position, so that the picture can be dynamically displayed.
Drawings
Fig. 1 is a flowchart of an information creating method according to a first embodiment of the present invention;
fig. 2 is a flowchart of location update in an information creating method according to a second embodiment of the present invention;
fig. 3 is a block diagram showing a configuration of an information creating apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal in a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of an information creating method according to a first embodiment of the present invention, which is applicable to a case where a large number of information elements are created, and is particularly applicable to a case where each information element to be created has a common attribute. The method can be executed by the information creating device provided by the embodiment of the invention, and the device can be realized by software and/or hardware. Referring to fig. 1, the method of the present embodiment specifically includes the following steps:
and S110, determining the attribute of each target class to be created.
Considering that various software systems may involve a large number of information elements in the development and improvement process, and common attributes and specific attributes may exist among the information elements. Of course, it will be understood by those skilled in the art that the common attribute may be an attribute that both of the at least two information elements have, and in particular, an attribute that each of the information elements have.
The target classes to be created may be a uniform abstract description, and common attributes or specific attributes may exist between the target classes to be created. The determination of the attributes of each target class to be created is beneficial for further analyzing and summarizing the relation between the attributes.
And S120, creating a base class based on the common attributes of the target classes to be created.
And analyzing the attributes corresponding to the target classes to be created, determining the common attributes of the target classes to be created, and creating the base class based on the common attributes. Then, the common attribute included in the base class may be an attribute that each target class to be created has. The determination of the base class can simplify the creation process of each target class to be created, and strengthen the relation between each target class to be created.
S130, creating each target class to be created based on the base class to obtain each target class, wherein each target class inherits the base class.
Compared with the common attributes included in the base class, each target class to be created can also have the corresponding unique attribute. Then, the creation process of each target class to be created may be understood as extending the respective corresponding unique attribute on the basis of the base class, thereby obtaining each target class. Then, each target class can be understood as a result of inheriting the common attributes in the base class and extending the respective corresponding unique attributes.
S140, creating at least one target class object corresponding to each target class, and displaying the target class objects.
Wherein the target class and target class objects are a set of relative concepts: the target class may be understood as a uniform abstract description of all target class objects belonging to the target class, and the target class objects may be understood as the instantiated, materialized results of the target class. Then the properties of each target class may be constant, while the property parameters of each target class object may change with its own behavior.
And creating at least one target class object corresponding to the target class respectively to obtain the instantiated target class object, and further displaying the target class object. The attribute parameters of each target class object belonging to the same target class at the initial creation time can be completely the same or have differences. The number of target class objects included in each target class may be 0, or may be any positive integer greater than or equal to 1.
And S150, when the picture is updated, the display position of the target class object is updated by calling a preset object position updating function.
Considering that the attribute parameter of the target class object may change with its own behavior, it may specifically reflect a change in the display state of the target class object at the time of screen update, for example, the display position of the target class object may change at the time of screen update. And aiming at the change of the position attribute, the display position of the target class object during the picture updating is determined and the display state is updated by calling a preset object position updating function so as to embody the moving process of the target class object. The preset object position updating function can be used for updating the display position of the target class object according to the movement parameters of the target class object, and the movement parameters can include a movement speed, a movement direction and/or a movement distance.
In order to better understand the specific implementation process of the above steps, the following describes an example of the information creation method of the present embodiment with reference to specific examples "creation of soldier element in battle system" and "creation of gift element in live broadcast system".
For example, many information elements involved in a combat system may be soldier elements, and the target class to be created may include a combat soldier class to be created, a bowrower soldier class, a magic soldier class, a bomb soldier class, and the like. And the attributes of each soldier class to be created can comprise soldier grade, soldier blood volume, attack power, defense range, moving speed, soldier current coordinates, soldier identification number (ID), close-up/remote attack range, magic skill, bomb skill and the like. The attributes can be used for calculating parameters of the soldiers in the whole fighting process, such as updating of information of soldier movement parameters, attack parameters and the like.
It is understood that the attributes of the soldier classes to be created may be common attributes or specific attributes. The common attribute can be the attribute of each soldier class, such as soldier ID, defense range, near warfare/remote attack range and the like; the unique attribute may be at least one attribute unique to a soldier class, for example the magic skill may be a unique attribute of a magic soldier class and the bomb skill may be a unique attribute of a bomb soldier class. Then the soldier base class can be created according to the common attribute of each soldier class to be created, so that the creation process of each soldier class is simplified, and the structure of the combat system formed by the soldier classes is more reasonable.
The creation process of each soldier class to be created may be a process of inheriting the common attributes in the base class and then extending the unique attributes. For example, the magic soldier class to be created can inherit the common attributes in the base class and extend the specific attributes such as magic skills to obtain the magic soldier class. The magic soldier class may then include soldier ID, defense range, near/remote attack range, magic skill, etc. attributes.
After the combat system is started, a soldier object can be created according to the soldier class, namely, the soldier class is instantiated and displayed. At least one soldier object corresponding to the soldier class can be created according to the specific situation of the battle, for example, the magic soldiers corresponding to the magic soldier classes can be created, and the number of the magic soldiers needing to be created is determined.
As another example, many information elements involved in a live broadcast system may be gift elements, and the target class to be created may be a shark fin gift class, a fish-ball gift class, a yacht gift class, a rocket gift class, and the like. And the attribute of each to-be-created gift class may be a gift price, a gift type, a gift model number, etc. Similarly, the above attributes may be common attributes such as gift price, that is, each gift class to be created may correspond to its own price; also possible are characteristic attributes such as gift types, where the yacht gifts can be specifically classified as leisure yacht gifts, fishing yacht gifts. Further, a gift base class is created according to the common attributes of the gift classes to be created, each gift class to be created can inherit the base class, and then specific attributes are expanded, for example, the yacht gift class to be created inherits the common attributes of the gift price, the gift model and the like, and the attribute of the gift type is expanded, so that the yacht gift class is obtained. And the yacht gifts corresponding to the yacht gifts can be created based on the yacht gifts.
According to the technical scheme of the embodiment of the invention, the base class is created based on the common attributes of the target classes to be created by determining the attributes of the target classes to be created, so that all the common attributes of the target classes to be created can be included in the base class, and the relation among the target classes to be created is enhanced; each target class to be created is created based on the base class to obtain each target class, wherein each target class inherits the base class, so that the creation process of each target class can only aim at the respective specific attribute of each target class, the whole creation process is simplified, and the pertinence is stronger; creating at least one target class object corresponding to the target class respectively, so that instantiation and concretization of the target class are realized, and the target class object is convenient to display; the preset object position updating function is called, so that the display position of the target class object can be synchronously updated during the picture updating, the moving process of the target class object is embodied, and the effect of a dynamic picture is presented. In the technical scheme, each target class is established on the basis of the base class, so that the structure of a system formed by each target class is more reasonable, and the robustness and the reusability of the whole system are improved; and each target class object created on the basis of the target class can update the display position, so that the picture can be dynamically displayed.
A selectable scheme, where a target class object corresponding to at least one target class is created in the scheme, the method may further include: the method comprises the steps of obtaining the type of a target class object to be created, and creating the target class object of the type based on the type and a preset object creation interface.
The preset object creating interface can be used for directly creating the target class object according to the type attribute of the target class object. The type attribute of the target class object can be obtained by reading the type attribute of the target class to which the target class object belongs, so that the type of the target class object can be consistent with the type of the target class to which the target class object belongs. The setting of the object creation interface simplifies the creation process, so that one interface can create various target class objects according to the acquired type attributes.
An optional scheme, where the scheme creates a target class object of a type based on the type and a preset object creation interface, may specifically include:
and acquiring initial coordinates of the target class object to be created. The initial coordinates may be coordinates when the target class object to be created is created initially. When the initial coordinates of the target class object to be created are related to the type to which the target class object belongs, the initial coordinates of the target class object to be created can be determined according to the type of the target class object to be created, and the initial coordinates of the target class objects belonging to the same type can be the same. Alternatively, when the initial coordinates of the target class object to be created are related to the user setting, the initial coordinates may be determined by acquiring parameters set by the user.
Based on a preset object creating interface, creating a target class object according to the identity identification number, the type and/or the initial coordinate of the target class object to be created; the identification number is used for determining the attribute of the target class object. The identification number may be allocated when the target class object is created to ensure uniqueness of each target class object, and then any attribute of the target class object may be determined according to the identification number of the target class object. The preset object creating interface can be used for setting the attribute parameters of the target class object to be created and creating the target class object according to the attribute parameters. The attribute parameters that the object creation interface may set include an identification number, a type, and/or initial coordinates.
In order to better understand the specific implementation process of the above steps, the following description proceeds to an exemplary explanation of the information creation method of the present embodiment based on the specific example "creation of soldier elements in a combat system" in embodiment one.
By way of example, the specific process of magic soldier creation may be: the magic soldiers to be created are assigned with IDs, the initial value of the ID can be set to 0, and the value of the ID is increased when each soldier is created. The method has the advantages that the IDs of all soldiers in the combat system can be guaranteed to be unique, specific soldiers can be determined through inquiring the IDs subsequently, and for example, the preset object creation interface can obtain attribute parameters of all magic soldiers through the IDs. When a battle is over, all ID values can be cleared and can be reassigned at the beginning of the next battle.
Determining initial coordinates of the magic soldiers to be created, wherein the initial coordinates can be fixed values, namely the initial coordinates of all the magic soldiers are the same; the magic soldier coordinate system can also be a non-fixed value, and the initial coordinates of the magic soldiers can be determined according to the fighting condition, namely, the magic soldiers are created at the position of which the coordinate position needs the magic soldiers. At the moment, the preset object creating interface obtains the type of the soldier, and further the magic soldier can be directly created according to the initial coordinate and the attribute parameters pointed by the ID value.
According to the technical scheme of the embodiment, the related attribute parameters of the target class object to be created are set through the preset object creation interface, and the target class object is directly created according to the attribute parameters, so that different target class objects can be directly created through the same interface, and the effect of simplifying the creation process is achieved.
Example two
The embodiment is further extended on the basis of the technical scheme, and the specific implementation process of the position updating function is elaborated in detail. The same or corresponding terms as those in the above embodiments are not explained in detail herein. As shown in fig. 2, the method of this embodiment may further include the following steps:
s210, acquiring the target moving speed of the target class object, and determining the target moving distance when each frame of picture is updated according to the target moving speed.
The attribute of the target class object may include a target moving speed, and then the target moving distance of the target class object at the time of updating each frame of picture may be determined according to the target moving speed. Of course, the object moving distance is related to the time of each frame of picture, which is related to the frame rate, for example, when the frame rate of picture is 60 frames/second, the time of each frame of picture is 1/60 seconds; similarly, when the frame rate of the picture is 24 frames/second, the time per frame of the picture is 1/24 seconds. Therefore, the target moving distance when each frame of picture is updated can be calculated according to the target moving speed of the target class object.
And S220, determining the target moving direction of the target class object according to the preset mark bit.
The target moving direction of the target class object may be determined according to a specific value of the flag bit set in advance, for example, when the value of the flag bit is 1, it may indicate moving in the current direction, when the value is 2, it may indicate moving in the opposite direction of the current direction, and when the value is 3, it may indicate moving in a direction rotated by 90 ° clockwise with reference to the current direction.
And S230, determining the target coordinates of the target class object during the picture updating according to the current coordinates, the target moving distance and the target moving direction of the target class object.
The current coordinates of the target class object may be coordinates before screen update, and the target coordinates of the target class object may be coordinates after screen update. Then, the target coordinates of the target class object can be determined according to the current coordinates, the target moving distance and the target moving direction of the target class object.
And S240, when the picture is updated, moving the target class object from the position of the current coordinate to the position of the target coordinate.
When the picture is updated, the target class object can be moved from the position of the current coordinate to the position of the target coordinate, and the position updating process can directly reflect the moving process of the target class object in consideration of the short time of each frame of the picture.
According to the technical scheme of the embodiment of the invention, the target coordinate of the target class object can be calculated during the picture updating through the parameters of the target moving distance, the target moving direction, the current coordinate and the like of the target class object, so that the real-time updating of the coordinate position is realized, and the moving process of the target class object is presented as a whole.
An optional technical solution, after determining the target coordinates of the target class object during the screen update in the above solution, may specifically include: and when the position of the target coordinate exceeds the boundary position, adjusting the mark position, and updating the target moving direction and the target coordinate according to the adjustment result.
Considering that the position where the target class object can be displayed is limited by a boundary, when the position of the calculated target coordinate exceeds the boundary position, the target moving direction can be changed by adjusting the mark position, and further the target coordinate can be changed, so that the target class object is always within the boundary range where the target class object can be displayed. For example, when the value of the flag bit is 1 and the position of the calculated target coordinate exceeds the boundary position, the value of the flag bit may be adjusted to 2 so as to move in the direction opposite to the current direction.
An optional technical solution, where after creating a target class object corresponding to at least one target class in the above solution, may specifically include:
and when the target class object is surrounded by the circumscribed rectangular frame, acquiring the side length of the rectangular frame. Considering that various software systems may involve various types of information elements, the forms of the target class objects corresponding to the various software systems may vary greatly. Then, a circumscribed rectangle can be set to surround the target class object, so that the target class object becomes an object with a regular form. The side length of the rectangular frame can be obtained based on the circumscribed rectangular frame.
And determining the target action point coordinate of the target class object according to the scaling factor, the anchor point coordinate, the current coordinate and the side length of the target class object. The anchor point can be regarded as the central point of the target class object, and the anchor point coordinate can be regarded as the coordinate of the target class object and is a relative coordinate; in contrast, the current coordinates of the target class object are absolute coordinates. The difference between the anchor coordinates and the current coordinates may be reflected in that when the location of the target class object is updated, the current coordinates may change, but the anchor coordinates may not. In addition, although the coordinate system of the anchor point coordinate is different from the coordinate system of the current coordinate, the anchor point coordinate may be converted based on the coordinate system of the current coordinate, and the converted coordinate may be defined as the target action point coordinate of the target class object. In addition, the target class object may be displayed in an enlarged or reduced form when displayed, and then a zoom factor may be set to indicate the enlarged or reduced form of the target class object. In summary, the target action point coordinate of the target class object is the current coordinate — the anchor coordinate x scaling factor x side length.
In order to better understand the specific implementation process of the above steps, the following description proceeds to an exemplary explanation of the information creation method of the present embodiment based on the specific example "creation of soldier elements in a combat system" in embodiment one.
For example, given that soldiers in a combat system may be involved in combat behavior, movement logic may be involved in the course of the combat, which may be used to generate movement animations. And the moving logic of the soldier can be mainly related to the moving speed of the target thereof, and the moving distance of the target can be calculated when each frame of picture is updated according to the frame rate of the animation.
It will be appreciated that the combat system may be a battle system of the castle battle class, and there may be an enemy castle boundary attribute and a my castle boundary attribute, which of course may be common attributes and stored in the base class. Then there may be 2 directions of movement for the soldier-attack and return to the enemy castle. Therefore, a flag bit may be set to determine the soldier's target movement direction, e.g. a flag bit of 1 may indicate attack on an enemy castle and a flag bit of 0 may indicate return to my castle.
In summary, when the current coordinate, the target moving distance, and the target moving direction of the soldier are obtained, the target coordinate at the time of updating each frame of picture can be determined, and then, if the mark phases of two frames of pictures before and after picture updating are the same, the target coordinate is the current coordinate plus the target moving distance; if the current coordinate is not the target movement distance, the target coordinate is the current coordinate. The position of the soldier is determined when the picture is updated, and the soldier can be further moved from the position of the current coordinate to the position of the target coordinate to show the moving process of the soldier.
Optionally, considering that there may be an enemy castle boundary and a my castle boundary in the battle system, when the position of the target coordinate is determined to exceed the boundary position, the target moving direction may be changed by adjusting the marker bit, so that the soldier may move back and forth between the enemy castle and the my castle. For example, when the position of the target coordinates exceeds the enemy castle boundary, the flag bit may be changed from 1 to 0, so that the soldier moves toward the my castle direction.
Optionally, for example, when the distance range between the my soldier and the enemy soldier is in the close combat attack range, the my soldier may attack the enemy soldier, so that the battle effect of the picture can be improved by determining the accurate attack position of the enemy soldier, wherein the target action point coordinates of the target class object may be understood as attack point coordinates. Considering that each soldier may belong to a different soldier class, the morphological differences of each soldier may be large. Therefore, an external rectangle can be arranged to surround the soldier, so that the soldier has a regular form, and the size of the rectangular frame can be different according to different types of the soldiers.
In addition, each soldier can have an anchor point, and the anchor point positions of the soldiers are different due to different shapes of the soldiers, for example, the anchor point which reaches up to the soldier can be the right center of the rectangular frame, and the anchor point of the short soldier can be on the soldier head. While the previously mentioned current coordinates of the soldier are the coordinates of the soldier in a combat scene, which may be the coordinates of a point on the soldier's foot. When the battle scene is a two-dimensional picture, the current coordinates and the anchor coordinates can be represented in the form of (X, Y).
In addition, in order to display the whole battle scene and/or the local zooming-in scene, a zooming factor is set to represent the zooming-in mode or the zooming-out mode of each soldier in the scene. In summary, the soldier attack point (X, Y) can be calculated as follows: scaling factor X rectangular frame width by current X coordinate-anchor point X coordinate X X coordinate X coordinate of attack point X coordinate; the attack point Y coordinate is the current Y coordinate-the anchor point Y coordinate xY coordinate scaling factor x rectangular box height. According to the technical scheme, the calculation method of the target action point coordinate of the target class object is elaborated, and the effect that the anchor point is expressed by taking the coordinate system of the current coordinate as the reference is achieved.
EXAMPLE III
Fig. 3 is a block diagram of an information creating apparatus according to a third embodiment of the present invention, where the apparatus is configured to execute the information creating method according to any of the above embodiments. The device and the information creating method of each embodiment belong to the same inventive concept, and details which are not described in detail in the embodiment of the information creating device can refer to the embodiment of the information creating method. Referring to fig. 3, the apparatus may specifically include: a property determination module 310, a base class creation module 320, a target class creation module 330, a target class object creation module 340, and a display location update module 350.
The attribute determining module 310 is configured to determine an attribute of each target class to be created;
a base class creating module 320, configured to create a base class based on the common attribute of each target class to be created;
a target class creating module 330, configured to create each target class to be created based on the base class to obtain each target class, where each target class inherits the base class;
a target class object creating module 340, configured to create target class objects corresponding to at least one target class, and display the target class objects;
and a display position updating module 350, configured to update the display position of the target class object by calling a preset object position updating function when performing screen updating.
Optionally, the display position updating module 350 may implement the function of updating the display position of the target class object by:
the target moving distance determining unit is used for acquiring the target moving speed of the target class object and determining the target moving distance when each frame of picture is updated according to the target moving speed;
the target moving direction determining unit is used for determining the target moving direction of the target class object according to the preset mark bit;
the target coordinate determination unit is used for determining the target coordinates of the target class object during the picture updating according to the current coordinates, the target moving distance and the target moving direction of the target class object;
and the display position updating unit is used for moving the target class object from the position of the current coordinate to the position of the target coordinate when the picture is updated.
Optionally, after the target coordinate determination unit, the method may further include:
and the target coordinate updating unit is used for adjusting the mark position when the position of the target coordinate exceeds the boundary position, and updating the target moving direction and the target coordinate according to the adjustment result.
Optionally, after the target class object creating module 340, the method may further include:
the rectangular frame side length obtaining module is used for obtaining the side length of the rectangular frame when the target class object is surrounded by the external rectangular frame;
and the target action point coordinate determination module is used for determining the target action point coordinate of the target class object according to the scaling factor, the anchor point coordinate, the current coordinate and the side length of the target class object.
Optionally, the target class object creating module 340 may specifically include:
and the target class object creating unit is used for acquiring the type of the target class object to be created and creating the target class object of the type based on the type and a preset object creating interface.
Optionally, the target class object creating unit may specifically include:
the initial coordinate acquisition subunit is used for acquiring the initial coordinates of the target class object to be created;
the target class object creating subunit is used for creating a target class object according to the identity identification number, the type and/or the initial coordinate of the target class object to be created on the basis of a preset object creating interface; the identification number is used for determining the attribute of the target class object.
According to the information creating device provided by the third embodiment of the invention, the attribute determining module and the base class creating module are matched with each other, so that all the common attributes of the target classes to be created can be included in the base class, and the relation between the target classes to be created is enhanced; the target class creating module enables the creating process of each target class to be only specific to the target class, simplifies the whole creating process and has stronger pertinence; and the target class object creating module and the display position updating module are matched with each other to present a dynamic picture. In the technical scheme, each target class is established on the basis of the base class, so that the structure of a system formed by each target class is more reasonable, and the robustness and the reusability of the whole system are improved; and each target class object created on the basis of the target class can update the display position, so that the picture can be dynamically displayed.
The information creating device provided by the embodiment of the invention can execute the information creating method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the executing method.
It should be noted that, in the embodiment of the information creating apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
Example four
Fig. 4 is a schematic structural diagram of a terminal according to a fourth embodiment of the present invention, as shown in fig. 4, the terminal includes a memory 510, a processor 520, an input device 530, and an output device 540. The number of the processors 520 in the terminal may be one or more, and one processor 520 is taken as an example in fig. 4; the memory 510, processor 520, input device 530, and output device 540 in the terminal may be connected by a bus or other means, such as by bus 550 in fig. 4.
The memory 510 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the information creation method in the embodiment of the present invention (for example, the attribute determination module 310, the base class creation module 320, the target class creation module 330, the target class object creation module 340, and the display position update module 350 in the information creation apparatus). The processor 520 implements the above-described information creation method by executing software programs, instructions, and modules stored in the memory 510 to thereby execute various functional applications of the terminal and data processing.
The memory 510 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 510 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 510 may further include memory located remotely from processor 520, which may be connected to devices through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 530 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the device. The output device 540 may include a display device such as a display screen.
EXAMPLE five
An embodiment of the present invention provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform an information creating method, including:
determining the attribute of each target class to be created;
creating a base class based on the common attributes of the target classes to be created;
creating each target class to be created based on the base class to obtain each target class, wherein each target class inherits the base class;
creating target class objects respectively corresponding to at least one target class, and displaying the target class objects;
and when the picture is updated, the display position of the target class object is updated by calling a preset object position updating function.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the information creation method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. With this understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (8)

1. An information creating method, comprising:
determining the attribute of each target class to be created;
creating a base class based on the common attribute of each target class to be created;
creating each target class to be created based on the base class to obtain each target class, wherein each target class inherits the base class;
creating target class objects respectively corresponding to at least one target class, and displaying the target class objects;
updating the display position of the target class object by calling a preset object position updating function when the picture is updated;
after the target class object corresponding to at least one target class is created, the method further includes:
when the target class object is surrounded by a circumscribed rectangular frame, acquiring the side length of the rectangular frame;
and determining the target action point coordinate of the target class object according to the scaling factor, the anchor point coordinate, the current coordinate and the side length of the target class object.
2. The information creating method according to claim 1, wherein the location updating function implements a function of updating the display location of the target class object by:
acquiring the target moving speed of the target class object, and determining the target moving distance when each frame of picture is updated according to the target moving speed;
determining the target moving direction of the target class object according to a preset mark bit;
determining the target coordinates of the target class object when the picture is updated according to the current coordinates of the target class object, the target moving distance and the target moving direction;
and when the picture is updated, moving the target class object from the position of the current coordinate to the position of the target coordinate.
3. The information creating method according to claim 2, further comprising, after the determining the target coordinates of the target object at the time of the screen update:
and when the position of the target coordinate exceeds the boundary position, adjusting the mark position, and updating the target moving direction and the target coordinate according to an adjustment result.
4. The information creating method according to claim 1, wherein the creating of the target class object corresponding to the at least one target class comprises:
the method comprises the steps of obtaining the type of a target class object to be created, and creating the target class object of the type based on the type and a preset object creation interface.
5. The information creating method according to claim 4, wherein the creating a target class object of the type based on the type and a preset object creating interface includes:
acquiring initial coordinates of a target class object to be created;
based on a preset object creating interface, creating the target class object according to the identity identification number, the type and/or the initial coordinate of the target class object to be created; and the identification number is used for determining the attribute of the target class object.
6. An information creating apparatus characterized by comprising:
the attribute determining module is used for determining the attribute of each target class to be created;
the base class creating module is used for creating a base class based on the common attributes of the target classes to be created;
a target class creating module, configured to create each target class to be created based on the base class to obtain each target class, where each target class inherits the base class;
the target class object creating module is used for creating target class objects corresponding to at least one target class respectively and displaying the target class objects;
the display position updating module is used for updating the display position of the target class object by calling a preset object position updating function when the picture is updated;
the rectangular frame side length obtaining module is used for obtaining the side length of the rectangular frame when the target class object is surrounded by the external rectangular frame;
and the target action point coordinate determination module is used for determining the target action point coordinate of the target class object according to the scaling factor, the anchor point coordinate and the current coordinate of the target class object and the side length.
7. A terminal, characterized in that the terminal comprises:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the information creation method of any one of claims 1-5.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the information creating method according to any one of claims 1 to 5.
CN201811495118.0A 2018-12-07 2018-12-07 Information creating method, device, terminal and storage medium Active CN109634567B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811495118.0A CN109634567B (en) 2018-12-07 2018-12-07 Information creating method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811495118.0A CN109634567B (en) 2018-12-07 2018-12-07 Information creating method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN109634567A CN109634567A (en) 2019-04-16
CN109634567B true CN109634567B (en) 2022-02-22

Family

ID=66072007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811495118.0A Active CN109634567B (en) 2018-12-07 2018-12-07 Information creating method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109634567B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102270138A (en) * 2011-08-15 2011-12-07 青岛海信传媒网络技术有限公司 Entity object creation method and entity object creation device
CN102878992A (en) * 2011-07-12 2013-01-16 哈曼国际工业有限公司 Navigation application interface
CN106528641A (en) * 2016-10-13 2017-03-22 许继集团有限公司 Data storage method and device and communication gateway machine
CN107506474A (en) * 2017-09-05 2017-12-22 荷花科技(北京)有限公司 Database operation method and device based on object map
CN107844295A (en) * 2017-11-22 2018-03-27 重庆人人生活家科技发展有限公司 Can raising efficiency database coded system
CN108182055A (en) * 2017-12-25 2018-06-19 中国电力科学研究院有限公司 The information object modeling method and system of a kind of SCD file

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100584448B1 (en) * 2004-01-19 2006-05-26 삼성전자주식회사 Remote download method and system of embedded software using the position of binary image
US8495085B2 (en) * 2010-09-27 2013-07-23 International Business Machines Corporation Supporting efficient partial update of hierarchically structured documents based on record storage
JP2014067289A (en) * 2012-09-26 2014-04-17 Toshiba Corp Information processing apparatus and display control method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102878992A (en) * 2011-07-12 2013-01-16 哈曼国际工业有限公司 Navigation application interface
CN102270138A (en) * 2011-08-15 2011-12-07 青岛海信传媒网络技术有限公司 Entity object creation method and entity object creation device
CN106528641A (en) * 2016-10-13 2017-03-22 许继集团有限公司 Data storage method and device and communication gateway machine
CN107506474A (en) * 2017-09-05 2017-12-22 荷花科技(北京)有限公司 Database operation method and device based on object map
CN107844295A (en) * 2017-11-22 2018-03-27 重庆人人生活家科技发展有限公司 Can raising efficiency database coded system
CN108182055A (en) * 2017-12-25 2018-06-19 中国电力科学研究院有限公司 The information object modeling method and system of a kind of SCD file

Also Published As

Publication number Publication date
CN109634567A (en) 2019-04-16

Similar Documents

Publication Publication Date Title
CN111638793B (en) Display method and device of aircraft, electronic equipment and storage medium
CN109901894B (en) Progress bar image generation method and device and storage medium
CN107890671B (en) Three-dimensional model rendering method and device for WEB side, computer equipment and storage medium
US20150356770A1 (en) Street view map display method and system
CN110288614B (en) Image processing method, device, equipment and storage medium
US11890539B2 (en) Video game with automated screen shots
CN109002452B (en) Map tile updating method and device and computer readable storage medium
US10147240B2 (en) Product image processing method, and apparatus and system thereof
US11918900B2 (en) Scene recognition method and apparatus, terminal, and storage medium
US20230082928A1 (en) Virtual aiming control
CN108230434B (en) Image texture processing method and device, storage medium and electronic device
CN115375815A (en) Shadow rendering method and device, electronic equipment and storage medium
EP3343516A1 (en) Method and device for applying an effect of an augmented or mixed reality application
CN108959311B (en) Social scene configuration method and device
CN110928397A (en) User interface refreshing method and device, storage medium and electronic device
CN109634567B (en) Information creating method, device, terminal and storage medium
CN113313796B (en) Scene generation method, device, computer equipment and storage medium
CN113436300A (en) Method and device for realizing explosion animation, electronic equipment and storage medium
CN117149889A (en) Graph data processing method and related device
CN114942737A (en) Display method, display device, head-mounted device and storage medium
CN113577766A (en) Object processing method and device
CN113490009A (en) Content information embedding method, device, server and storage medium
CN109600657B (en) Object control method, device, terminal and storage medium
CN112947748A (en) Augmented reality AR remote interaction method and system thereof
CN114004953A (en) Method and system for realizing reality enhancement picture and cloud server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant