Collaborative development method, program product, electronic equipment and storage medium
By dynamically allocating development permissions in the application construction page, users are allowed to seize development permissions, solving the problems of data loss and inefficiency caused by simultaneous modification of multiple users, and achieving more efficient collaborative development.
Patent Information
- Application Number
- CN202411961282.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-25
AI Technical Summary
During the collaborative development of applications, multiple users modify the same project at the same time, resulting in data loss and inefficient collaboration.
By dynamically allocating development permissions in the construction page, users are allowed to seize development permissions. When the second user preempts the permissions, the first user's development permissions are automatically closed and the preempted prompt message is sent to the first user.
Reduce conflicts caused by concurrent editing, avoid the overwrite of work results by other users, and improve the efficiency of collaborative development and data security.
Smart Images

Figure CN119883210A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a collaborative development method, a program product, an electronic device, and a storage medium. Background Art
[0002] The application building page usually refers to one or more pages or interfaces used to configure, create or initialize the basic structure and functions of the application during the application development process. In the application development process, multiple people are usually required to collaborate. In the current collaborative development scheme, different users may modify the same project iteration at the same time, which will cause the work results of one user to be overwritten by the modifications of other users, leading to data loss and low collaboration efficiency. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a collaborative development method, program product, electronic device and storage medium, which are used to improve the problem that different users make modifications to the same project iteration at the same time, and the work results are overwritten by the modifications of other users, thereby causing data loss and low collaboration efficiency.
[0004] In a first aspect, an embodiment of the present application provides a collaborative development method, comprising: after a first user enters a building page and obtains development authority, receiving a page entry request sent by a second user; the building page is used for application development; development authority means that the user entering the building page has the authority to perform development operations on the building page; sending a preemption prompt message to the second user; the preemption prompt message is used for the second user to determine whether to preempt the development authority of the building page; if the second user determines to preempt the development authority of the building page, the development authority is opened to the second user, the development authority of the first user is closed, and a preemption prompt message is sent to the first user; the preemption prompt message includes the user information of the second user.
[0005] In the above implementation process, the development rights of the same page can be dynamically allocated to different users. When the second user determines to seize the rights, the development rights of the first user are automatically closed. In this way, only one user is performing development operations at the same time, thereby reducing conflicts caused by concurrent editing and reducing the situation where the work results are overwritten by other users' modifications. Compared with collaborative development using algorithms, the method of dynamically allocating development rights in this application is more efficient and economical.
[0006] Furthermore, by allowing users to preempt development permissions, workloads can be distributed more flexibly, especially in emergencies or when a task requires specific skills. Permissions can be quickly transferred to the right developer, improving the problem of data loss and inefficient collaboration caused by different users operating the same build page at the same time. The preemption prompt message contains the user information of the second user, which increases transparency and lets the first user know who preempted the development permissions, which helps communication and coordination among team members. For the second user, they can actively request to enter the build page instead of passively waiting for the first user to complete the work, which improves work efficiency.
[0007] Optionally, in an embodiment of the present application, after the first user enters the building page and obtains development authority, the method also includes: obtaining a user identifier of the first user; using the user identifier of the first user, calling a function to generate a delayed task; in the process of executing the delayed task, the content operated by the first user in the building page is automatically saved at preset time intervals until a termination condition is met; the termination condition includes that the development authority of the first user is interrupted, or the first user exits the building page.
[0008] In the above implementation process, the automatic saving mechanism through user identification can ensure that the user's work progress during the development process is protected, while improving development efficiency and data security. It reduces the risk of data loss caused by unexpected situations such as power failure and network interruption.
[0009] Optionally, in an embodiment of the present application, during the execution of the delayed task, the content of the first user's operation in the build page is automatically saved at preset time intervals until the termination condition is met, including: during the execution of the delayed task, querying the current user ID who currently obtains development permissions; determining whether the user ID of the first user is consistent with the current user ID, if the user ID of the first user is inconsistent with the current user ID, the termination condition is met.
[0010] In the above implementation process, the automatic saving operation for the first user is automatically stopped when the first user no longer has the development authority, thereby improving resource utilization and reducing unnecessary data saving operations. In addition, each user generates a corresponding delayed task to automatically save the content operated by the user in the build page, while taking into account the development authority management and improving data security.
[0011] Optionally, in an embodiment of the present application, the preemption prompt information also includes a copy address; the copy address points to the development content corresponding to the build page before the development authority of the first user is interrupted.
[0012] In the above implementation process, in the event that the development permission is preempted, the first user can be notified in time and can access their previous working copy, thereby reducing work interruption and data loss caused by permission changes.
[0013] Optionally, in an embodiment of the present application, the method further includes: querying in real time the current user identifier of the user who currently obtains the development permission by calling a query interface, wherein the current user identifier is used to determine the user who currently obtains the development permission.
[0014] In the above implementation process, real-time query of the current user ID helps to ensure data consistency, especially in a multi-user collaborative environment, to avoid data conflicts and overwriting. By real-time monitoring of the permission status, the user who currently obtains development permissions can be known at any time, which increases transparency and improves the efficiency of collaborative development.
[0015] Optionally, in an embodiment of the present application, during the process of the first user obtaining development permissions, the current user identifier is the user identifier of the first user; sending a preemption prompt message to the second user includes: sending a preemption prompt message to the second user based on the user identifier of the first user, so that the second user interrupts the development permissions of the first user when preempting the development permissions of the building page.
[0016] In the above implementation process, by clearly providing the second user with the user information currently being developed, the second user can decide whether to seize the authority based on the information of the first user, thereby making a faster and more accurate decision on whether to seize the authority, reducing communication costs and decision-making time. In this way, development authority can be reserved for users with more important or more urgent work, so that resources can be used by users who need them most.
[0017] Optionally, in the embodiment of the present application, after closing the development permission of the first user, the method further includes: opening the readable permission of the build page to the first user.
[0018] In the above implementation process, the development permission of the first user is closed in time and the read-only permission is opened, thereby improving the security of the data. Even after losing the development permission, the first user can still view the construction page, thereby improving the information sharing capacity and collaboration efficiency.
[0019] In the second aspect, the embodiment of the present application also provides a collaborative development device, including: a request module, which is used to receive a page entry request sent by a second user after the first user enters the building page and obtains development authority; the building page is used for application development; development authority means that the user entering the building page has the authority to perform development operations on the building page; a prompt module, which is used to send a preemption prompt message to the second user; the preemption prompt message is used for the second user to determine whether to preempt the development authority of the building page; the preemption module is used to open the development authority to the second user, close the development authority of the first user, and send a preemption prompt message to the first user if the second user determines to preempt the development authority of the building page; the preemption prompt message includes the user information of the second user.
[0020] In a third aspect, an embodiment of the present application further provides a computer program product, including computer program instructions, which, when executed by a processor, execute the method provided by the first aspect or any one of the implementations of the first aspect.
[0021] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising: a processor and a memory, the memory storing computer program instructions, and the computer program instructions, when executed by the processor, execute the method provided by the first aspect or any one of the implementations of the first aspect.
[0022] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method provided by the first aspect or any one of the implementations of the first aspect is executed.
[0023] A collaborative development method, program product, electronic device and storage medium provided by the present application can be used to dynamically allocate development permissions for the same build page for different users. When the second user determines to seize the permission, the development permission of the first user is automatically closed, so that only one user is performing development operations at the same time, thereby reducing conflicts caused by concurrent editing and reducing the situation where the work results are covered by modifications of other users. By allowing users to seize development permissions, workloads can be allocated more flexibly, especially in emergencies or when a task requires specific skills, permissions can be quickly transferred to appropriate developers, and the problem of data loss and low collaboration efficiency caused by different users operating the same build page at the same time can be improved. The user information of the second user is included in the preempted prompt information, which increases transparency, allows the first user to know who has seized the development permission, and helps communication and coordination between team members. For the second user, they can actively request to enter the build page instead of passively waiting for the first user to complete the work, which improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 A flowchart of a collaborative development method provided in an embodiment of the present application;
[0026] Figure 2 A schematic diagram of the structure of a collaborative development device provided in an embodiment of the present application;
[0027] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0030] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0031] When facing the scenario of collaborative development, in the current collaborative development solution, different users may modify the same project iteration at the same time, which will cause the work results of one user to be overwritten by the modifications of other users, thereby causing data loss and low collaboration efficiency.
[0032] There are currently some algorithms such as OT algorithms (Operational Transformation) and CRDT algorithms (Conflict-free Replicated Data Type) that can be used to solve the problems of data synchronization and conflict in multi-person real-time collaboration. The core of the OT algorithm is to transform the editing operations of different users into forms that are compatible with each other. This means that the algorithm needs to understand and handle the dependencies between various operations, which is very complex logically. For example, if two users edit different parts of a document at the same time, the algorithm needs to ensure that these edits can be merged correctly without overwriting each other or producing inconsistent results. The CRDT algorithm solves the conflict problem by ensuring that the operations of the data type are conflict-free. This requires the algorithm to be able to handle various possible operation sequences and ensure the consistency of the final results regardless of how the operations are propagated and applied. The CRDT algorithm needs to maintain additional state information to ensure the idempotence and conflict-free nature of the operations. Therefore, the development, deployment and maintenance costs of the above algorithms are high, and usually require complex server-side support.
[0033] To solve the above problems, the embodiments of the present application provide a collaborative development method, a program product, an electronic device and a storage medium. By allowing users to preempt development permissions, workloads can be distributed more flexibly, especially in emergencies or when a task requires specific skills, permissions can be quickly transferred to the right developer. When the second user determines to preempt permissions, the development permissions of the first user are automatically interrupted, so that only one user is performing development operations at the same time, thereby reducing conflicts caused by concurrent editing. Interrupting the development permissions of the first user is to close the development permissions of the first user. By sending a preemption prompt message, the second user can clearly know that the build page is currently occupied by the first user, and has the opportunity to decide whether to preempt development permissions. This mechanism helps to avoid multiple developers inadvertently modifying the same page at the same time, thereby reducing conflicts.
[0034] See also Figure 1 A flowchart of a collaborative development method provided by an embodiment of the present application is shown. The collaborative development method provided by an embodiment of the present application can be applied to an electronic device, which may include a physical device such as a server, a PC, a tablet computer, or a smart phone, or a virtual device such as a virtual machine or a container. The electronic device may be a single device, or a combination of multiple devices or a cluster of a large number of devices. The collaborative development method may include:
[0035] Step S110: After the first user enters the build page and obtains development authority, a page entry request sent by the second user is received; the build page is used for application development; development authority means that the user entering the build page has the authority to perform development operations on the build page.
[0036] Step S120: Send a preemption prompt message to the second user; the preemption prompt message is used for the second user to determine whether to preempt the development authority of the building page.
[0037] Step S130: If the second user determines to seize the development permission of the building page, the development permission is opened to the second user, the development permission of the first user is closed, and a preemption prompt message is sent to the first user; the preemption prompt message includes the user information of the second user.
[0038] In step S110, the build page generally refers to a page or interface used to configure, create or initialize the basic structure and functions of an application during the application development process, wherein the build page may be a visual build page. For example, it may include a control panel, a component configuration page, and the like, and developers may configure different modules or components according to the needs of the application. The way to enter the build page is, for example, to click an entry button of the build page of the application center or to directly enter a URL link of the build page.
[0039] When the first user enters the build page, the permissions that can be obtained include development permissions and / or read permissions, where read permissions refer to the user's ability to view or consult the content of the build page. Users with read permissions can usually browse the content of the page, but cannot edit or modify it. Development permissions refer to the user who enters the build page has the permission to perform development operations on the build page, for example, the user can edit, modify, create or delete the page. Users with development permissions usually have a higher level of access rights and can perform changes to the page.
[0040] The first user enters the build page. If there is no user with development permission on the build page at this time, for example, no other user enters the build page, or the user who enters the build page only uses the read permission and no one uses the development permission, then the first user can choose to obtain the development permission and perform development operations on the build page.
[0041] After the first user obtains development permissions, the second user can send a page entry request to the system, where the page entry request is used to enter the build page. For example, the second user can initiate a page entry request through the entry button of the build page or by directly entering the URL link of the build page.
[0042] In step S120, a page entry request sent by the second user is received. Since the first user has obtained the development permission at this time, a preemption prompt message can be sent to the second user. The preemption prompt message is used for the second user to determine whether to preempt the development permission of the built page. For example, the preemption prompt message prompts the second user with the information of the first user who is currently developing, and provides options representing "preemption" or "no preemption" for the second user to choose. The second user can choose to "preempt" or "not preempt" the development permission according to the degree of urgency. If the second user chooses to preempt the development permission, he only needs to click the option representing "preemption".
[0043] As an implementation method, the implementation method of step S120 can be: after the first user enters the building page and obtains the development permission, if the second user enters the building page, the page entry request sent by the second user is received, the current page will request the server interface, and if it is determined that the development permission of the current page does not belong to the second user, a preemption prompt message is sent to the second user. That is, after each user enters the building page, it will determine whether the development permission of the current page belongs to the user, and if it does not belong to the user, the subsequent preemption procedure is executed.
[0044] In step S130, if the second user clicks the option representing "preempt", that is, determines to preempt the development permission of the building page, the development permission is opened to the second user, the development permission of the first user is closed, and a preemption prompt message is sent to the first user.
[0045] Step S130 can be implemented through a weak lock mechanism, which is a mechanism that allows multiple users to access and edit the same resource, but can be preempted when a conflict occurs. For example, when the first user enters the build page and obtains development permissions, the system will mark the page as "occupied", but this occupation is based on a weak lock mechanism, which means that it does not exclude the access rights of other users.
[0046] As an implementation method, in order to prevent multiple people from having development permissions at the same time, the development permissions of the first user can be closed first or opened to the second user at the same time. Before closing the development permissions of the first user, a pre-prompt can be sent to the first user. After receiving the pre-prompt, the first user can choose to continue editing the current finishing work or choose to save the work and exit. If the first user chooses to continue editing, the system can set a countdown or prompt to inform the first user that they need to respond within a certain period of time. Of course, the development permissions of the first user can also be directly closed. These permission handover methods can be set according to actual needs.
[0047] After closing the development authority of the first user, a preempted prompt message is sent to the first user; the preempted prompt message includes the user information of the second user. The user information may be identity information such as the user ID, account information or name of the second user. The preempted prompt message may inform the first user that the second user has preempted the development authority. The preempted prompt message may be a pop-up window, application message, application notification or warning, reminding the first user that another user wants to take over the building page. After step S130, a confirmation message may also be sent to the second user, informing the second user that the second user has the development authority and can start the development operation.
[0048] In the above implementation process, the development rights of the same page can be dynamically allocated to different users. When the second user determines to seize the rights, the development rights of the first user are automatically closed. In this way, only one user is performing development operations at the same time, thereby reducing conflicts caused by concurrent editing and reducing the situation where the work results are overwritten by other users' modifications. Compared with collaborative development using algorithms, the method of dynamically allocating development rights in this application is more efficient and economical.
[0049] Furthermore, by allowing users to preempt development permissions, workloads can be distributed more flexibly, especially in emergencies or when a task requires specific skills. Permissions can be quickly transferred to the right developer, improving the problem of data loss and inefficient collaboration caused by different users operating the same build page at the same time. The preemption prompt message contains the user information of the second user, which increases transparency and lets the first user know who preempted the development permissions, which helps communication and coordination among team members. For the second user, they can actively request to enter the build page instead of passively waiting for the first user to complete the work, which improves work efficiency.
[0050] It is understandable that the above-mentioned first user and second user are only used to distinguish between staff members who need to use development permissions in collaborative development, and do not refer to specific users. After the second user seizes the development permissions, other users (such as the first user or the third user) can seize the development permissions again through the above method. For example, the first user or the third user sends a page entry request, and the system determines that the user who currently obtains the development permissions is the second user by calling the queryController interface. Based on the identification information of the second user, a preemption prompt message is sent to the first user or the third user, and the preemption prompt message provides an option of whether to continue preempting.
[0051] Optionally, in the embodiment of the present application, after the first user enters the building page and obtains the development permission, the method further includes:
[0052] Get the user ID of the first user. When the first user enters the build page, the system will get the user ID of the first user, such as the user ID or user name, which will be used for subsequent automatic save tasks.
[0053] Using the user ID of the first user, call a function to generate a delayed task. By calling a specific function, the function is responsible for creating a delayed task. This task will be executed regularly without the need for the user to manually trigger it. When calling this function, the user ID of the first user is passed as a parameter to ensure that the delayed task for automatic saving is associated with the first user and the build page.
[0054] During the execution of the delayed task, the content operated by the first user in the build page is automatically saved at preset intervals until a termination condition is met; the termination condition includes that the development authority of the first user is interrupted, or the first user exits the build page.
[0055] The preset time interval is, for example, every 1 minute or every 5 minutes. This preset time interval determines the frequency of automatic saving and can be set according to actual needs. During the execution of the delayed task, the system will check whether the first user is still operating on the build page at preset intervals. If the first user is still operating on the build page, that is, the termination condition is not met, the content of the first user's operation on the build page is automatically saved. The automatic save function can be implemented by calling the save interface. This process can interact with the data to save the user's changes and version information. The automatically saved content includes converting the source code summarized by the current build page into a schema format for saving, or saving the schema of the entire build page to the back-end database. Schema refers to the logical structure used to organize and manage database objects. The schema defines the structure and relationship of objects such as tables, views, indexes, and stored procedures in the database.
[0056] The termination conditions include that the development authority of the first user is interrupted, or the first user exits the build page. The development authority of the first user is interrupted, for example, the development authority is changed (such as the development authority is preempted by the second user), or other security policies occur, resulting in the interruption of the development authority of the first user; the first user exits the build page, for example, the first user has completed the current development task and exited the build page. It is understandable that if any of the above termination conditions is met, the first user loses the development authority.
[0057] As an implementation method, a new version can be created for each saved operation, so that the version of each operation can be saved so that the user can go back to the previous version when needed, realizing effective version control. Of course, considering the limited storage space, the latest one or a preset number of versions can also be recorded without saving all versions.
[0058] If the development authority of the first user is interrupted or the first user exits the build page after a certain save, the delayed task is stopped and the automatic save operation will no longer be performed. If the first user re-enters the build page and regains the development authority, the delayed task can be regenerated based on the first user's identity for automatic saving.
[0059] In order to improve the interactivity with users, a successful save notification and a termination notification can be sent to the first user. Successful save notification: After each successful automatic save, the system can selectively notify the first user to inform them that their content has been successfully saved. Termination notification: When the automatic save task stops due to meeting the termination condition, the system can also notify the first user to inform them that the automatic save has stopped.
[0060] It is understandable that after the first user's development authority is interrupted or the first user exits the page building process, the first user has lost the development authority and the page operation cannot be performed at this time. At the same time, the saving function, including automatic saving and manual saving, will be disabled.
[0061] In an optional embodiment, during the execution of the delayed task, the content operated by the first user in the build page is automatically saved every preset time. This step can also be implemented by cyclically executing the delayed task. For example, after each automatic save operation is completed, the function is called again using the user ID of the first user to generate a new delayed task. The setTimeout function can be called to set a delayed task. The delay period of the task is set to 1 minute (i.e. 60,000 milliseconds). This means that when the user enters the page, the system will perform a save operation after 1 minute. After the 1-minute delay is over, the setTimeout function will be triggered and the system will perform an automatic save operation. After the save operation is completed, the setTimeout function is called again to restart the next timer. This process will be repeated to achieve continuous automatic saving.
[0062] At the same time, the first user's status is continuously monitored to determine whether the termination condition is met. Once any termination condition is met, the automatic save task will be stopped, for example, by adding permission check logic in the callback function of setTimeout to achieve timer interruption and control. After that, some cleanup operations can be performed, such as releasing resources related to the automatic save task to ensure that system performance is not affected.
[0063] As an implementation method, one of the termination conditions is that the first user exits the build page, and whether the first user exits the build page can be determined by monitoring the visibilitychange event. When the current browser tab page (build page) is activated, the automatic save operation will be executed. When the user switches the tab page or window, causing the current page to lose its activation state, the automatic save function is suspended to prevent resource waste. When the page is reactivated, the system will restore the timer or call the timer again as needed to generate a delayed task.
[0064] In the implementation process of the above embodiment: the automatic saving mechanism through user identification can ensure that the user's work progress in the development process is protected, while improving development efficiency and data security, and reducing the risk of data loss caused by unexpected situations such as power failure and network interruption.
[0065] Optionally, in an embodiment of the present application, during the execution of the delayed task, the content operated by the first user in the build page is automatically saved at preset intervals until a termination condition is met, including:
[0066] During the execution of the delayed task, the current user ID that has obtained the development permission is queried. For example, the current user ID that has obtained the development permission can be queried by calling an interface, checking a page session, a database record, or other identity authentication mechanisms.
[0067] Determine whether the user ID of the first user is consistent with the current user ID. If the user ID of the first user is inconsistent with the current user ID, the termination condition is met. Exemplarily, the acquired current user ID is compared with the user ID of the first user. If the current user ID is the same as the user ID of the first user, it means that the first user still has development authority and the automatic save task can continue to be executed. If the current user ID is inconsistent with the user ID of the first user, it means that other users may have taken over the construction page and the first user has lost development authority. In this case, the termination condition is met and the automatic save task is terminated.
[0068] It is understandable that the above-mentioned termination of the automatic saving task means that after the first user loses the development authority, the automatic saving task for the first user is terminated. If the second user takes over the development authority, the corresponding second delay task will continue to be generated for the user ID of the second user. The second delay task is used to save the content operated by the second user in the build page until it is detected that the second user has lost the development authority, then the second delay task is also terminated, and the second user's operations will no longer be saved. By analogy, after obtaining the development authority, each user will use his user ID to call the function to generate a delay task, and in the process of executing the delay task, the content operated by the above user in the build page will be automatically saved every preset time until the termination condition is met (the user loses the development authority).
[0069] In the implementation process of the above embodiment: when the first user no longer has the development authority, the automatic saving operation for the first user is automatically stopped, thereby improving resource utilization and reducing unnecessary data saving operations. In addition, each user generates a corresponding delayed task for automatically saving the content operated by the user in the build page, while taking into account the development authority management, improving data security.
[0070] Optionally, in an embodiment of the present application, the preemption prompt information also includes a copy address; the copy address points to the development content corresponding to the build page before the development authority of the first user is interrupted.
[0071] After the second user seizes the first user's development rights to build a page, the system needs to immediately notify the first user that their rights have been seized. This notification mechanism can be implemented through pop-up windows, emails, text messages, or in-app notifications. For example, we can obtain the first user's user ID, find the first user's application account through the user ID, and send a preemption prompt to the first user through an application card or application message.
[0072] The preemption reminder can use an asynchronous notification mechanism to quickly respond and send notifications when the development permissions change. The asynchronous notification mechanism can be event-based. When a permission change event is detected (such as opening the development permissions to the second user and closing the development permissions of the first user), the notification sending process is triggered and a preemption reminder letter is sent to the first user.
[0073] The preemption prompt information also includes a copy address, which refers to the storage location of the development content made by the first user on the build page before the development permission of the first user was interrupted. This address can be a URL link, database address or other form of reference, pointing to the work content last saved by the first user.
[0074] Generation of a copy address: Before the first user's development rights are seized, the system needs to automatically save their current work status and generate a copy address. This address points to a backup that contains all the operations and changes made by the first user on the build page. The first user can access all operations and changes made on the build page through the copy address, so as to restore work, check progress, etc.
[0075] In the implementation process of the above embodiment: in the case that the development authority is preempted, the first user can be notified in time and can access their previous working copy, thereby reducing work interruption and data loss caused by authority changes.
[0076] Optionally, in an embodiment of the present application, the method further includes: querying in real time the current user identifier of the user who currently obtains the development permission by calling a query interface, wherein the current user identifier is used to determine the user who currently obtains the development permission.
[0077] The query interface can be called by other services or modules within the system to return the user ID that currently has development permissions. By calling the query interface, you can track and update which users currently have development permissions to build pages. For example, you can query the user ID that currently has development permissions by calling the queryController interface on the Node side.
[0078] In the implementation process of the above embodiment: real-time query of the current user ID helps to ensure data consistency, especially in a multi-user collaborative environment, to avoid data conflicts and overwriting. By real-time monitoring of the permission status, the user who currently obtains the development permission can be known at any time, which increases transparency and improves the efficiency of collaborative development.
[0079] Optionally, in the embodiment of the present application, during the process of the first user obtaining the development permission, the current user identifier is the user identifier of the first user; sending the preemption prompt information to the second user includes:
[0080] According to the user identifier of the first user, a preemption prompt message is sent to the second user, so that the second user interrupts the development authority of the first user when preempting the development authority of the building page.
[0081] After the first user obtains the development permission, if the second user wants to seize the development permission, a seizure prompt message needs to be sent to the second user. The seizure prompt message includes the first user. For example, it explains to the second user that the user currently developing is the first user. The second user can determine whether to seize the development permission of the build page based on the user ID of the first user. If the second user chooses to seize the development permission of the build page, the development permission of the first user will be interrupted. If the second user chooses not to seize the development permission of the build page, the development permission of the first user does not need to be interrupted, and the operation of the first user will not be affected.
[0082] In the implementation process of the above embodiment: by explicitly providing the second user with the user information currently being developed, the second user can decide whether to preempt the permission based on the information of the first user, thereby making a faster and more accurate decision on whether to preempt the permission, reducing communication costs and decision-making time. In this way, the development permission can be reserved for users with more important or more urgent work, so that the resources can be used by the users who need it most.
[0083] Optionally, in an embodiment of the present application, after closing the development permission of the first user, the method further includes: opening the readable permission of the build page to the first user.
[0084] Closing the first user's development permissions can be achieved by updating the permission record in the database and session management. After closing the first user's development permissions, the first user cannot continue to perform development operations. However, the first user has read permissions to build pages. The first user can still view the build pages, but cannot edit or modify them. In this way, the first user can access their previous work without interfering with the work of the second user.
[0085] After the first user's development permissions are disabled, the first user can also be notified that their permissions have been changed to read-only (i.e., read permissions), such as through in-app notifications, emails, or text messages, to ensure that the first user is aware of the changes in their permissions in a timely manner. All operations related to permission changes can be recorded in the system log for auditing and monitoring. This helps track the history of permission changes and troubleshoot problems when they occur.
[0086] In the implementation process of the above embodiment: by timely closing the development permission of the first user and opening the read-only permission, the security of the data is improved. Even after losing the development permission, the first user can still view the construction page, which improves the information sharing capacity and collaboration efficiency.
[0087] See also Figure 2 The structure diagram of the collaborative development device provided in the embodiment of the present application is shown; the embodiment of the present application provides a collaborative development device 200, including:
[0088] The request module 210 is used to receive a page entry request sent by a second user after the first user enters the build page and obtains development authority; the build page is used to develop application programs; the development authority means that the user who enters the build page has the authority to perform development operations on the build page;
[0089] Prompt module 220, used to send a preemption prompt message to the second user; the preemption prompt message is used for the second user to determine whether to preempt the development authority of the building page;
[0090] The preemption module 230 is used to open the development permission to the second user, close the development permission of the first user, and send a preemption prompt message to the first user if the second user determines to preempt the development permission of the building page; the preemption prompt message includes the user information of the second user.
[0091] Optionally, in an embodiment of the present application, the collaborative development device 200, a saving module, is used to obtain the user identifier of the first user; using the user identifier of the first user, a function is called to generate a delayed task; in the process of executing the delayed task, the content operated by the first user in the build page is automatically saved every preset time until a termination condition is met; the termination condition includes that the development authority of the first user is interrupted, or the first user exits the build page.
[0092] Optionally, in an embodiment of the present application, the collaborative development device 200, the saving module, is specifically used to query the current user identifier who currently obtains the development authority during the execution of the delayed task; determine whether the user identifier of the first user is consistent with the current user identifier. If the user identifier of the first user is inconsistent with the current user identifier, the termination condition is met.
[0093] Optionally, in an embodiment of the present application, the collaborative development device 200, the preemption prompt information also includes a copy address; the copy address points to the development content corresponding to the build page before the development authority of the first user is interrupted.
[0094] Optionally, in an embodiment of the present application, the collaborative development device 200 further includes a current development user acquisition module, which is used to query in real time the current user identifier of the current development authority by calling a query interface, and the current user identifier is used to determine the user who currently obtains the development authority.
[0095] Optionally, in an embodiment of the present application, in the collaborative development device 200, during the process of the first user obtaining development permissions, the current user identifier is the user identifier of the first user; the prompt module 220 is specifically used to send a preemption prompt message to the second user based on the user identifier of the first user, so that the second user interrupts the development permissions of the first user when preempting the development permissions of the building page.
[0096] Optionally, in the embodiment of the present application, the collaborative development device 200 further includes a permission change module, which is used to open the read permission of the build page to the first user after closing the development permission of the first user.
[0097] It should be understood that the device corresponds to the above-mentioned collaborative development method embodiment and can execute the various steps involved in the above-mentioned method embodiment. The specific functions of the device can be found in the above description. To avoid repetition, the detailed description is appropriately omitted here. The device includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the operating system (OS) of the device.
[0098] See also Figure 3 The electronic device 300 provided in the embodiment of the present application includes: a processor 310 and a memory 320, wherein the memory 320 stores machine-readable instructions executable by the processor 310, and when the machine-readable instructions are executed by the processor 310, the above method is executed.
[0099] Figure 3 Each component shown in can be implemented by hardware, software or a combination thereof. The electronic device 300 may be a physical device, such as a server, a PC, etc., or a virtual device, such as a virtual machine, a virtualized container, etc. Moreover, the electronic device 300 is not limited to a single device, but may also be a combination of multiple devices or a cluster consisting of a large number of devices.
[0100] An embodiment of the present application further provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above method is executed.
[0101] Among them, the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.
[0102] In several embodiments provided by the embodiments of the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.
[0104] The above description is only an optional implementation manner of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the embodiments of the present application, which should be covered within the protection scope of the embodiments of the present application.
Claims
1. A collaborative development method, characterized in that: include: After the first user enters the building page and obtains the development permission, a page entry request sent by the second user is received; The building page is used for application development; The development authority means that the user who enters the building page has the authority to perform development operations on the building page; Sending a preemption prompt message to the second user; The preemption prompt information is used for the second user to determine whether to preempt the development authority of the building page; If the second user determines to seize the development permission of the building page, the development permission is opened to the second user, the development permission of the first user is closed, and a preemption prompt message is sent to the first user; The preemption prompt information includes user information of the second user.
2. The method according to claim 1, characterized in that After the first user enters the building page and obtains the development authority, the method further includes: Obtaining a user identifier of the first user; Using the user ID of the first user, calling a function to generate a delayed task; During the execution of the delayed task, the content operated by the first user in the building page is automatically saved at preset intervals until a termination condition is met; the termination condition includes that the development authority of the first user is interrupted, or the first user exits the building page.
3. The method according to claim 2, characterized in that In the process of executing the delayed task, the content operated by the first user in the building page is automatically saved at every preset time until the termination condition is met, including: In the process of executing the delayed task, querying the current user ID of the current user who has obtained the development authority; It is determined whether the user identifier of the first user is consistent with the current user identifier. If the user identifier of the first user is inconsistent with the current user identifier, the termination condition is met.
4. The method according to claim 1, characterized in that: The preempted prompt information also includes a copy address; the copy address points to the development content corresponding to the build page before the development authority of the first user is interrupted.
5. The method according to claim 1, characterized in that The method further comprises: By calling the query interface, the current user identifier of the current user who has obtained the development authority is queried in real time, and the current user identifier is used to determine the user who has currently obtained the development authority.
6. The method according to claim 5, characterized in that In the process of the first user obtaining the development permission, the current user identifier is the user identifier of the first user; and the sending of the preemption prompt information to the second user includes: According to the user identifier of the first user, a preemption prompt message is sent to the second user, so that the second user interrupts the development authority of the first user when preempting the development authority of the building page.
7. The method according to any one of claims 1 to 6, characterized in that: After closing the development authority of the first user, the method further includes: The read permission of the construction page is opened to the first user.
8. A computer program product, characterized in that The method comprises computer program instructions, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is executed.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method according to any one of claims 1 to 7 is executed.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is executed.