CN111061576A - Method and system for creating entity object - Google Patents

Method and system for creating entity object Download PDF

Info

Publication number
CN111061576A
CN111061576A CN201911199345.3A CN201911199345A CN111061576A CN 111061576 A CN111061576 A CN 111061576A CN 201911199345 A CN201911199345 A CN 201911199345A CN 111061576 A CN111061576 A CN 111061576A
Authority
CN
China
Prior art keywords
entity
target
creating
creation
affiliated
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.)
Granted
Application number
CN201911199345.3A
Other languages
Chinese (zh)
Other versions
CN111061576B (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.)
Shenzhen Mengma Electric Technology Co ltd
Original Assignee
Shenzhen Mengma Electric Technology 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 Shenzhen Mengma Electric Technology Co ltd filed Critical Shenzhen Mengma Electric Technology Co ltd
Priority to CN201911199345.3A priority Critical patent/CN111061576B/en
Publication of CN111061576A publication Critical patent/CN111061576A/en
Application granted granted Critical
Publication of CN111061576B publication Critical patent/CN111061576B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Abstract

The application is applicable to the technical field of software development, and provides a method and a system for creating an entity object, wherein the method comprises the following steps: receiving an entity object creating request, and determining a target main entity and a target auxiliary entity according to the entity object creating request; creating a target main entity, and returning target main entity information after creation is completed; if the creation of the target main entity is monitored to be completed, a target affiliated entity is created; if the fact that the target affiliated entity is unsuccessfully created is monitored, a message consumption failure state is returned to the message queue, the creation of the main entity and the creation of the affiliated entity are decoupled in the process of creating the entity object, the creation of the main entity and the creation of the affiliated entity are regarded as the fact that the whole entity object is created in business after the creation of the main entity is completed, the affiliated entity is created after the creation of the main entity is completed based on event monitoring of the message queue, feedback is given when the affiliated entity cannot be created, the abnormity can be timely discovered, and the problems that the abnormity cannot be timely processed and the deployment progress is affected are effectively solved.

Description

Method and system for creating entity object
Technical Field
The application belongs to the technical field of software development, and particularly relates to a method and a system for creating an entity object.
Background
Remote Process Call (RPC) is widely applied to many enterprise applications, and with the development of business and the arrival of big data era, a stand-alone service often cannot meet the service requirements of users, and in addition, once the stand-alone service fails, the stand-alone service cannot provide services, and cannot have good fault-tolerant capability. In order to solve the above problems, the services are generally deployed in a distributed manner to provide better fault tolerance capability, and simultaneously, the load of the services is dispersed to each server node to improve the external service capability. However, some functions that are easily implemented in the conventional single-point service become prone to problems after the service is deployed in a distributed manner, and especially, an exception occurs in the entity object creation process of the distributed service, and since the exception in the entity object creation process is invisible, the exception cannot be processed in time, and the deployment process is affected.
Disclosure of Invention
The embodiment of the application provides a method and a system for creating an entity object, which can solve the problem that the exception cannot be processed in time and the deployment process is influenced because the exception in the entity object creating process is invisible at present.
In a first aspect, an embodiment of the present application provides a method for creating an entity object, including:
receiving an entity object creating request, and determining a target main entity and a target auxiliary entity according to the entity object creating request;
creating the target main entity, and returning target main entity information after creation is completed;
if the target main entity is monitored to be established, the target affiliated entity is established;
and if the target affiliated entity is monitored to be failed to create, returning a message consumption failure state to the message queue.
In a possible implementation manner of the first aspect, the method further includes:
and if the target main entity fails to be established, returning an entity establishing failure message.
In a possible implementation manner of the first aspect, after the creating the target master entity and returning the target master entity information after the creating is completed, the method further includes:
and returning a target main entity creation success message to the message queue.
In a possible implementation manner of the first aspect, after the returning a message consumption failure status to the message queue if it is monitored that the target subordinate entity fails to be created, the method further includes:
identifying a create event of a target subordinate entity in the message queue as an unconsumed event.
In a possible implementation manner of the first aspect, the target subordinate entities further include an upstream target subordinate entity and a downstream target subordinate entity, and the creating method of the entity object further includes:
if the upstream target affiliated entity is successfully created, returning a successful creation message of the upstream target affiliated entity to the message queue;
and if the successful message of the creation of the upstream target affiliated entity is monitored, the downstream target affiliated entity is created.
Further, the method also comprises the following steps;
and if the establishment of the downstream target affiliated entity is monitored to be failed, returning a message consumption failure state of the downstream target affiliated entity to the message queue.
Further, still include:
and if the number of times of the target affiliated entity creation failure is larger than a preset threshold value, returning error information.
In a second aspect, an embodiment of the present application provides a system for creating an entity object, including:
the receiving module is used for receiving an entity object creating request and determining a target main entity and a target auxiliary entity according to the entity object creating request;
the first establishing module is used for establishing the target main entity and returning the information of the target main entity after the establishment is finished;
a second creating module, configured to create the target subordinate entity if it is monitored that creation of the target primary entity is completed;
and the monitoring module is used for returning a message consumption failure state to the message queue if the target affiliated entity is monitored to be failed to establish.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method for creating an entity object according to the foregoing first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the entity object creation method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute the method for creating an entity object according to any one of the above first aspects.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Compared with the prior art, the embodiment of the application has the advantages that: the establishment of the main entity and the establishment of the auxiliary entities are decoupled in the process of establishing the entity object, the main entity information is returned to a user after the main entity is established and the whole entity object is established in service, the auxiliary entity is established after the main entity is established, feedback is given when the auxiliary entity cannot be established, the abnormity can be found in time, and the problems that the abnormity cannot be processed in time and the deployment progress is influenced are effectively solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a method for creating an entity object according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for creating an entity object according to another embodiment of the present application;
fig. 3 is a schematic structural diagram of an application scenario to which a method for creating an entity object according to an embodiment of the present application is applied;
FIG. 4 is a schematic structural diagram of a system for creating entity objects according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The entity object creation method provided by the embodiment of the application can be applied to a mobile phone, a tablet personal computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), and other terminal devices, wherein the terminal device is a node in a distributed system or a management center of the distributed system, and the deployment of the distributed service is realized through a development environment of the terminal device, specifically including the entity object creation of the distributed service.
Referring to fig. 1, fig. 1 shows a flowchart of an implementation of a method for creating an entity object according to an embodiment of the present application, and as shown in fig. 2, the method for creating an entity object includes the following steps, which are detailed as follows:
s101: receiving an entity object creating request, and determining a target main entity and a target subordinate entity according to the entity object creating request.
Specifically, a system usually has a plurality of objects, and these objects are abstracted to obtain some entity objects, where an entity object refers to a data object that can be stored permanently, and usually can be represented by a data table or a main table of a relational database and several sub-tables connected thereto, where the data tables used for representing the association are subordinate entities, and the abstracted entity is a main entity, such as a user, a device, and so on.
Specifically, the end user may initiate an entity object creation request according to a requirement, where the entity object includes an entity object to be created, and after receiving the entity object creation request, the background service may analyze the entity object to be created and determine a target main entity and a target subordinate entity based on the entity object. It should be noted that the target affiliated entity may be one or more, and is not limited herein. And the plurality of target affiliated entities can be affiliated entities which are not related and are only affiliated to the main entity, and also can be affiliated entities which are partially affiliated to some affiliated entities, namely two affiliated entities belong to an upstream-downstream relationship, and the downstream affiliated entities can be continuously created only after the upstream affiliated entities are created.
S102: and creating the target main entity, and returning the target main entity information after the creation is completed.
Specifically, after determining the target host entity, the background service may automatically create the target host entity. It should be noted that the creating target master entity may create the target master entity using new operation based on java programming, or may be created in other manners, for example, creating the target master entity based on java's reflection mechanism, invoking clone, jvm, creating a new object master entity, and the like, which is not limited herein.
Illustratively, a User entity class is created in the entity class package, User information is added into the User entity class, and the target main entity is quickly created by using a get method and a set method of the POJO standard.
Specifically, since the creation of the service is necessarily the creation of one main entity correspondingly, and as long as the creation of the main entity is completed, the creation of other subordinate entities will not affect the implementation of the overall process even if there is a certain procedural delay, so that after the background service completes the creation of the target main entity, it is regarded as that the creation of the whole entity object is completed in terms of business, and then the main entity information of the target main entity that has been completed is returned to the user. It should be noted that the target main entity information refers to related information of the target main entity, and if the target main entity is a User (User), the target main entity information includes information such as a User name (UserName) and a User password (password); assuming that the target master entity is a device, the target master entity information includes information such as a device name and a device address.
S103: and if the creation of the target main entity is monitored to be completed, the target affiliated entity is created.
Specifically, the target subordinate entity registers monitoring of a target main entity creation event message in a message queue, and once a message of completing creation of the target main entity is monitored, the background service continues to create the target subordinate entity.
In particular, to avoid repeated consumption of messages, the listening events of the subordinate entities are implemented using a unified consumer group.
Specifically, when all target subordinate entities are created, the process of creating the whole entity object is ended.
S104: and if the target affiliated entity is monitored to be failed to create, returning a message consumption failure state to the message queue.
Specifically, the creation event created by the entity object is managed through the message queue, the monitoring of the target affiliated entity creation event message is registered in the message queue, and once the target affiliated entity creation failure is monitored, a message consumption failure state is returned to the message queue, so that the condition that the creation event of the target affiliated entity is unsuccessful is indicated, and the exception is fed back in time.
In an embodiment, the method for creating an entity object further includes the following steps:
and if the target main entity fails to be established, returning an entity establishing failure message.
Specifically, if the target main entity fails to be created, the entire process of creating the entity object is ended, and an entity creation failure message is returned to the user, so as to prompt the user that the creation of the entity object fails.
In an embodiment, after S102, the method for creating the entity object further includes the following steps:
and returning a target main entity creation success message to the message queue.
Specifically, after the target master entity is successfully created, the background service returns a message indicating that the creation of the target master entity is successful to the message queue, the message queue marks the creation event of the target master entity as consumed, the target master entity is not repeatedly created, and monitoring whether the creation of the target master entity is successful is monitoring whether the target master entity returns a message indicating that the creation of the target master entity is successful, and if the creation of the target master entity is failed, the message is not returned.
In an embodiment, after S104, the method for creating the entity object further includes the following steps:
identifying a create event of a target subordinate entity in the message queue as an unconsumed event.
Specifically, when the target affiliated entity is failed to create, the background service returns a message consumption failure status to the message queue, and when the message queue receives the message consumption failure status, the message queue identifies the creation event of the target affiliated entity as an unconsumed event, and based on the retry function of the message queue, the message queue continues to initiate the creation event of the target affiliated entity to the background service for the unconsumed event, so that the background service continues to create the target affiliated entity.
In one embodiment, the method for creating the entity object includes the following steps:
and if the number of times of the target affiliated entity creation failure is larger than a preset threshold value, returning error information.
Specifically, the message queue may count the number of times of the creation failure of the target affiliated entity, and monitor whether the number of times is greater than a preset threshold, and if the number of times is greater than the preset threshold, it indicates that the creation of the target affiliated entity does have a problem that cannot be overcome by the background service, and at this time, an error message is returned to the user, which is convenient for manual intervention processing, and improves processing efficiency. It should be noted that the preset threshold may be set according to actual requirements, and is not limited herein.
In practical application, the message queue is realized based on the middleware, and because most of distributed systems can use the middleware, the original service logic of the whole system is not required to be modified, and the message queue of the creation items created by the entity object is only required to be added on the basis of the original middleware, so that the creation process of the entity object can be monitored, the abnormity can be conveniently found in time, and the modification cost is low.
In the method for creating an entity object provided by this embodiment, the creation of the main entity and the creation of the subordinate entity are decoupled in the process of creating the entity object, the creation of the main entity is regarded as the completion of the creation of the whole entity object in terms of service after the creation of the main entity is completed, the information of the main entity is returned to the user, and based on event monitoring of the message queue, the subordinate entity is created after the creation of the main entity is completed, and feedback is given when the subordinate entity cannot be created, so that an exception can be found in time, and the problems that the exception cannot be processed in time and the deployment progress is affected are effectively solved.
Referring to fig. 2, fig. 2 is a flowchart illustrating a specific implementation of a method for creating an entity object according to another embodiment of the present application. The difference between the present embodiment and the previous embodiment is that the target affiliated entity further includes an upstream target affiliated entity and a downstream target affiliated entity, and the method for creating an entity object provided in the present embodiment further includes the following steps, which are detailed as follows:
s201: and if the upstream target affiliated entity is successfully created, returning a successful creation message of the upstream target affiliated entity to the message queue.
S202: and if the successful message of the creation of the upstream target affiliated entity is monitored, the downstream target affiliated entity is created.
Specifically, for the creation of the upstream target subordinate entity and the downstream target subordinate entity, the upstream target subordinate entity needs to be created first before the downstream target subordinate entity is created, so that the monitoring of the creation event of the upstream target subordinate entity can be added to the message queue, and is used for monitoring whether the upstream target subordinate entity is successfully created or not, and once the monitoring that the upstream target subordinate entity is successfully created is detected, the downstream target subordinate entity continues to be created.
Referring to fig. 3, fig. 3 is an architecture diagram of an application scenario to which the method for creating an entity object according to the embodiment of the present application is applied, as shown in fig. 3, in this embodiment, a user terminal sends an entity object creation request to a background service, and the background service receives the entity object creation request and determines a target main entity and a target subordinate entity according to the entity object creation request, where the target subordinate entity includes a first target subordinate entity 1, a second target subordinate entity 2, and a third target subordinate entity 11. The third target affiliated entity 11 is an affiliated entity of the first target affiliated entity 1, that is, the first target affiliated entity 1 is an upstream target affiliated entity, and the third target affiliated entity is a downstream target affiliated entity. And the background service starts to create the target main entity after receiving the entity object creation request, sends a target main entity creation success message to the message queue after the creation is completed, and returns the target main entity information to the user terminal. And after receiving the target main entity creation success message, the message queue sends a creation event of the first target affiliated entity 1 and a creation event of the second target affiliated entity 2 to a background service, so that the background service respectively creates the first target affiliated entity 1 and the second target affiliated entity 2, and returns an upstream target affiliated entity creation success message to the message queue after the first target affiliated entity is created. When the message queue receives the upstream target-attached-entity creation success message, it sends a creation event of the third target-attached entity 11, so that the background service creates the third target-attached entity 11. When the creation of the first target subordinate entity 1, the second target subordinate entity 2 and the third target subordinate entity 11 is completed, the creation process is ended.
In an embodiment, the method for creating an entity object further includes the following steps:
and if the establishment of the downstream target affiliated entity is monitored to be failed, returning a message consumption failure state of the downstream target affiliated entity to the message queue.
Specifically, the creation event created by the entity object is managed through the message queue, the monitoring of the downstream target affiliated entity creation event message is registered in the message queue, and once the monitoring of the downstream target affiliated entity creation failure is detected, a message consumption failure state is returned to the message queue, so that the condition that the creation event of the downstream target affiliated entity is not successful is indicated, and the exception is fed back in time.
According to the method for creating the entity object, the creation of the main entity and the creation of the auxiliary entity are decoupled in the process of creating the entity object, the main entity is regarded as the completion of the creation of the whole entity object in business after the creation of the main entity is completed, the information of the main entity is returned to a user, and based on event monitoring of the message queue, the auxiliary entity is created after the creation of the main entity is completed, feedback is given when the auxiliary entity cannot be created, so that the abnormity can be found in time, and the problems that the abnormity cannot be processed in time and the deployment progress is influenced are effectively solved.
Corresponding to the method for creating an entity object described in the foregoing embodiment, fig. 4 shows a block diagram of a system for creating an entity object provided in the embodiment of the present application, and for convenience of explanation, only a part related to the embodiment of the present application is shown.
Referring to fig. 4, the entity object creation system includes a receiving module 11, a first creation module 12, a second creation module 13, and a listening module 14.
The receiving module 11 is configured to receive an entity object creation request, and determine a target main entity and a target subordinate entity according to the entity object creation request;
the first creating module 12 is configured to create the target master entity, and return information of the target master entity after creation is completed;
the second creating module 13 is configured to create the target subordinate entity if it is monitored that the creation of the target primary entity is completed;
the monitoring module 14 is configured to return a message consumption failure status to the message queue if it is monitored that the target affiliated entity has failed to create.
Optionally, the system for creating an entity object further includes a first returning module.
The first returning module is used for returning an entity creation failure message if the target main entity is failed to create.
Optionally, the system for creating an entity object further includes a queue module.
The queue module is used for returning a successful message created by the target main entity to the message queue.
Optionally, the system for creating an entity object further includes an identification module.
The identification module is configured to identify a create event of a target subordinate entity in the message queue as an unconsumed event.
Optionally, the target subordinate entity further includes an upstream target subordinate entity and a downstream target subordinate entity, and the entity object creation system further includes a second returning module and a downstream creation module.
The second returning module is configured to return a message indicating that the upstream target attachment entity is successfully created to the message queue if the upstream target attachment entity is successfully created;
the downstream creation module is configured to create a downstream target subordinate entity if a successful creation message of the upstream target subordinate entity is monitored.
Optionally, the system for creating an entity object further includes a third returning module.
The third returning module is configured to return a message consumption failure status of the downstream target affiliated entity to the message queue if it is monitored that the downstream target affiliated entity is unsuccessfully created.
Optionally, the system for creating an entity object further includes an error prompt module.
And the error prompt module is used for returning error information if the number of times of the failure of the target affiliated entity creation is larger than a preset threshold value.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Therefore, the system for creating an entity object provided in this embodiment can also decouple the creation of the main entity and the creation of the subordinate entity in the process of creating the entity object, and after the creation of the main entity is completed, it is regarded as that the creation of the whole entity object is completed in terms of service, the information of the main entity is returned to the user, and based on event monitoring of the message queue, the subordinate entity is created after the creation of the main entity is completed, and feedback is given when the subordinate entity cannot be created, so that an exception can be found in time, and the problem that the exception cannot be processed in time and the deployment progress is affected is effectively solved.
Fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 5, the terminal device 5 of this embodiment includes: at least one processor 50 (only one shown in fig. 5), a memory 51, and a computer program 52 stored in the memory 51 and executable on the at least one processor 50, wherein the processor 50 executes the computer program 52 to implement the steps in any of the above-mentioned embodiments of the entity object creation method.
The terminal device 5 may be a desktop computer, a notebook, a palm computer, a cloud terminal device, or other computing devices. The terminal device may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 5 is only an example of the terminal device 5, and does not constitute a limitation to the terminal device 5, and may include more or less components than those shown, or combine some components, or different components, such as an input-output device, a network access device, and the like.
The Processor 50 may be a Central Processing Unit (CPU), and the Processor 50 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may in some embodiments be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing an operating system, an application program, a Boot Loader (Boot Loader), data, and other programs, such as program codes of the computer programs. The memory 51 may also be used to temporarily store data that has been output or is to be output.
Illustratively, the computer program 52 may be divided into one or more units, which are stored in the memory 51 and executed by the processor 50 to accomplish the present application. The one or more units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 52 in the terminal device 5. For example, the computer program 52 may be divided into a receiving module, a first creating module, a second creating module, and a monitoring module, and the specific functions of each unit are as follows:
the receiving module is used for receiving an entity object creating request and determining a target main entity and a target auxiliary entity according to the entity object creating request;
the first establishing module is used for establishing the target main entity and returning the information of the target main entity after the establishment is finished;
a second creating module, configured to create the target subordinate entity if it is monitored that creation of the target primary entity is completed;
and the monitoring module is used for returning a message consumption failure state to the message queue if the target affiliated entity is monitored to be failed to establish.
An embodiment of the present application further provides a network device, where the network device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps of any of the various method embodiments described above when executing the computer program.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), random-access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for creating an entity object, comprising:
receiving an entity object creating request, and determining a target main entity and a target auxiliary entity according to the entity object creating request;
creating the target main entity, and returning target main entity information after creation is completed;
if the target main entity is monitored to be established, the target affiliated entity is established;
and if the target affiliated entity is monitored to be failed to create, returning a message consumption failure state to the message queue.
2. The method of creating a physical object of claim 1, further comprising:
and if the target main entity fails to be established, returning an entity establishing failure message.
3. The method for creating an entity object according to claim 1, wherein after creating the target master entity and returning target master entity information after creation is completed, further comprising:
and returning a target main entity creation success message to the message queue.
4. The method for creating an entity object according to claim 1, wherein after the step of returning a message consumption failure status to the message queue if the monitoring of the target subordinate entity creation failure is performed, further comprising:
identifying a create event of a target subordinate entity in the message queue as an unconsumed event.
5. The method of creating an entity object of claim 1, wherein the target subordinate entities further comprise an upstream target subordinate entity and a downstream target subordinate entity, the method of creating an entity object further comprising:
if the upstream target affiliated entity is successfully created, returning a successful creation message of the upstream target affiliated entity to the message queue;
and if the successful message of the creation of the upstream target affiliated entity is monitored, the downstream target affiliated entity is created.
6. The method of creating a physical object of claim 5 further comprising:
and if the establishment of the downstream target affiliated entity is monitored to be failed, returning a message consumption failure state of the downstream target affiliated entity to the message queue.
7. The method for creating the entity object according to any one of claims 1 to 6, further comprising:
and if the number of times of the target affiliated entity creation failure is larger than a preset threshold value, returning error information.
8. A system for creating a physical object, comprising:
the receiving module is used for receiving an entity object creating request and determining a target main entity and a target auxiliary entity according to the entity object creating request;
the first establishing module is used for establishing the target main entity and returning the information of the target main entity after the establishment is finished;
a second creating module, configured to create the target subordinate entity if it is monitored that creation of the target primary entity is completed;
and the monitoring module is used for returning a message consumption failure state to the message queue if the target affiliated entity is monitored to be failed to establish.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for creating a physical object according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method for creating a physical object according to any one of claims 1 to 7.
CN201911199345.3A 2019-11-29 2019-11-29 Method and system for creating entity object Active CN111061576B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911199345.3A CN111061576B (en) 2019-11-29 2019-11-29 Method and system for creating entity object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911199345.3A CN111061576B (en) 2019-11-29 2019-11-29 Method and system for creating entity object

Publications (2)

Publication Number Publication Date
CN111061576A true CN111061576A (en) 2020-04-24
CN111061576B CN111061576B (en) 2024-04-09

Family

ID=70299626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911199345.3A Active CN111061576B (en) 2019-11-29 2019-11-29 Method and system for creating entity object

Country Status (1)

Country Link
CN (1) CN111061576B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114780654A (en) * 2022-05-27 2022-07-22 河北省科学技术情报研究院(河北省科技创新战略研究院) Processing method for modular construction of multi-source main and auxiliary entity structure

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914283A (en) * 2012-12-30 2014-07-09 杭州新世纪电子科技有限公司 Dynamic business object construction method and system
CN107515793A (en) * 2017-08-22 2017-12-26 四川长虹电器股份有限公司 A kind of module communication means for supporting message mechanism
CN108509524A (en) * 2018-03-12 2018-09-07 上海哔哩哔哩科技有限公司 Method, server and the system of data processing of data processing
CN110417913A (en) * 2019-08-09 2019-11-05 浪潮云信息技术有限公司 A kind of asynchronous creation method of Cloud Server based on Rabbit MQ

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914283A (en) * 2012-12-30 2014-07-09 杭州新世纪电子科技有限公司 Dynamic business object construction method and system
CN107515793A (en) * 2017-08-22 2017-12-26 四川长虹电器股份有限公司 A kind of module communication means for supporting message mechanism
CN108509524A (en) * 2018-03-12 2018-09-07 上海哔哩哔哩科技有限公司 Method, server and the system of data processing of data processing
CN110417913A (en) * 2019-08-09 2019-11-05 浪潮云信息技术有限公司 A kind of asynchronous creation method of Cloud Server based on Rabbit MQ

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114780654A (en) * 2022-05-27 2022-07-22 河北省科学技术情报研究院(河北省科技创新战略研究院) Processing method for modular construction of multi-source main and auxiliary entity structure
CN114780654B (en) * 2022-05-27 2022-11-15 河北省科学技术情报研究院(河北省科技创新战略研究院) Processing method for modular construction of multi-source main and auxiliary entity structure

Also Published As

Publication number Publication date
CN111061576B (en) 2024-04-09

Similar Documents

Publication Publication Date Title
US11343103B2 (en) Sending cross-chain authenticatable messages
CN110888893A (en) Order processing method based on micro-service e-commerce system
CN111026367B (en) Micro-service arrangement method, device, terminal equipment and storage medium
CN112817995B (en) Data processing method and device, electronic equipment and storage medium
CN110490416B (en) Task management method and terminal equipment
CN110673933A (en) ZooKeeper-based distributed asynchronous queue implementation method, device, equipment and medium
CN116302708A (en) Data backup method, device, equipment and storage medium based on load balancing
CN111061576A (en) Method and system for creating entity object
CN106933932B (en) Data processing method and device and application server
CN111324645B (en) Block chain data processing method and device
CN107632893B (en) Message queue processing method and device
CN113722022A (en) State management system and method
CN112818336A (en) Data access method, data access device and computer readable storage medium
CN112737838A (en) Cloud resource application and cloud data access method and device and electronic equipment
CN111049938A (en) Message notification method and device, electronic equipment and readable storage medium
CN116301758B (en) Rule editing method, device, equipment and medium based on event time points
CN116756460B (en) Combined data acquisition method and device and related equipment
US9043814B1 (en) Dispatcher framework to provide inter-application communication
CN113342540B (en) Terminal user fee-paying starting method, system, computer equipment and storage medium
CN115098281A (en) Block chain cross-chain task processing method, device, server and medium
CN114238352A (en) Micro-service processing method and related device
CN114219498A (en) Transaction task processing method and device and terminal equipment
CN113806069A (en) Nuclear power station system interaction method and device, peripheral system and storage medium
CN111639936A (en) Transaction information acquisition method and device, electronic equipment and readable storage medium
CN114625488A (en) Distributed transaction processing method and device, electronic equipment and computer storage medium

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